Skip to content

Conversation

@sivanel97
Copy link
Contributor

@sivanel97 sivanel97 commented Oct 30, 2025

User description

Description

Handled the issue reported in the following JIRA issue.
Added another example for a yaml file in addition to a json file example.

Updated docs pages


PR Type

Documentation


Description

  • Added YAML file example for GitLab file ingestion

  • Created reusable example component files for team blueprint

  • Restructured documentation headers from level 2 to level 3

  • Enhanced "Files and file contents" section with dual examples


Diagram Walkthrough

flowchart LR
  A["examples.md"] -->|imports| B["Team Blueprint Component"]
  A -->|imports| C["YAML Config Component"]
  A -->|imports| D["YAML File Example Component"]
  B --> E["Documentation Section"]
  C --> E
  D --> E
  E -->|displays| F["Files and File Contents Examples"]
Loading

File Walkthrough

Relevant files
Documentation
_gitlab_integration_example_team_blueprint.mdx
Team blueprint example component                                                 

docs/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/example-files/_gitlab_integration_example_team_blueprint.mdx

  • New file containing team blueprint JSON definition
  • Defines schema with description and slack_channel_name properties
  • Wrapped in collapsible details component for documentation
+29/-0   
_gitlab_integration_example_team_yaml_file_example.mdx
YAML file example for team ingestion                                         

docs/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/example-files/_gitlab_integration_example_team_yaml_file_example.mdx

  • New file demonstrating YAML file format for team data ingestion
  • Shows example team entity with blueprint reference and properties
  • Wrapped in collapsible details component
+11/-0   
_gitlab_integration_example_yaml_config.mdx
YAML integration mapping configuration example                     

docs/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/example-files/_gitlab_integration_example_yaml_config.mdx

  • New file containing GitLab integration mapping configuration for YAML
    files
  • Demonstrates file selector and port entity mappings with YAML document
    parsing
  • Includes highlighted section showing proper YAML content indexing
+26/-0   
examples.md
Restructure documentation and add YAML file examples         

docs/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/examples.md

  • Added imports for three new example component files
  • Restructured all section headers from level 2 to level 3 under
    "Mapping examples"
  • Enhanced "Files and file contents" section with YAML file example
    alongside JSON
  • Added separator and introductory text for dual file format examples
  • Updated header hierarchy for prerequisites and subsections
+33/-15 

@qodo-merge-pro
Copy link
Contributor

qodo-merge-pro bot commented Oct 30, 2025

PR Compliance Guide 🔍

(Compliance updated until commit 8e81e3d)

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
Documentation Only: The PR adds documentation examples and Markdown content without introducing executable
code where audit logging would apply.

Referred Code
import ReleaseConfig from './example-releases/_gitlab_integration_example_release_config.mdx'
import TagBlueprint from './example-tags/_gitlab_integration_example_tag_blueprint.mdx'
import TagConfig from './example-tags/_gitlab_integration_example_tag_config.mdx'
import TeamBlueprint from './example-files/_gitlab_integration_example_team_blueprint.mdx'
import YamlConfig from './example-files/_gitlab_integration_example_yaml_config.mdx'
import TeamsYamlFileExample from './example-files/_gitlab_integration_example_team_yaml_file_example.mdx'

import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"

# Examples

## Mapping examples

### Groups

The following example demonstrates how to ingest your GitLab groups, subgroups and projects to Port.  
You can use the following Port blueprint definitions and integration configuration:

<GroupBlueprint/>



 ... (clipped 326 lines)
Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
No Error Paths: The added content is static documentation and configuration examples without runtime error
handling, so robustness cannot be assessed from this diff.

Referred Code
<details>
<summary><b>Integration mapping (click to expand)</b></summary>
```yaml showLineNumbers
resources:
  - kind: file
    selector:
      query: 'true'
      files:
        path: teams_file.yml
        repos:
          # Replace with your repository's path_with_namespace (e.g., "group/project" or "group/subgroup/project")
          - getport-labs/my-project
    port:
      entity:
        mappings:
          # Note that when parsing a YAML file, you should specify the index of the parsed document event when there is only one document.
          #highlight-start
          identifier: .file.content.[0].identifier
          title: .file.content.[0].title
          blueprint: .file.content.[0].blueprint
          properties:


 ... (clipped 5 lines)
Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Config Example Only: The diff adds documentation and example mappings without executable input handling, so
validation and security controls cannot be evaluated here.

Referred Code
<details>
<summary><b>Integration mapping (click to expand)</b></summary>
```yaml showLineNumbers
resources:
  - kind: file
    selector:
      query: 'true'
      files:
        path: teams_file.yml
        repos:
          # Replace with your repository's path_with_namespace (e.g., "group/project" or "group/subgroup/project")
          - getport-labs/my-project
    port:
      entity:
        mappings:
          # Note that when parsing a YAML file, you should specify the index of the parsed document event when there is only one document.
          #highlight-start
          identifier: .file.content.[0].identifier
          title: .file.content.[0].title
          blueprint: .file.content.[0].blueprint
          properties:


 ... (clipped 5 lines)
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

Previous compliance checks

Compliance check up to commit 50464f6
Security Compliance
Placeholder repository path

Description: The example includes a hardcoded repository path 'getport-labs/my-project' which, if
copied verbatim, could mislead users or unintentionally reference a real repo; ensure it's
clearly marked as a placeholder.
_gitlab_integration_example_yaml_config.mdx [11-12]

Referred Code
# Replace with your repository's path_with_namespace (e.g., "group/project" or "group/subgroup/project")
- getport-labs/my-project
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Not applicable: The changes are purely documentation/config examples without runtime error handling;
compliance cannot be evaluated from docs-only diffs.

Referred Code
<details>
<summary><b>Integration mapping (click to expand)</b></summary>
```yaml showLineNumbers
resources:
  - kind: file
    selector:
      query: 'true'
      files:
        path: teams_file.yml
        repos:
          # Replace with your repository's path_with_namespace (e.g., "group/project" or "group/subgroup/project")
          - getport-labs/my-project
    port:
      entity:
        mappings:
          # Note that when parsing a YAML file, you should specify the index of the parsed document event when there is only one document.
          #highlight-start
          identifier: .file.content.[0].identifier
          title: .file.content.[0].title
          blueprint: .file.content.[0].blueprint
          properties:


 ... (clipped 5 lines)

@qodo-merge-pro
Copy link
Contributor

qodo-merge-pro bot commented Oct 30, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Organization
best practice
Use boolean queryString prop

Use the boolean queryString prop without a value to follow the standard pattern
and ensure consistent behavior.

docs/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/examples.md [85]

-<Tabs groupId="config" queryString="parameter">
+<Tabs groupId="config" queryString>
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why:
Relevant best practice - Tabs usage guideline: include queryString on Tabs components to enable direct linking to tabs.

Low
General
Improve documentation example flow
Suggestion Impact:The commit reorders the components by moving above , matching the suggested change.

code diff:

 <TeamBlueprint/>
 
+<TeamsYamlFileExample/>
+
 <YamlConfig/>
-
-<TeamsYamlFileExample/>
 

Reorder the documentation components to present the example YAML file before the
configuration that parses it, creating a more logical flow for the user.

docs/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/examples.md [180-184]

 <TeamBlueprint/>
+
+<TeamsYamlFileExample/>
 
 <YamlConfig/>
 
-<TeamsYamlFileExample/>
-

[Suggestion processed]

Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies that the order of components in the documentation example could be more intuitive and proposes a logical reordering that improves clarity for the user.

Low
  • Update

@aws-amplify-eu-west-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2964.d2ngvl90zqbob8.amplifyapp.com

@sivanel97 sivanel97 merged commit f99960f into main Oct 30, 2025
5 checks passed
@sivanel97 sivanel97 deleted the PORT-16655-bug-gitlab-v-2-mapping-examples-for-file-kinds-are-incorrect branch October 30, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants