Skip to content

ci: add caller-level @claude filter + clarify pinact comment#18

Merged
autholykos merged 1 commit into
mainfrom
claude/add-caller-filter
May 17, 2026
Merged

ci: add caller-level @claude filter + clarify pinact comment#18
autholykos merged 1 commit into
mainfrom
claude/add-caller-filter

Conversation

@autholykos

Copy link
Copy Markdown
Contributor

Summary

Refines the org-wide Claude Code workflow based on Copilot review feedback on the rollout PRs (pituitary#410, stroma-rs#23). Two changes to both .github/workflows/claude.yml and workflow-templates/claude.yml:

1. Add caller-level @claude + author filter

Previously, every issue_comment / pull_request_review_comment / issues:opened / pull_request_review event would spin up a runner and call the reusable workflow, which then no-op'd via its own if: filter. With job-level if: on the caller, no runner is allocated for non-@claude events — meaningful savings on active repos like pituitary (#410 PRs deep) where most events are not @claude mentions.

The reusable keeps its identical filter as defense-in-depth.

2. Clarify the pinact inline comment

Before: matching exception lives in .pinact.yaml
After: pinact exception declared org-wide in nantobv/.github/.pinact.yaml

The exception isn't in the caller repo's .pinact.yaml (most repos don't have one); it's in this repo's .pinact.yaml, which is what pinact reads when the org-wide reusable workflow is invoked.

Propagation plan (after this merges)

  • Update the 3 still-open rollout PRs (pituitary#410, stroma-rs#23, stroma#195) to the new template
  • Open follow-up PRs on the 5 already-merged repos (ccd, hippocampus, thalamus, lifeloop, stroma-benchmarks) to converge on the same caller

Every nantobv repo's claude.yml ends up byte-identical to workflow-templates/claude.yml.

🤖 Generated with Claude Code

Two improvements to both the in-repo caller and the workflow template,
addressing Copilot review comments on the rollout PRs (pituitary#410
and stroma-rs#23 specifically, plus implicit benefit to the 5 already-
merged repos that adopted the prior template).

1. Add job-level `if:` filter on the caller. The reusable already has
   the same filter — but it only no-ops *after* GitHub allocates a
   runner and fetches/parses the reusable workflow (~5-10s per event).
   With the caller-level if, no runner is allocated for non-@claude
   events on active repos. The reusable keeps the filter as defense-
   in-depth.

2. Update the inline pinact comment from
   "matching exception lives in .pinact.yaml"
   to
   "pinact exception declared org-wide in nantobv/.github/.pinact.yaml"
   Caller-side `.pinact.yaml` doesn't need the exception (and most
   nantobv repos don't have one); the exception lives in the org's
   shared config repo, which is where pinact runs from when the
   org-wide reusable workflow is invoked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 17, 2026 17:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refines the org-wide Claude Code workflow by adding a caller-level if: filter that mirrors the reusable workflow's existing filter, avoiding the cost of spinning up a runner just to no-op on non-@claude events. Also clarifies the inline zizmor: ignore[unpinned-uses] comment to point at the org-wide .pinact.yaml rather than the (often non-existent) caller-repo file.

Changes:

  • Add a job-level if: to the claude job in both the active workflow and the workflow template, gating on @claude mention + OWNER/MEMBER/COLLABORATOR author_association across all four trigger events.
  • Update the inline comment on the uses: line to explicitly identify the pinact exception's location as nantobv/.github/.pinact.yaml.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
workflow-templates/claude.yml Adds caller-level @claude/author filter and clarifies pinact exception comment in the org template.
.github/workflows/claude.yml Same caller-level filter + comment clarification applied to this repo's own workflow, keeping it byte-aligned with the template.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@autholykos autholykos merged commit c87ed9b into main May 17, 2026
6 checks passed
@autholykos autholykos deleted the claude/add-caller-filter branch May 17, 2026 17:55
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.

2 participants