Skip to content

Commit 1746d59

Browse files
authored
ci: add auto_assign_pr (#121)
1 parent 6495ff3 commit 1746d59

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: 'Auto Assign PR'
2+
on:
3+
workflow_call:
4+
pull_request:
5+
types: [opened, reopened]
6+
7+
jobs:
8+
add-reviewers:
9+
name: "Add reviewers to PR"
10+
if: ${{ github.actor != 'dependabot[bot]' }}
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: "Check PR title"
14+
id: is-docs
15+
if: >
16+
startsWith(github.event.pull_request.title, 'docs:')
17+
run: |
18+
OUTPUT=true
19+
echo "::set-output name=isDocs::$OUTPUT"
20+
- name: "echo isDocs"
21+
run: |
22+
echo ${{ steps.is-docs.outputs.isDocs }}
23+
- name: "PR title is docs"
24+
if: ${{steps.is-docs.outputs.isDocs == 'true'}}
25+
uses: pozil/auto-assign-issue@v1
26+
with:
27+
teams: docs-admin
28+
numOfAssignee: 1
29+
allowSelfAssign: false
30+
repo-token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT}}
31+
- name: "PR title is invalid"
32+
if: ${{ steps.is-docs.outputs.isDocs != 'true'}}
33+
uses: pozil/auto-assign-issue@v1
34+
with:
35+
teams: android-triage
36+
numOfAssignee: 1
37+
allowSelfAssign: false
38+
repo-token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT}}

0 commit comments

Comments
 (0)