Skip to content

Commit f4f62b0

Browse files
committed
add review event + github token
1 parent 1f6f028 commit f4f62b0

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/commit-review-cleanup.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ name: Commit Review Cleanup
22

33
on:
44
pull_request_review:
5-
types: [ submitted ]
5+
types: [submitted]
66
# branches:
77
# - "commit-review-**"
88

9+
env:
10+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
912
jobs:
1013
cleanup:
1114
runs-on: ubuntu-latest
1215
steps:
1316
- run: |
14-
PR_URL="/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}"
17+
PR_URL="/repos/${{ github.repository }}/pulls/${{ github.event.number }}"
1518
REMAINING=$(gh api $PR_URL/requested_reviewers | jq 'length')
1619
1720
if $REMAINING -eq 0; then

review.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"action": "submitted",
3+
"number": 2,
4+
"head": {
5+
"ref": "test-1"
6+
},
7+
"base": {
8+
"ref": "test-2"
9+
}
10+
}

0 commit comments

Comments
 (0)