Skip to content

Commit 5075733

Browse files
committed
automatic QA assigning
1 parent d3a2501 commit 5075733

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow depend on the content of .github/pull_request_template.md file, which should contain the required sections that the script checks for
2+
# This also works in parallel with .github/workflows/pr-verification.yml which validates PR format
3+
# In contrast to .github/workflows/pr-verification.yml, this workflow is conditional and aims to ease the process of requesting QA review by automatically assigning the QA team whenever a checkbox is marked
4+
5+
# In case that the given checkboxes are marked the script will automatically add netcode-qa team as a reviewer.
6+
7+
name: 'Assign QA Reviewer'
8+
9+
on:
10+
pull_request:
11+
types: [opened, edited, synchronize, reopened]
12+
13+
jobs:
14+
assign-qa:
15+
# This job only runs if the checkbox in the PR description exist and is checked.
16+
if: >
17+
contains(github.event.pull_request.body, '- [x] `Review automated tests`') ||
18+
contains(github.event.pull_request.body, '- [x] `Execute manual tests`')
19+
runs-on: unity-linux-runner
20+
21+
22+
steps:
23+
24+
- name: 'Assign QA Team'
25+
uses: actions/github-script@v7
26+
with:
27+
github-token: ${{ secrets.GH_COM_TOKEN }}
28+
script: |
29+
github.rest.pulls.requestReviewers({
30+
owner: context.repo.owner,
31+
repo: context.repo.repo,
32+
pull_number: context.issue.number,
33+
team_reviewers: ['netcode-qa']
34+
});
35+
console.log('Assigned netcode-qa for review.');

0 commit comments

Comments
 (0)