Skip to content

State author of merged results commit

What does this MR do?

In merged result pipelines the merge ref carries a merge commit whose author is always the merge request creator and not an authenticated user (such as the pushing or pipeline trigger user)

See the override to current_user in the following link: https://gitlab.com/gitlab-org/gitlab/blob/b535f1ff45c8d661ba1c9818b26f5a41b32ae5ad/app/services/merge_requests/mergeability_check_service.rb#L160 and https://gitlab.com/gitlab-org/gitlab/blob/47b591b6b902d63053993a6920b409c7c2bb33e1/ee/app/services/merge_trains/create_pipeline_service.rb#L29 as a references for this change.

This behavior is important to note in case users rely in author related variables in the pipelines and observe its value never changes despite different users pushing to the same source branch.

Related issues

Discovered during research in http://gitlab.zendesk.com/agent/tickets/285233

Author's checklist

If you are a GitLab team member and only adding documentation, do not add any of the following labels:

  • ~"frontend"
  • ~"backend"
  • ~"type::bug"
  • ~"database"

These labels cause the MR to be added to code verification QA issues.

Reviewer's checklist

Documentation-related MRs should be reviewed by a Technical Writer for a non-blocking review, based on Documentation Guidelines and the Style Guide.

  • If the content requires it, ensure the information is reviewed by a subject matter expert.
  • Technical writer review items:
    • Ensure docs metadata is present and up-to-date.
    • Ensure the appropriate labels are added to this MR.
    • Ensure a release milestone is set.
    • If relevant to this MR, ensure content topic type principles are in use, including:
      • The headings should be something you'd do a Google search for. Instead of Default behavior, say something like Default behavior when you close an issue.
      • The headings (other than the page title) should be active. Instead of Configuring GDK, say something like Configure GDK.
      • Any task steps should be written as a numbered list.
      • If the content still needs to be edited for topic types, you can create a follow-up issue with the docs-technical-debt label.
  • Review by assigned maintainer, who can always request/require the reviews above. Maintainer's review can occur before or after a technical writer review.
Edited by Harsh Chouraria

Merge request reports

Loading