Skip to content
Snippets Groups Projects

Expose `name` and `merge_request_event_type` in serialized json and predefined variables

Merged Shinya Maeda requested to merge add-pipeline-type-key-in-pipeline-entity into master
All threads resolved!

What does this MR do?

This MR exposes name and merge_request_event_type in serialized json for pipeline entity. This is only BE change and you can find FE change at https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14664.

Here is the conversion table.

Pipeline type pipeline.name pipeline.merge_request_event_type Condition
Pipelines for merge train Merge train pipeline 'merge_train' N/A
Pipelines for merged results Merged result pipeline 'merged_result' pipeline.flags.merge_request_pipeline === true (To be removed in https://gitlab.com/gitlab-org/gitlab-ee/issues/13991)
Pipelines for merge requests (detached) Detached merge request pipeline 'detached' pipeline.flags.detached_merge_request_pipeline === true (To be removed in https://gitlab.com/gitlab-org/gitlab-ee/issues/13991)
Branch pipelines Pipeline undefined pipeline.ref.branch === true
Tag pipelines Pipeline undefined pipeline.ref.tag === true

This MR also exposes the pipeline.merge_request_event_type as CI_MERGE_REQUEST_EVENT_TYPE predefined variable for a customer request.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Shinya Maeda

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Peter Leitzen
  • Peter Leitzen
  • Peter Leitzen assigned to @dosuken123 and unassigned @splattael

    assigned to @dosuken123 and unassigned @splattael

  • Shinya Maeda changed the description

    changed the description

  • Shinya Maeda added 13 commits

    added 13 commits

    Compare with previous version

  • Shinya Maeda assigned to @ayufan and unassigned @dosuken123

    assigned to @ayufan and unassigned @dosuken123

  • Shinya Maeda changed title from Expose pipeline.type {-and pipeline.details.type_label in serialized json-} to Expose pipeline.type in serialized json and predefined variables

    changed title from Expose pipeline.type {-and pipeline.details.type_label in serialized json-} to Expose pipeline.type in serialized json and predefined variables

  • @dosuken123

    I like this. And I agree that this is needed. I wonder about naming and split. I would maybe propose to have #entity and what is described in one comment instead of bundling everything into one #type. I would likely not use #type as it overlays with STI, even if it is not a problem today, I'm unsure if it will not be later.

  • Kamil Trzciński assigned to @dosuken123 and unassigned @ayufan

    assigned to @dosuken123 and unassigned @ayufan

  • Author Maintainer

    @splattael @ayufan Thank you for reviewing!

  • Shinya Maeda added 228 commits

    added 228 commits

    Compare with previous version

  • Shinya Maeda added 1 commit

    added 1 commit

    • 55152da0 - Add pipeline.type key to PipelineEntity

    Compare with previous version

  • Shinya Maeda added 1 commit

    added 1 commit

    • f8d2eb40 - Add pipeline.type key to PipelineEntity

    Compare with previous version

  • Shinya Maeda added 1 commit

    added 1 commit

    • c4ef467c - Add pipeline.type key to PipelineEntity

    Compare with previous version

  • Shinya Maeda added 1 commit

    added 1 commit

    • ce74d89c - Add pipeline.type key to PipelineEntity

    Compare with previous version

  • Shinya Maeda changed title from Expose {-pipeline.-}type in serialized json and predefined variables to Expose {+name and merge_request_event_+}type in serialized json and predefined variables

    changed title from Expose {-pipeline.-}type in serialized json and predefined variables to Expose {+name and merge_request_event_+}type in serialized json and predefined variables

  • Shinya Maeda changed the description

    changed the description

  • Shinya Maeda added 1 commit

    added 1 commit

    • bee8cc43 - Add pipeline.type key to PipelineEntity

    Compare with previous version

  • Shinya Maeda added 1 commit

    added 1 commit

    • 4eaab3c5 - Add pipeline.type key to PipelineEntity

    Compare with previous version

  • mentioned in issue #66806 (moved)

  • Author Maintainer

    @ayufan I've addressed all comments. Back to you.

  • Shinya Maeda assigned to @ayufan and unassigned @dosuken123

    assigned to @ayufan and unassigned @dosuken123

  • Kamil Trzciński resolved all threads

    resolved all threads

  • Kamil Trzciński approved this merge request

    approved this merge request

  • Kamil Trzciński assigned to @dosuken123 and unassigned @ayufan

    assigned to @dosuken123 and unassigned @ayufan

  • Kamil Trzciński
  • @dosuken123 LGTM :tada: just one comment.

  • Nathan Friend mentioned in merge request !31722 (merged)

    mentioned in merge request !31722 (merged)

  • Shinya Maeda added 223 commits

    added 223 commits

    Compare with previous version

  • Shinya Maeda added 1 commit

    added 1 commit

    • 8c21610c - Add pipeline.type key to PipelineEntity

    Compare with previous version

  • Shinya Maeda resolved all threads

    resolved all threads

  • Shinya Maeda resolved all threads

    resolved all threads

  • Author Maintainer

    @ayufan Back to you.

  • Shinya Maeda assigned to @ayufan and unassigned @dosuken123

    assigned to @ayufan and unassigned @dosuken123

  • Author Maintainer

    Locally confirmed it's functional.

  • Kamil Trzciński resolved all threads

    resolved all threads

  • mentioned in commit 6b7fe67a

  • Please register or sign in to reply
    Loading