-
Notifications
You must be signed in to change notification settings - Fork 60
feat: add scripts for merging pull requests by title and from a list, and validate PR titles #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… and validate PR titles
📋 Lint Results⚡ ./gh-cli scripts🔧 ./scripts scriptsLint results updated at Tue Dec 23 16:44:35 UTC 2025 |
|
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
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]