GeezerVison is showing github.com — ci: cleaner · nocksock/opencode@45bc7a6
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/review.yml +3-14Lines changed: 3 additions & 14 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
7 | 7 | jobs: |
8 | 8 | check-guidelines: |
9 | 9 | 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) |
13 | 13 | runs-on: blacksmith-4vcpu-ubuntu-2404 |
14 | 14 | permissions: |
15 | 15 | contents: read |
16 | 16 | pull-requests: write |
17 | 17 | 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 | | - |
29 | 18 | - name: Get PR number |
30 | 19 | id: pr-number |
31 | 20 | run: | |
|