Skip to content

fix(action): comment-trigger example only runs for owners, members and collaborators - #1259

Merged
admarble merged 2 commits into
mainfrom
fix/comment-trigger-collaborator-gate
Oct 1, 2026
Merged

admarble merged 2 commits into
mainfrom
fix/comment-trigger-collaborator-gate

Conversation

@admarble

@admarble admarble commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What

The comment-trigger example (sequant-action/examples/comment-trigger.yml) and the matching Option C workflow in docs/features/github-actions-integration.md now run only when the comment author is the repo owner, an organization member or a collaborator:

if: >-
  contains(github.event.comment.body, '@sequant run') &&
  contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)

The docs section also says why the check must stay.

Acceptance criteria

  • AC-1: Every shipped example with an issue_comment trigger gates each job on author_association (OWNER/COLLABORATOR, never CONTRIBUTOR/NONE). Evidence: __tests__/action-comment-trigger-gate.test.ts
  • AC-2: The yaml fence in the docs' Option C section is gated the same way. Evidence: same test file, scoped to that section only.

Users who copied the old example should update their workflow's if: to the one above.

Verification

__tests__/action-comment-trigger-gate.test.ts 2/2. It parses the yaml rather than grepping, and scopes the docs check to the Option C section's fence. tsc --noEmit clean. Prettier's warning on the docs file is pre-existing on main.

Mutation-verified: AC-1 — removed the author_association clause from comment-trigger.yml; every shipped example with an issue_comment trigger is gated failed; restored.

Mutation-verified: AC-2 — removed the author_association clause from the Option C docs workflow; the documented Option C workflow is gated failed; restored.

🤖 Generated with Claude Code

…d collaborators

The issue_comment example and the documented Option C workflow now require github.event.comment.author_association in OWNER/MEMBER/COLLABORATOR. A new test parses every shipped example with an issue_comment trigger, plus the yaml fence in the Option C docs section, and fails if a job is ungated.

Claude-Session: https://claude.ai/code/session_01VpUo5Vzp2kJErZDRxF24iy
Entire-Checkpoint: 34dba514aefd
@admarble
admarble merged commit b62d2f4 into main Oct 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant