You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
+
10
16
## Installation 💻
11
17
12
18
Install this gh cli extension by running the following command:
@@ -25,8 +31,74 @@ gh ext upgrade combine
25
31
26
32
## Usage 🚀
27
33
34
+
### Basic
35
+
36
+
Basic usage of the `combine` command to combine multiple dependent pull requests into one for a given repository:
37
+
28
38
```bash
29
-
gh combine TODO
39
+
gh combine owner/repo
30
40
```
31
41
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:
### 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
0 commit comments