Skip to content

Add guidance against flippant appeals to obviousness #51

Add guidance against flippant appeals to obviousness

Add guidance against flippant appeals to obviousness #51

Workflow file for this run

# Thin caller for the central Morrison-Lab/gha reusable Claude Code workflow.
# Requires the CLAUDE_CODE_OAUTH_TOKEN repository secret. The calling job grants
# write permissions so Claude (agent mode) can push branches and open PRs;
# `secrets: inherit` passes CLAUDE_CODE_OAUTH_TOKEN through to the reusable
# workflow.
name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
# `assigned` is intentionally NOT triggered: the reusable workflow's
# trusted-author gate checks `github.event.issue.author_association`,
# which describes the issue *author* — not the assigner. A collaborator
# assigning themselves to an outsider's issue would fail the gate, so an
# `assigned` event can't usefully grant access (it would only re-trigger
# on every (re)assignment). Mention @claude in a comment instead.
types: [opened]
pull_request_review:
types: [submitted]
jobs:
claude:
# Caller-side gate: only invoke the reusable workflow when an @claude
# mention is present, so unrelated events don't spawn a (skipped) run. The
# reusable workflow still enforces the trusted-author gate.
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: write # dispatch the review workflow via `gh workflow run`
uses: Morrison-Lab/gha/.github/workflows/claude.yml@v1
secrets: inherit
with:
setup-r: false # psw is a Quarto book with no R package code
install-quarto: true # so Claude can render the book to verify changes
prompt-addendum: |
This is the "Principles of Scientific Writing" Quarto book. The source
is the top-level .qmd chapters listed in _quarto.yml; render with
`quarto render` to verify changes. Follow the SERG lab manual's Quarto
conventions: backticked `pkg::fn()` and Markdown links (no raw HTML) in
.qmd, and US English spelling (add new terms to inst/WORDLIST).