Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maadhattah/combine-dependabot-prs
Combine multiple Dependabot PRs into a single PR to simplify dependency updates
https://github.com/maadhattah/combine-dependabot-prs
Last synced: 3 months ago
JSON representation
Combine multiple Dependabot PRs into a single PR to simplify dependency updates
- Host: GitHub
- URL: https://github.com/maadhattah/combine-dependabot-prs
- Owner: mAAdhaTTah
- License: mit
- Created: 2021-06-06T17:52:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-28T09:58:17.000Z (over 2 years ago)
- Last Synced: 2024-10-26T08:42:37.169Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 75.2 KB
- Stars: 17
- Watchers: 4
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# combine-dependabot-prs
CLI + GitHub action to combine dependabot PRs on GitHub repositories.
## How to Use
## CLI
The CLI is published on npm so it can be run with all of the usual node methods. The easiest is `npx`:
```bash
$ npx combine-dependabot-prs me/my-repo
```Substitute `me` & `my-repo` with the owner & repo you're targeting.
You can also install it globally:
```bash
$ npm i -g combine-dependabot-prs
$ combine-dependabot-prs me/my-repo
```You'll need to create a [Personal Access Token](https://github.com/settings/tokens) to use with the CLI. You can provide it one of three ways:
1. With `--github-token` flag
2. With `GITHUB_TOKEN` env var
3. Via prompt at runtime### GitHub Action
Create a new action in your repo by creating a file called `.github/workflows/combine.yml`. In that file drop this contents:
```yml
name: "Combine Dependabot PRs"
on:
workflow_dispatch:jobs:
combine-prs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: maadhattah/combine-dependabot-prs@main
with:
branchPrefix: "dependabot"
mustBeGreen: true
combineBranchName: "combined-prs"
includeLabel: ""
ignoreLabel: "nocombine"
baseBranch: "main"
openPR: true
allowSkipped: false
```These are the defaults, and any or all can be customized or omitted.
Once you've added this workflow to the repository (you'll need to merge it into your main branch first), go to your "Actions" tab, and click the newly added workflow. Then click "Run workflow", and the green "Run workflow" button to start the job. When the workflow succeeds, a new PR will be opened in your repository with the combined dependency bumps.