Skip to content

BridgeAPI does not return project_id in the DownstreamPipeline #1300

@mbench777

Description

@mbench777

Hello,

When using the Bridge API via the gitlab4j-api library, the DownstreamPipeline object returned does not contain the project_id property. This information is essential to identify the target project of the child pipeline triggered by a bridge.

Expected Behavior

The DownstreamPipeline object should expose the project_id field (as in the GitLab API JSON response) so users can easily obtain the project ID of the child pipeline.

Example GitLab API Response :

https://<GITLAB_HOST>/api/v4/projects/<PROJECT_ID>/pipelines/<PIPELINE_ID>/bridges

[
  {
    ...
    "downstream_pipeline": {
      "id": xxxxxxxxxxxxxxxxxxxx,
      "iid": xxxxxxxxxxxxxxxxxxxx,
      "project_id": xxxxxxxxxxxxxxxxxxxx,
      "sha": "xxxxxxxxxxxxxxxxxxxx",
      "ref": "xxxxxxxxxxxxxxxxxxxx",
      "status": "xxxxxxxxxxxxxxxxxxxx",
      "source": "xxxxxxxxxxxxxxxxxxxx",
      "created_at": "xxxxxxxxxxxxxxxxxxxx",
      "updated_at": "xxxxxxxxxxxxxxxxxxxx",
      "web_url": "xxxxxxxxxxxxxxxxxxxx"
    }
  }
]

Suggestion

Add the project_id property to the DownstreamPipeline model (https://github.com/gitlab4j/gitlab4j-api/blob/main/gitlab4j-models/src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java#L11) and populate it when mapping API responses.

Thank you in advance for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions