forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: automatically approve dependabot PRs (aws#6280)
Right now it falls to @NLG321 to approve all Dependabot PRs. When he gets around to it, it's likely that conflicts have been introduced into the `package.json` and `package-lock.json` files and the PR won't automatically merge anymore. Let's take the human out of the loop and use GitHub Actions to automatically approve Dependabot's PRs, and configure Mergify appropriately for Dependabot PRs.
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Automatically approve PRs made by Dependabot | ||
# | ||
# Written to look at the original author of the PR (instead of the current | ||
# actor) in order to be able to backresolve existing PRs using this action (by | ||
# mass labeling them). Leads to slightly unnecessary spammage of aprovals in a | ||
# PR... | ||
# | ||
# Only does approvals! A different GitHub Action takes care of merging. | ||
name: Auto-approve Dependabot | ||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
- opened | ||
- ready_for_review | ||
- reopened | ||
- synchronize | ||
- unlabeled | ||
- unlocked | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: hmarr/auto-approve-action@7782c7e2bdf62b4d79bdcded8332808fd2f179cd | ||
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'dependabot-preview[bot]' | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters