GitHub: add PR conflict and author assignment workflows

This commit is contained in:
Christian Poessinger 2021-08-01 14:32:30 +02:00
parent 392dc16672
commit 6f679441bd
3 changed files with 64 additions and 0 deletions

19
.github/reviewers.yml vendored Normal file
View File

@ -0,0 +1,19 @@
---
docker-vyos/**:
- sever-sever
- DmitriyEshenko
vars/**:
- c-po
- UnicronNL
.github/**:
- c-po
- dmbaturin
- UnicronNL
'**':
- c-po
- dmbaturin
- jestabro
- UnicronNL

View File

@ -0,0 +1,27 @@
name: "PR Triage"
on:
pull_request_target:
types: [opened, reopened, ready_for_review, locked]
permissions:
pull-requests: write
jobs:
# https://github.com/marketplace/actions/auto-author-assign
assign-author:
runs-on: ubuntu-latest
steps:
- name: "Assign Author to PR"
uses: toshimaru/auto-author-assign@v1.3.5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/shufo/auto-assign-reviewer-by-files
assign_reviewer:
runs-on: ubuntu-latest
steps:
- name: Request review based on files changes and/or groups the author belongs to
uses: shufo/auto-assign-reviewer-by-files@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: .github/reviewers.yml

18
.github/workflows/pr-conflicts.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: "PR Conflicts checker"
on:
pull_request_target:
types: [synchronize]
jobs:
Conflict_Check:
name: 'Check PR status: conflicts and resolution'
runs-on: ubuntu-18.04
steps:
- name: check if PRs are dirty
uses: eps1lon/actions-label-merge-conflict@releases/2.x
with:
dirtyLabel: "state: conflict"
removeOnDirtyLabel: "state: conflict resolved"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."