Skip to content

Commit 45bc7a6

Browse files
committed
ci: cleaner
1 parent 088ebb9 commit 45bc7a6

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

.github/workflows/review.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,14 @@ on:
77
jobs:
88
check-guidelines:
99
if: |
10-
(github.event_name == 'issue_comment' &&
11-
github.event.issue.pull_request &&
12-
startsWith(github.event.comment.body, '/review'))
10+
github.event.issue.pull_request &&
11+
startsWith(github.event.comment.body, '/review') &&
12+
contains(fromJson('["OWNER","MEMBER"]'), github.event.comment.author_association)
1313
runs-on: blacksmith-4vcpu-ubuntu-2404
1414
permissions:
1515
contents: read
1616
pull-requests: write
1717
steps:
18-
- name: Check if user has write permission
19-
if: github.event_name == 'issue_comment'
20-
run: |
21-
PERMISSION=$(gh api /repos/${{ github.repository }}/collaborators/${{ github.event.comment.user.login }}/permission --jq '.permission')
22-
if [[ "$PERMISSION" != "write" && "$PERMISSION" != "admin" ]]; then
23-
echo "User does not have write permission"
24-
exit 1
25-
fi
26-
env:
27-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28-
2918
- name: Get PR number
3019
id: pr-number
3120
run: |

0 commit comments

Comments
 (0)