feat: include PR number in commit subject for merge scripts#146
Merged
joshjohanning merged 2 commits intomainfrom Jan 26, 2026
Merged
feat: include PR number in commit subject for merge scripts#146joshjohanning merged 2 commits intomainfrom
joshjohanning merged 2 commits intomainfrom
Conversation
📋 Lint Results⚡ ./gh-cli scripts🔧 ./scripts scriptsLint results updated at Mon Jan 26 22:56:40 UTC 2026 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modifies two merge scripts to automatically append the PR number in the format (#123) to commit subjects when merging pull requests. The change aims to improve traceability of merged changes by ensuring the PR number is always present in the commit message.
Changes:
- Updated
merge-pull-requests-from-list.shto unconditionally append(#<pr_number>)to commit subjects - Updated
merge-pull-requests-by-title.shto unconditionally append(#<pr_number>)to commit subjects - Both scripts now apply this logic for merge and squash methods, but not for rebase
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| gh-cli/merge-pull-requests-from-list.sh | Refactored commit subject logic to always append PR number in format (#123) after template substitution |
| gh-cli/merge-pull-requests-by-title.sh | Updated commit subject logic to always append PR number in format (#123) when custom or default title is used |
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.
This pull request updates the merge scripts to consistently include the pull request number in the commit subject when merging, improving traceability of merged changes. The logic for setting the commit subject has been unified and enhanced in both scripts.
Improvements to commit subject formatting:
(<PR number>), regardless of whether a custom title is provided, except when using therebasemerge method. This change applies to bothmerge-pull-requests-by-title.shandmerge-pull-requests-from-list.sh. [1] [2]Template handling enhancements:
merge-pull-requests-from-list.sh, the commit title template substitution is preserved, and the PR number is appended to the final subject line for consistency.