-
-
Notifications
You must be signed in to change notification settings - Fork 81
33 lines (30 loc) · 1.29 KB
/
pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: PR
on: pull_request_target
jobs:
assign-author:
if: github.event.action == 'opened'
runs-on: ubuntu-latest
steps:
- uses: samspills/[email protected]
with:
repo-token: ${{ secrets.BOT_TOKEN }}
approve-dependabot-pr:
if: github.event.action == 'opened' && github.event.pull_request.user.login == 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: dependabot/[email protected]
id: dependabot-metadata
- name: Merge patch and minor updates
if: steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' || steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
- name: Request manual review for major updates
if: steps.dependabot-metadata.outputs.update-type == 'version-update:semver-major' && toJSON(github.event.pull_request.requested_reviewers) == '[]'
run: gh pr edit "$PR_URL" --add-reviewer JonasWanke
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}