File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : PR Review
2+
3+ on :
4+ workflow_run :
5+ workflows : [Test]
6+ types : [completed]
7+
8+ permissions :
9+ pull-requests : write
10+ actions : read
11+ contents : read
12+
13+ jobs :
14+ review :
15+ runs-on : ubuntu-latest
16+ if : ${{ github.event.workflow_run.event == 'pull_request' }}
17+
18+ steps :
19+ - name : Download PR number
20+ uses : actions/download-artifact@v4
21+ with :
22+ name : pr-number
23+ run-id : ${{ github.event.workflow_run.id }}
24+ github-token : ${{ github.token }}
25+
26+ - name : Read PR number
27+ id : pr
28+ run : echo "number=$(cat pr-number.txt)" >> "$GITHUB_OUTPUT"
29+
30+ - uses : mate-academy/auto-approve-action@v2
31+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
32+ with :
33+ github-token : ${{ github.token }}
34+ pull-request-number : ${{ steps.pr.outputs.number }}
35+
36+ - uses : mate-academy/auto-reject-action@v2
37+ if : ${{ github.event.workflow_run.conclusion == 'failure' }}
38+ with :
39+ github-token : ${{ github.token }}
40+ pull-request-number : ${{ steps.pr.outputs.number }}
You can’t perform that action at this time.
0 commit comments