Skip to content

Conversation

@joshjohanning
Copy link
Owner

New batch PR merge and validation tooling:

  • Added 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.
  • Added 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.
  • Added 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:

  • Updated gh-cli/README.md to 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]

Copilot AI review requested due to automatic review settings December 23, 2025 16:44
@github-actions
Copy link

📋 Lint Results

⚡ ./gh-cli scripts

✅ No issues found.

🔧 ./scripts scripts

✅ No issues found.

Lint results updated at Tue Dec 23 16:44:35 UTC 2025

@joshjohanning
Copy link
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

@joshjohanning joshjohanning merged commit bd5dd16 into main Dec 23, 2025
11 checks passed
@joshjohanning joshjohanning deleted the add-pr-scripts branch December 23, 2025 16:47
Copy link
Contributor

Copilot AI left a 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.sh to find and merge PRs matching a title pattern across repositories with wildcard support and dry-run capability
  • Added merge-pull-requests-from-list.sh to merge PRs from a URL list with customizable commit messages using template variables
  • Added validate-pr-titles.sh to 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants