Skip to content

Commit 14ef46f

Browse files
authored
fix(ci): report merge train merged alerts against the base branch (#24939)
## Summary Retargeted to `merge-train/spartan-v5` per request. The matching `merge-train/spartan` port is [aztec-packages#24940](#24940). The merge-train merged Slack alert was reporting the PR head branch as the destination. For [aztec-packages#24851](#24851), the PR head was `merge-train/spartan-v5` but the actual base was `v5-next`, so the Slack message was misleading. ## Changes - Pass `github.event.pull_request.base.ref` to the merged notification step as `TARGET_BRANCH`. - Make `ci3/merge_train_failure_slack_notify --merged` prefer `TARGET_BRANCH`, with a `REF_NAME` fallback for direct/local use. ## Tests - `bash -n ci3/merge_train_failure_slack_notify` - `git diff --check` --- *Created by [claudebox](https://claudebox.work/v2/sessions/85cdf7ecc9727322/jobs/1) · group: `slackbot` · requested by Facundo Carreiro · [Slack thread](https://aztecprotocol.slack.com/archives/C0AU8BULZHC/p1784809391722469?thread_ts=1784809391.722469&cid=C0AU8BULZHC)*
2 parents 52c4d30 + 36e83a7 commit 14ef46f

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/merge-queue-dequeue-notify.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ jobs:
3737
env:
3838
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
3939
REF_NAME: ${{ github.event.pull_request.head.ref }}
40+
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
4041
PR_URL: ${{ github.event.pull_request.html_url }}
4142
run: ./ci3/merge_train_failure_slack_notify --merged

ci3/merge_train_failure_slack_notify

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ if [[ "$MODE" == "dequeued" ]]; then
5454
--target-ref "origin/$REF_NAME"
5555

5656
elif [[ "$MODE" == "merged" ]]; then
57-
"$TOPDIR/ci3/slack_notify" "PR merged into $REF_NAME: <$PR_URL|$commit_title> by $commit_author" "$channel"
57+
merged_target="${TARGET_BRANCH:-$REF_NAME}"
58+
"$TOPDIR/ci3/slack_notify" "PR merged into $merged_target: <$PR_URL|$commit_title> by $commit_author" "$channel"
5859

5960
else
6061
"$TOPDIR/ci3/slack_notify_with_claudebox_kickoff" "$channel" \

0 commit comments

Comments
 (0)