-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
File sync from s4u/.github - Auto Approve by gh cli
- Loading branch information
GitHub Action
committed
Aug 28, 2021
1 parent
cdb1f06
commit 8f6a7ee
Showing
1 changed file
with
23 additions
and
10 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 |
---|---|---|
@@ -1,25 +1,38 @@ | ||
name: Auto approve | ||
name: Auto Approve | ||
|
||
on: | ||
pull_request_target | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
auto-approve: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: alexwilson/[email protected] | ||
- name: Dependabot metadata | ||
if: github.actor == 'dependabot[bot]' | ||
id: dependabot-metadata | ||
uses: dependabot/[email protected] | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Enable auto-merge for Dependabot PRs | ||
if: > | ||
github.actor == 'dependabot[bot]' | ||
|| github.actor == 'dependabot-preview[bot]' | ||
with: | ||
merge-method: "REBASE" | ||
github-token: "${{ secrets.TECH_TOKEN }}" | ||
&& steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' | ||
run: gh pr merge --auto --rebase "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: hmarr/[email protected] | ||
- name: Approve a PR | ||
if: > | ||
github.actor == 'dependabot[bot]' | ||
|| github.actor == 'dependabot-preview[bot]' | ||
|| github.actor == 'slawekjaranowski' | ||
with: | ||
github-token: "${{ secrets.TECH_TOKEN }}" | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |