ci(post-release): name conflicting files in merge-failure Slack alert#372
Open
jason10lee wants to merge 7 commits into
Open
ci(post-release): name conflicting files in merge-failure Slack alert#372jason10lee wants to merge 7 commits into
jason10lee wants to merge 7 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
When the post-release
release → alpha/release → mainback-merge hits a conflict, the Slack alert previously said only that a merge failed and linked the build — leaving the reader to open the Actions log to find out what conflicted or who to involve. This makes the alert self-contained and routable.The alert now names each conflicting file and, for each, the incoming release-side PR (as a clickable link) and its author, so a reader can tell what needs reconciling and who to ping straight from the message:
Attribution identifies the incoming change being merged forward (not sole blame — the merge is mutual), resolved from the squash commit that last touched each file.
Built to be robust on this already-failed path:
JSON.stringifyrather than hand-rolled string interpolation, correctly escaping the variable-length file list.set -e) or leaves subsequent merges / status reporting unreported.core.quotePath=false) so attribution matches; PR/author parsing is robust to merge commits (--no-merges), tabs in commit subjects, and issue-vs-PR refs; gracefully degrades when a commit has no(#NNN).When there are no conflicting paths to report, the message is unchanged from before.
How to test the changes in this Pull Request:
releasebranch and a default branch that both modify the same line of a file, sogit merge releaseconflicts; give the release-side commit a(#NNN)subject.post-release.sh(or exercisenotify_slack/attribute_conflicts) with Slack env vars pointed at a test channel, and trigger the failing merge path.git merge --abort, and that the posted message lists it underConflicting files:with the incoming PR rendered as a clickable Slack link (<url|#NNN>) and the author name.(#NNN)shows just the file (or author); a forced node failure still posts the minimal fallback alert.Other information:
post-release.sh; verified manually —bash -n,shellcheck, node payload generation across size/edge cases, and simulated conflicting merges.)