Skip to content

Commit 5ea9de4

Browse files
committed
chore: restrict mention workflow to users with repo association
1 parent 0cba215 commit 5ea9de4

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/mention.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ on:
1313
jobs:
1414
comment:
1515
if: |
16-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || github.event.action == 'assigned' && github.event.assignee.login == 'claude[bot]')) ||
18-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
19-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude'))
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) ||
17+
(github.event_name == 'issues' && (
18+
(contains(github.event.issue.body, '@claude') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.issue.author_association)) ||
19+
(github.event.action == 'assigned' && github.event.assignee.login == 'claude[bot]')
20+
)) ||
21+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) ||
22+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.review.author_association))
2023
runs-on: ubuntu-latest
2124
permissions:
2225
contents: write

0 commit comments

Comments
 (0)