ocean icon indicating copy to clipboard operation
ocean copied to clipboard

[Integration][gitlab-v2] Added CODEOWNERS to default mapping and blueprints

Open oiadebayo opened this issue 2 weeks ago • 2 comments

User description

Description

What - Added CODEOWNERS file ingestion as defaults for gitlab-v2 integration with blueprint and mappings

Why - Enable tracking of code ownership across gitlab-v2 repositories to improve visibility into team responsibilities and file ownership

How - Created gitlabCodeowners blueprint, implemented itemsToParse logic to parse CODEOWNERS entries, and added skipParsing flag to file retrieval for raw content processing

Type of change

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

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] New Integration (non-breaking change which adds a new integration)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [x] Non-breaking change (fix of existing functionality that will not change current behavior)
  • [ ] Documentation (added/updated documentation)

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

Core testing checklist

  • [ ] Integration able to create all default resources from scratch
  • [ ] Resync finishes successfully
  • [ ] Resync able to create entities
  • [ ] 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
  • [ ] Completed a full resync from a freshly installed integration and it completed successfully
  • [ ] 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

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

Screenshots

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

API Documentation

Provide links to the API documentation used for this integration.


PR Type

Enhancement


Description

  • Added gitlabCodeowners blueprint for tracking code ownership

  • Implemented CODEOWNERS file ingestion with custom parsing logic

  • Configured file selector with skipParsing flag for raw content

  • Maps CODEOWNERS entries to entities with scope and location properties


Diagram Walkthrough

flowchart LR
  A["CODEOWNERS File"] -- "skipParsing: true" --> B["Raw Content"]
  B -- "itemsToParse: split & filter" --> C["Parsed Entries"]
  C -- "map to entities" --> D["gitlabCodeowners Blueprint"]
  D -- "relations" --> E["Service/Project"]

File Walkthrough

Relevant files
Enhancement
blueprints.json
Added gitlabCodeowners blueprint definition                           

integrations/gitlab-v2/.port/resources/blueprints.json

  • Added new gitlabCodeowners blueprint with identifier, title, and icon
  • Defined schema properties: location (file path) and scope (ownership
    scope)
  • Configured relation to service blueprint representing the project
+34/-0   
Configuration changes
port-app-config.yml
Configured CODEOWNERS file parsing and entity mapping       

integrations/gitlab-v2/.port/resources/port-app-config.yml

  • Added new resource kind file with selector for CODEOWNERS path
  • Implemented itemsToParse logic to parse CODEOWNERS content by
    splitting lines and filtering comments
  • Configured entity mappings with identifier combining project path and
    scope
  • Set properties for scope and location, with relation to project
+25/-0   
pyproject.toml
Updated project version number                                                     

integrations/gitlab-v2/pyproject.toml

  • Bumped version from 0.3.16 to 0.3.17
+1/-1     
Documentation
CHANGELOG.md
Updated changelog for version 0.3.17                                         

integrations/gitlab-v2/CHANGELOG.md

  • Added version 0.3.17 release notes dated 2025-11-12
  • Documented improvement: CODEOWNERS file ingestion in default mapping
+8/-0     

oiadebayo avatar Nov 12 '25 10:11 oiadebayo