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,82 @@ 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
+
38
+
```bash
39
+
gh combine owner/repo
40
+
```
41
+
42
+
> By default, this command runs with the `--branch-prefix dependabot/` flag set. All branches in the `owner/repo` repository that start with `dependabot/` will be combined.
43
+
44
+
### With Passing CI
45
+
46
+
Combine multiple pull requests together but only if their CI checks are passing:
### Combine Pull Requests from Multiple Repositories
59
+
60
+
```bash
61
+
gh combine owner/repo1 owner/repo2
62
+
63
+
# alternatively separate with a comma
64
+
gh combine owner/repo1,owner/repo2
65
+
66
+
# or use the --owner flag if all the repos are owned by the same owner
67
+
gh combine --owner owner repo1 repo2 repo3
68
+
```
69
+
70
+
### Use a File to Specify Repositories
71
+
72
+
```bash
73
+
gh combine --file repos.txt
74
+
```
75
+
76
+
Where `repos.txt` is a file with a list of repositories to combine (one per line):
77
+
78
+
```txt
79
+
owner/repo1
80
+
owner/repo2
81
+
owner/repo3
82
+
```
83
+
84
+
### Require a Minimum Number of PRs to Combine
85
+
86
+
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.
87
+
28
88
```bash
29
-
gh combine TODO
89
+
gh combine owner/repo --minimum 3
30
90
```
31
91
32
-
Run `gh combine --help` for more information.
92
+
### Only Combine Pull Requests that match a given Label
0 commit comments