Skip to content

Commit 96b05bc

Browse files
Phlogistiqueclaude
andcommitted
Add GitHub Actions run link to commit messages
When running in GitHub Actions, append a link to the workflow run in the commit message body for easier debugging and traceability. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent adee457 commit 96b05bc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

update-pr-stack.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ update_direct_target() {
114114
log_cmd git merge --no-edit -s ours SQUASH_COMMIT
115115
log_cmd git update-ref MERGE_RESULT "HEAD^{tree}"
116116
COMMIT_MSG="Merge updates from $BASE_BRANCH and squash commit"
117+
if [[ "${GITHUB_ACTIONS:-}" == "true" ]]; then
118+
COMMIT_MSG="$COMMIT_MSG
119+
120+
See $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
121+
fi
117122
CUSTOM_COMMIT=$(log_cmd git commit-tree MERGE_RESULT -p BEFORE_MERGE -p "origin/$MERGED_BRANCH" -p SQUASH_COMMIT -m "$COMMIT_MSG")
118123
log_cmd git reset --hard "$CUSTOM_COMMIT"
119124
fi

0 commit comments

Comments
 (0)