-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gitlab Integration #1030
Gitlab Integration #1030
Conversation
…s king to port config
removes await
Removes if else statements, wraps kinds in dictionary(resource_map)
…dual handlers for each resource type - Replaced the single 'on_resync' function with dedicated handlers for GitLab groups, projects, merge requests, and issues. - Each resource type now has its own on_resync function to manage synchronization. - Added fetch_resource helper function to collect and return items from the respective fetch methods.
… on information in reponse from gitlab headers,
…ects, groups and issues
…class. Creates a mapper_factory helper class for easier adding of resource type and resource mappings
Adds setting up webhooks once Gitlab Integrations has began Create, List and Update Webhooks
Adjust setupwebhooks accross all projects
…itional resources Moves fetch resources logic into get_paginated_resource function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solid work. please go over my comments
Gitlab v1
@PeyGis Thank you for the review, all comments have been addressed. |
Adds support for all events to the setup group webhooks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some comments
initializePortResources: true | ||
scheduledResyncInterval: 1440 # 60 minutes X 24 hours = 1 day | ||
port: | ||
clientId: "{{ from env PORT_CLIENT_ID }}" # Can be loaded using environment variable: PORT_CLIENT_ID | ||
clientSecret: "{{ from env PORT_CLIENT_SECRET }}" # Can be loaded using environment variable: PORT_CLIENT_SECRET | ||
|
||
|
||
# The event listener to use for the integration service. | ||
eventListener: | ||
type: POLLING | ||
|
||
|
||
integration: | ||
# The identifier of this integration instance. | ||
identifier: "gitlab_v1" | ||
# The type of the integration. | ||
type: "Gitlab" | ||
config: | ||
gitlabToken: | ||
- "{{ from env GITLAB_TOKEN }}" | ||
- "{{ from env GITLAB_TOKEN2 }}" | ||
gitlabUrl: "https://gitlab.com" | ||
webhookUrl: "{{ from env WEBHOOK_URL }}" | ||
webhookSecret: "{{ from env WEBHOOK_SECRET }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't use the config.yaml file anymore. so delete it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the alternative to this,
This is what I was using for reference .
Develop an Integration
Adds generic resync
Description
What:
This integration for GitLab and Port creates a system for synchronizing GitLab groups, issues, merge requests, and projects. It also sets up webhooks to handle live events from GitLab.
Why:
To ensure that data between GitLab and Port is consistently synchronized and up-to-date. The integration enables real-time updates and event handling through webhooks, improving data accuracy and responsiveness.
How:
gitlabToken
for secure API interactions.Type of change
Please leave one option from the following and delete the rest:
All tests should be run against the port production environment(using a testing org).
This implementation is pending tests
Core testing checklist
Integration testing checklist
examples
folder in the integration directory.Preflight checklist
Screenshots
Include screenshots from your environment showing how the resources of the integration will look.
Groups
Projects
Merge Requests
API Documentation
For this integration, the following GitLab API documentation links are used: