Skip to content

Fix wrong MR link in pipeline failure email

Shinya Maeda requested to merge fix-wrong-mr-id-in-pipeline-failure-email into master

What does this MR do?

Recently we've improved pipeline failure email to show MR link for relevant MRs !17513 (diffs), however, it turned out that the all_merge_requests could misbehave if there is an accidental merge request created from master to feature branch. This MR fixes the problem by changing the logic as the following:

  • If the pipeline is merge request pipeline, then we show an associated MR.
  • If the pipeline is a head pipeline of a merge request, then we show the MR link. (This is the previous behavior).

Close #201947 (closed)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability 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