ocean icon indicating copy to clipboard operation
ocean copied to clipboard

Gitlab Integration

Open shariff6 opened this issue 1 year ago • 0 comments

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:

  • Implements synchronization for GitLab resources such as groups, projects issues, and merge requests.
  • Configures webhooks for capturing and responding to live events from GitLab.
  • Adds gitlabToken for secure API interactions.
  • Handles webhook secret generation and removes unused code.
  • Sets up YAML configuration for managing events and resource kinds.

Type of change

Please leave one option from the following and delete the rest:

  • [x] New Integration (non-breaking change which adds a new integration)

All tests should be run against the port production environment(using a testing org).

This implementation is pending tests

Core testing checklist

  • [x] Integration able to create all default resources from scratch
  • [x] Resync finishes successfully
  • [x] Resync able to create entities
  • [x] Resync able to update entities
  • [ ] Resync able to detect and delete entities
  • [ ] Scheduled resync able to abort existing resync and start a new one
  • [ ] Tested with at least 2 integrations from scratch
  • [ ] Tested with Kafka and Polling event listeners
  • [ ] Tested deletion of entities that don't pass the selector

Integration testing checklist

  • [ ] Integration able to create all default resources from scratch
  • [ ] Resync able to create entities
  • [ ] Resync able to update entities
  • [ ] Resync able to detect and delete entities
  • [ ] Resync finishes successfully
  • [ ] If new resource kind is added or updated in the integration, add example raw data, mapping and expected result to the examples folder in the integration directory.
  • [ ] If resource kind is updated, run the integration with the example data and check if the expected result is achieved
  • [ ] If new resource kind is added or updated, validate that live-events for that resource are working as expected
  • [ ] Docs PR link here

Preflight checklist

  • [x] Handled rate limiting
  • [x] Handled pagination
  • [x] Implemented the code in async
  • [x] Support Multi account

Screenshots

Include screenshots from your environment showing how the resources of the integration will look.

Groups

Screenshot (77) Screenshot (73)

Projects

Screenshot (76) Screenshot (75)

Merge Requests

Screenshot (78) Screenshot (79)

API Documentation

For this integration, the following GitLab API documentation links are used:

  • Issues API: Documentation on how to interact with issues in GitLab.
  • Projects API: Information on managing and retrieving project data.
  • Groups API: Details on working with GitLab groups.
  • Webhooks API: Guidelines for setting up and managing webhooks.
  • Merge Requests API: Instructions for handling merge requests.

shariff6 avatar Sep 20 '24 15:09 shariff6