{"id":26993167,"url":"https://github.com/github/gh-combine","last_synced_at":"2025-09-12T02:16:11.614Z","repository":{"id":285806009,"uuid":"959369815","full_name":"github/gh-combine","owner":"github","description":"A gh cli extension to automatically combine multiple pull requests into one","archived":false,"fork":false,"pushed_at":"2025-09-02T19:34:04.000Z","size":3516,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-09-06T17:59:21.435Z","etag":null,"topics":["automation","gh-cli","github","golang","pull-requests"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-02T17:21:18.000Z","updated_at":"2025-09-02T19:07:10.000Z","dependencies_parsed_at":"2025-04-16T19:52:27.899Z","dependency_job_id":"797d200e-8346-4cca-a111-dae16e4eb45f","html_url":"https://github.com/github/gh-combine","commit_stats":null,"previous_names":["github/gh-combine"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/github/gh-combine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-combine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-combine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-combine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-combine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/gh-combine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-combine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274026706,"owners_count":25209739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","gh-cli","github","golang","pull-requests"],"created_at":"2025-04-03T23:16:43.491Z","updated_at":"2025-09-12T02:16:11.591Z","avatar_url":"https://github.com/github.png","language":"Go","readme":"# gh-combine\n\n[![test](https://github.com/github/gh-combine/actions/workflows/test.yml/badge.svg)](https://github.com/github/gh-combine/actions/workflows/test.yml)\n[![build](https://github.com/github/gh-combine/actions/workflows/build.yml/badge.svg)](https://github.com/github/gh-combine/actions/workflows/build.yml)\n[![lint](https://github.com/github/gh-combine/actions/workflows/lint.yml/badge.svg)](https://github.com/github/gh-combine/actions/workflows/lint.yml)\n[![golangci-lint](https://github.com/github/gh-combine/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/github/gh-combine/actions/workflows/golangci-lint.yml)\n[![release](https://github.com/github/gh-combine/actions/workflows/release.yml/badge.svg)](https://github.com/github/gh-combine/actions/workflows/release.yml)\n![slsa-level3](docs/assets/slsa-level3.svg)\n\nA gh cli extension to automatically combine multiple pull requests into one.\n\n![example](./docs/assets/example.png)\n\n## About ⭐\n\nThis project is a gh cli extension that is used to combine multiple pull requests into one. It is inspired by the [github/combine-prs](https://github.com/github/combine-prs) Action but with a focus on the gh cli.\n\nThe primary use case for this extension is to combine multiple pull requests from dependabot into one. Even though dependabot supports [grouped version updates](https://github.blog/changelog/2023-06-30-grouped-version-updates-for-dependabot-public-beta/), these groups are limited by their type. For example, you cannot have dependabot combine a group of Ruby and JavaScript updates into one pull request. They are treated as separate groups. This extension solves that problem by bundling those updates into one pull request.\n\n## Installation 💻\n\nInstall this gh cli extension by running the following command:\n\n```bash\ngh extension install github/gh-combine\n```\n\n### Upgrading\n\nYou can upgrade this extension by running the following command:\n\n```bash\ngh ext upgrade combine\n```\n\n## Usage 🚀\n\nBefore we get into the usage, there are a few key concepts to understand:\n\n- **Combining**: This is the process of taking multiple pull requests and combining them into one. This is done by creating a new pull request that contains the changes from all the combined pull requests.\n- **Filtering**: If you run this CLI with no flags, it will attempt to combine all open pull requests in the repository. This is not always what you want. You can use the various flags to filter the pull requests that are combined. For example, you can filter by label, branch name, etc. See the `--help` output for more information on the available flags.\n\nIt is also important to understand what the output looks like. By default, the output is a table that shows the following information:\n\n- Shows the repos that were operated on\n- Shows the number of pull requests that were combined per repo\n- Shows the number of total _combined_ pull requests that were created\n- Shows the number of pull requests that were **skipped** (not combined)\n  - **MC**: Merge Conflict - Means that the pull request could not be merged into the combined pull request due to a merge conflict\n  - **DNM**: Did not Match - Means that the pull request did not match the filters (criteria) that were applied\n\n### Demo 📹\n\nhttps://github.com/user-attachments/assets/e993e282-5182-4599-aca8-531a80ec124f\n\n### Basic\n\nBasic usage of the `combine` command to combine multiple dependent pull requests into one for a given repository:\n\n```bash\ngh combine owner/repo\n```\n\n\u003e By default, this command will attempt to combine all open pull requests in the repository. You should use generally use some form of filtering to limit the number of pull requests that are combined. See the examples below for more information.\n\n### Basic with Dependabot\n\nCombine all open pull requests in a repository that are created by dependabot:\n\n```bash\ngh combine owner/repo --dependabot\n```\n\n### In Dry Run Mode\n\nYou can run in dry run mode to see what would happen without actually creating a pull request or combining any pull requests:\n\n```bash\ngh combine owner/repo --dry-run\n```\n\n### With Passing CI\n\nCombine multiple pull requests together but only if their CI checks are passing:\n\n```bash\ngh combine owner/repo --require-ci\n```\n\n### With Passing CI and Approvals\n\n```bash\ngh combine owner/repo --require-ci --require-approved\n```\n\n### Combine Pull Requests from Multiple Repositories\n\n```bash\ngh combine owner/repo1 owner/repo2\n\n# alternatively separate with a comma\ngh combine owner/repo1,owner/repo2\n\n# or use the --owner flag if all the repos are owned by the same owner\ngh combine --owner owner repo1 repo2 repo3\n```\n\n### Use a File to Specify Repositories\n\n```bash\ngh combine --file repos.txt\n```\n\nWhere `repos.txt` is a file with a list of repositories to combine (one per line):\n\n```txt\nowner/repo1\nowner/repo2\nowner/repo3\n```\n\n### Require a Minimum Number of PRs to Combine\n\nBy using the `--minimum` flag you can require a minimum number of pull requests that must be combined for a new PR to be opened. If less than the minimum number of pull requests are combined, the command will exit without opening a new PR.\n\n```bash\ngh combine owner/repo --minimum 3\n```\n\n### Do Not Auto-Close Linked PRs\n\nBy default, the source pull requests that are combined into the new pull request will be automatically closed when the combined Pr merges by adding the `closes` keyword to the new pull request. This can be disabled by using the `--no-autoclose` flag.\n\n```bash\ngh combine owner/repo --no-autoclose\n```\n\n### Only Combine Pull Requests that match a given Label(s)\n\n```bash\ngh combine owner/repo --labels dependencies\n```\n\nYou can also require a set of multiple labels\n\n```bash\ngh combine owner/repo --labels security,dependencies\n```\n\n\u003e Note that the labels are OR'd together. So if a pull request has either label, it will be included in the combined pull request. Meaning that if you use `--labels security,dependencies` and a pull request has the `security` label, it will be included in the combined pull request even if it does not have the `dependencies` label.\n\n### Only Combine Pull Requests that match a given Regex\n\n```bash\ngh combine owner/repo --branch-regex \"dependabot/.*\"\n```\n\n### Only Combine Pull Requests that match a branch prefix\n\n```bash\ngh combine owner/repo --branch-prefix \"dependabot/\"\n```\n\n### Only Combine Pull Requests that match a branch suffix\n\n```bash\ngh combine owner/repo --branch-suffix \"-some-cool-feature\"\n```\n\n### Ignore Pull Requests that have a certain Label(s)\n\n```bash\ngh combine owner/repo --ignore-labels wip,dependencies\n```\n\n\u003e Note that labels are OR'd together. So if a pull request has either label, it will be ignored in the combined pull request. Meaning that if you use `--ignore-labels wip,dependencies` and a pull request has the `wip` label, it will be ignored in the combined pull request even if it does not have the `dependencies` label.\n\n### Update the Resulting Combined Pull Request Branch if Possible\n\n```bash\ngh combine owner/repo --update-branch\n```\n\n### Display Version Information\n\n```bash\ngh combine --version\n```\n\n### Disable Stats Output\n\n```bash\ngh combine owner/repo --no-stats\n```\n\n### Change the Type of Stats Output\n\n```bash\ngh combine owner/repo --output table # default format\ngh combine owner/repo --output json\ngh combine owner/repo --output plain\n```\n\n### Disable Color\n\n```bash\ngh combine owner/repo --no-color\n```\n\n### Running with Debug Logging\n\n```bash\nLOG_LEVEL=DEBUG gh combine owner/repo\n```\n\n## Verifying Release Binaries\n\nThis project uses [goreleaser](https://goreleaser.com/) to build binaries and [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) to publish the provenance of the release.\n\nYou can verify the release binaries by following these steps:\n\n1. Download a release from the [releases page](https://github.com/github/gh-combine/releases).\n2. Verify it `gh attestation verify --owner github ~/Downloads/gh-combine_darwin-arm64` (an example for darwin-arm64).\n\n---\n\nRun `gh combine --help` for more information and full command/options usage.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fgh-combine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fgh-combine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fgh-combine/lists"}