Skip to content

Print the new cherry-picked SHA in the comment posted in MR

Reuben Pereira requested to merge rp/keyword-params-for-cherry-pick-result into master

What does this MR do?

Currently, when an MRs merge commit is picked into an auto deploy branch, we have multiple manual steps required to check which auto deploy pipeline contains the cherry picked commit.

One of the steps is to check which branch contains the cherry-picked commit. The steps for that probably look something like:

  1. Copy the merge commit message.
  2. Open the commits page of the branch we want to check and search for the commit message.

Instead of searching for a commit message, if we know the SHA of the cherry-picked commit, we can check for the presence of the SHA on the branch's commit list page. This should be more accurate than searching for a commit message. The downside is that you have to use your browser's search feature, since the commit list page does not support searching by commit SHA. This also means that you can only search within the commits that are displayed. This should be fine since cherry-picked commits are usually at the top of the list.

This MR adds the following line to the comment that is posted to an MR after it is cherry-picked into an auto-deploy branch:

You can also use the following chatops command to check its status: `/chatops run auto_deploy status #{pick_result.new_sha}`

Author Check-list

  • Has documentation been updated?
Edited by Reuben Pereira

Merge request reports