Conversation
Three related changes that extend the AI automation surface on
HarperFast/oauth beyond the baseline review.
1. .github/workflows/claude-mention.yml (new).
Triggers on `issue_comment` and `pull_request_review_comment`
containing `@claude`. Runs Claude in agent mode: read the
comment, do the work, commit, push to the PR branch (or open a
new branch for issue-originated asks). Gated to HarperFast org
OWNER / MEMBER / COLLABORATOR via author_association on the
comment. Concurrency queued (not cancelled) per PR/issue —
explicit asks deserve to complete.
Permissions: contents/pull-requests/issues write. Allowlist
covers the five gh helpers, git, npm, bun, and the filesystem
Read/Write/Edit/Grep/Glob tools.
Node 22 + Bun latest set up before the action so Claude can
actually run `npm test` / `bun test` as instructed in the
prompt (no conditional "if Bun is installed" branch — it always
is).
2. .github/workflows/claude-issue-to-pr.yml (new).
Triggers on `issues: [labeled]` when the label name matches
`claude-fix:*`. Narrow scope per suffix (typo / docs / deps /
bug). Same env setup + gate as the mention workflow but trusts
the label (not a comment body) for the ask.
Prompt explicitly enumerates the label-scoped latitude and
lists out-of-scope work that should be rejected with a comment
on the issue rather than a speculative PR.
3. .github/workflows/claude-review.yml (update).
- Tightened the review-prompt Tools section: do NOT write files
(to `.claude-pr/`, `/tmp`, or anywhere). A run on PR #48
burned ~2/25 turns on Write-denial retries because Claude
tried to save review drafts to disk. Explicit prohibition in
the prompt stops the retries.
- Interpolated the short repo name via
`${{ github.event.repository.name }}` into the log title,
body, and `repo:<name>` label. Removes the three hardcoded
`oauth` strings so the workflow can be copied to /harper,
/harper-pro, /nextjs with zero source edits.
A future follow-up could factor all three into reusable workflows
(central repo → tiny wrappers) once we have 2+ consumer repos.
Prereq for issue-to-pr: create the `claude-fix:typo`, `:docs`,
`:deps`, `:bug` labels on the reviewed repo. Not automated here
(would require cross-repo label sync).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the AI automation surface on
/oauthbeyond baseline review.1.
claude-mention.yml(new)Triggers on
@claudein PR comments or inline review comments. Runs the action in agent mode — the user's comment is the prompt; Claude can edit, commit, and push. Gated to HarperFast org members/collaborators viaauthor_associationon the comment.Sets up Node 22 + Bun latest so Claude can actually run
npm testandbun testper the prompt instructions.2.
claude-issue-to-pr.yml(new)Triggers on
issues: [labeled]when the label name starts withclaude-fix:. Four suffixes scope the latitude:claude-fix:typoclaude-fix:docsclaude-fix:depsclaude-fix:bugPrompt explicitly lists out-of-scope work (new API, architecture changes) and instructs Claude to comment on the issue instead of opening a speculative PR when the ask exceeds scope.
Gated on issue
author_association— only issues opened by org members/collaborators will have label-adds trigger Claude. Keeps the trigger surface tight during calibration.3.
claude-review.yml(tightened)Two changes in the existing review workflow:
Writedenial retries (Claude kept trying to save review drafts to.claude-pr/pr48_review.md). TheWrite/Edittools are already excluded from the allowlist — the prompt now explicitly tells Claude not to try.repo:<name>label now use${{ github.event.repository.name }}instead of hardcodedoauth. Copying this workflow to/harper,/harper-pro,/nextjsnow requires zero source edits in the log step.Prereqs for issue-to-pr
claude-fix:typo,claude-fix:docs,claude-fix:deps,claude-fix:bugmust exist on the repo. Create with:ANTHROPIC_API_KEYandAI_REVIEW_LOG_TOKENsecrets already on the repo (from prior workflow PRs).Future
When we expand to a second repo, factor all three workflows into reusable workflows (central repo + tiny per-repo wrappers) for real DRY.
Test plan
claude-fix:typofor a known trivial typo@claudea PR with a small ask