mirror of
https://github.com/s4u/setup-maven-action.git
synced 2026-02-14 00:03:08 +08:00
39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
name: Auto Approve
|
|
|
|
on:
|
|
pull_request_target
|
|
|
|
permissions:
|
|
pull-requests: write
|
|
contents: write
|
|
|
|
jobs:
|
|
auto-approve:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Dependabot metadata
|
|
if: github.actor == 'dependabot[bot]'
|
|
id: dependabot-metadata
|
|
uses: dependabot/fetch-metadata@v1.1.1
|
|
with:
|
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
- name: Enable auto-merge for Dependabot PRs
|
|
if: >
|
|
github.actor == 'dependabot[bot]'
|
|
&& steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major'
|
|
run: gh pr merge --auto --rebase "$PR_URL"
|
|
env:
|
|
PR_URL: ${{github.event.pull_request.html_url}}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Approve a PR
|
|
if: >
|
|
github.actor == 'dependabot[bot]'
|
|
|| github.actor == 'slawekjaranowski'
|
|
run: gh pr review --approve "$PR_URL"
|
|
env:
|
|
PR_URL: ${{github.event.pull_request.html_url}}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|