Skip to content

Commit b87b7a4

Browse files
committed
update readme
1 parent 58f259d commit b87b7a4

File tree

1 file changed

+74
-2
lines changed

1 file changed

+74
-2
lines changed

README.md

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ A gh cli extension to automatically combine multiple pull requests into one.
77
[![test](https://github.com/github/gh-combine/actions/workflows/test.yml/badge.svg)](https://github.com/github/gh-combine/actions/workflows/test.yml)
88
[![release](https://github.com/github/gh-combine/actions/workflows/release.yml/badge.svg)](https://github.com/github/gh-combine/actions/workflows/release.yml)
99

10+
## About ⭐
11+
12+
This 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.
13+
14+
The 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.
15+
1016
## Installation 💻
1117

1218
Install this gh cli extension by running the following command:
@@ -25,8 +31,74 @@ gh ext upgrade combine
2531

2632
## Usage 🚀
2733

34+
### Basic
35+
36+
Basic usage of the `combine` command to combine multiple dependent pull requests into one for a given repository:
37+
2838
```bash
29-
gh combine TODO
39+
gh combine owner/repo
3040
```
3141

32-
Run `gh combine --help` for more information.
42+
### With Passing CI
43+
44+
Combine multiple pull requests together but only if their CI checks are passing:
45+
46+
```bash
47+
gh combine owner/repo --require-ci
48+
```
49+
50+
### With Passing CI and Approvals
51+
52+
```bash
53+
gh combine owner/repo --require-ci --require-approved
54+
```
55+
56+
### Combine Pull Requests from Multiple Repositories
57+
58+
```bash
59+
gh combine owner/repo1 owner/repo2
60+
61+
# alternatively separate with a comma
62+
gh combine owner/repo1,owner/repo2
63+
64+
# or use the --owner flag if all the repos are owned by the same owner
65+
gh combine --owner owner repo1 repo2 repo3
66+
```
67+
68+
### Use a File to Specify Repositories
69+
70+
```bash
71+
gh combine --file repos.txt
72+
```
73+
74+
Where `repos.txt` is a file with a list of repositories to combine (one per line):
75+
76+
```txt
77+
owner/repo1
78+
owner/repo2
79+
owner/repo3
80+
```
81+
82+
### Require a Minimum Number of PRs to Combine
83+
84+
By 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.
85+
86+
```bash
87+
gh combine owner/repo --minimum 3
88+
```
89+
90+
### Only Combine Pull Requests that match a given Label
91+
92+
```bash
93+
gh combine owner/repo --label dependencies
94+
```
95+
96+
You can also require a set of multiple labels
97+
98+
```bash
99+
gh combine owner/repo --labels security,dependencies
100+
```
101+
102+
---
103+
104+
Run `gh combine --help` for more information and full command/options usage.

0 commit comments

Comments
 (0)