Skip to content

Commit 90ffb04

Browse files
committed
Merge feat/self-test-ready into feat/self-test-rerun
2 parents dd228c9 + 20a363c commit 90ffb04

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,9 @@ Only the reusable workflow's `react` job uses that permission; its other jobs ho
8181
The calling job also has an `if:` that starts the reusable workflow only for comments on pull requests that mention `@cipherstash-agent`, and for review requests for `cipherstash-agent`, to save starting runners for every other comment and request.
8282
The reusable workflow still checks every rule itself.
8383

84-
For comments, the `if:` also lets through only commenters whose `author_association` is `OWNER`, `MEMBER` or `COLLABORATOR`.
85-
This is a performance filter only, so a comment from anyone else does not start a runner.
86-
It is not the gate: the reusable workflow's team membership check decides who may request a review.
87-
One caveat: GitHub reports `MEMBER` only for people whose membership of the organisation is public, or when the token can see private members. A team member whose membership is private may be shown as `CONTRIBUTOR` or `NONE`, and then their comment does not start a run at all, even though they are on the team. Such a person can make their membership public, or the repository can remove the `author_association` test from the example's `if:`.
84+
For comments, the mention is the only filter: the `if:` does not look at the commenter's `author_association`.
85+
GitHub reports `MEMBER` only for people whose membership of the organisation is public, or when the token can see private members, so a team member whose membership is private shows as `CONTRIBUTOR` or `NONE`, and a filter on the association would skip their comment command without any run or message.
86+
The reusable workflow's team membership check is the gate that decides who may request a review; a comment from anyone else starts a run that ends without a request (see `not-a-team-member` below).
8887
For `review_requested` events, the `if:` also lets through only requests for `cipherstash-agent`, so a request for another reviewer does not start the workflow. Other `pull_request` events are not filtered.
8988
If you change the `review-agent` input, change the `@cipherstash-agent` in the `if:` to match.
9089

‎examples/claude-review.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ jobs:
3333
# Saves starting runners for comments that cannot be a comment command: only comments on pull requests that mention
3434
# the review agent (contains ignores case) go on. The shared workflow still checks every rule itself.
3535
# The mention must match the shared workflow's `review-agent` input: change it here too if you change that input.
36-
# The author_association test is a performance filter only, so a comment from anyone else does not start a runner.
37-
# It is not the gate: the shared workflow's team membership check decides who may request a review.
36+
# There is no filter on the commenter's author_association: GitHub reports a team member whose organisation
37+
# membership is private as CONTRIBUTOR or NONE, so such a filter would silently skip their commands. The shared
38+
# workflow's team membership check is the gate, and the mention is the only filter on comments.
3839
# A review request for any reviewer other than the review agent does not start the workflow. Other pull_request
3940
# events are not filtered.
4041
if: >-
4142
(github.event_name != 'issue_comment' || (
4243
github.event.issue.pull_request
4344
&& contains(github.event.comment.body, '@cipherstash-agent')
44-
&& contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
4545
))
4646
&& (github.event.action != 'review_requested' || github.event.requested_reviewer.login == 'cipherstash-agent')
4747
# The shared workflow's jobs can hold no more than this. Only its reaction job uses it, to add 👀 to a comment

0 commit comments

Comments
 (0)