feat: add scripts for merging pull requests by title and from a list, and validate PR titles#143
Merged
joshjohanning merged 1 commit intomainfrom Dec 23, 2025
Merged
Conversation
… and validate PR titles
📋 Lint Results⚡ ./gh-cli scripts🔧 ./scripts scriptsLint results updated at Tue Dec 23 16:44:35 UTC 2025 |
Owner
Author
|
Using these to help manage my OSS repos and all of the Dependabot PRs 😄 ./merge-pull-requests-by-title.sh repos.txt "chore(deps-dev): bump eslint-plugin-jest from 29.9.0 to 29.10.1 in the eslint group" squash "chore(deps-dev): bump eslint-plugin-jest from 29.9.0 to 29.10.1"Repos.txt: https://github.com/joshjohanning/twistlock-results-json-to-markdown-action
https://github.com/joshjohanning/bulk-github-repo-sync-action
https://github.com/joshjohanning/azdo_commit_message_validator
https://github.com/joshjohanning/publish-github-action
https://github.com/joshjohanning/organization-readme-badge-generator
https://github.com/joshjohanning/nodejs-actions-starter-template
https://github.com/joshjohanning/npm-version-check-action
https://github.com/joshjohanning/bulk-github-repo-settings-sync-action
https://github.com/joshjohanning/approveops
https://github.com/joshjohanning/ensure-immutable-actions |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces three new shell scripts for batch merging and validating pull requests, along with comprehensive documentation in the README. The scripts enable automation for common PR management tasks, particularly useful for handling Dependabot updates across multiple repositories.
Key Changes:
- Added
merge-pull-requests-by-title.shto find and merge PRs matching a title pattern across repositories with wildcard support and dry-run capability - Added
merge-pull-requests-from-list.shto merge PRs from a URL list with customizable commit messages using template variables - Added
validate-pr-titles.shto check title consistency across a list of PRs, identifying outliers before batch operations
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 11 comments.
| File | Description |
|---|---|
| gh-cli/validate-pr-titles.sh | New script to validate PR title consistency, using zsh-specific syntax for associative arrays and regex matching |
| gh-cli/merge-pull-requests-from-list.sh | New script to batch merge PRs from a URL list with template-based commit message customization |
| gh-cli/merge-pull-requests-by-title.sh | New script to find and merge PRs by title pattern with wildcard support across multiple repositories |
| gh-cli/README.md | Added documentation entries for all three new scripts with usage examples and input formats, plus fixed trailing whitespace |
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.
New batch PR merge and validation tooling:
merge-pull-requests-by-title.sh, a script that finds and merges open pull requests matching a title pattern (supports wildcards) across repositories listed in an input file, with options for merge method, custom commit title, and dry-run mode.merge-pull-requests-from-list.sh, a script to merge PRs from a file of PR URLs, supporting merge method selection, custom commit title/body (with template variables), and dry-run preview. Skips closed or already merged PRs.validate-pr-titles.sh, a script to check that all PRs in a list have the same title, reporting the majority title and listing outliers for consistency checks before batch merges.Documentation updates:
gh-cli/README.mdto add usage instructions, input formats, and examples for the new scripts, making it easier for users to understand and adopt these automation tools. [1] [2]