diff --git a/.github/workflows/pr-fix.yaml b/.github/workflows/pr-fix.yaml new file mode 100644 index 0000000..eeb03af --- /dev/null +++ b/.github/workflows/pr-fix.yaml @@ -0,0 +1,46 @@ +name: Claude PR Address Feedback + +# Claude fix — turns outstanding review feedback into commits. +# +# When it runs: on demand only, never automatically. Reply to a review comment, +# or add a top-level PR comment, containing `@claude-fix`. +# - reply on a specific review thread -> fixes only that thread +# - top-level PR comment -> fixes all unresolved threads +# +# What it does: checks out the PR branch, reads the unresolved review threads +# (GraphQL, so resolution state is accurate), makes the code changes, runs +# focused validation, commits and pushes to the PR branch, posts a summary +# comment, then resolves the threads it actually addressed. Resolved threads are +# ignored entirely. If the branch moved under it, it skips the push rather than +# force-pushing, and asks you to re-trigger. Fork PRs are skipped. +# +# This file is only a thin caller. The workflow, the fix prompt and the coding +# standards all live in tradingtechnologies/tt-pipeline-github-actions: +# workflow .github/workflows/claude_pr_fix.yaml +# standards standards/-standards.md (only those matching languages +# present in the diff are read) +# docs .github/docs/workflows/claude_pr_workflows.md +# +# Both the prompt and the standards are overridable per repo, with no change to +# this file: +# - CLAUDE.md in the repo root is read as authoritative project rules +# - .github/standards/-standards.md replaces the bundled file of the +# same name; bundled files you don't override stay in effect +# - .github/fix-override.md wins over conflicting parts of the shipped fix +# prompt +# - behaviour knobs (trigger_phrase, model, timeout_minutes, ...) are `with:` +# inputs on the reusable workflow +on: + pull_request_review_comment: + types: [created] + issue_comment: + types: [created] + pull_request_review: + types: [submitted] + +jobs: + fix: + uses: tradingtechnologies/tt-pipeline-github-actions/.github/workflows/claude_pr_fix.yaml@main + secrets: + GH_BEDROCK_IAM: ${{ secrets.GH_BEDROCK_IAM }} + STANDARDS_READ_TOKEN: ${{ secrets.STANDARDS_READ_TOKEN }} diff --git a/.github/workflows/pr-review.yaml b/.github/workflows/pr-review.yaml new file mode 100644 index 0000000..fb994cc --- /dev/null +++ b/.github/workflows/pr-review.yaml @@ -0,0 +1,42 @@ +name: Claude PR Review + +# Automatic Claude code review for pull requests. +# +# When it runs: on every PR raised in this repo — whether opened directly or +# created as a draft and later marked ready for review. Claude reads the diff +# and posts inline review comments on it. Findings carry a confidence score; +# anything below the threshold (default 76) is dropped rather than posted. +# +# On demand: add a top-level PR comment containing `@claude-review`. +# +# This file is only a thin caller. The workflow, the review prompt and the +# coding standards all live in tradingtechnologies/tt-pipeline-github-actions: +# workflow .github/workflows/claude_pr_review.yaml +# standards standards/-standards.md (only those matching languages +# present in the diff are read) +# docs .github/docs/workflows/claude_pr_workflows.md +# +# Both the prompt and the standards are overridable per repo, with no change to +# this file: +# - CLAUDE.md in the repo root is read as authoritative project rules +# - .github/standards/-standards.md replaces the bundled file of the +# same name; bundled files you don't override stay in effect, and a new +# filename adds a language +# - .github/prompt-override.md wins over conflicting parts of the shipped +# review prompt +# - behaviour knobs (confidence_threshold, trigger_phrase, model, +# timeout_minutes, ...) are `with:` inputs on the reusable workflow +on: + pull_request: + types: [opened, ready_for_review] + pull_request_review_comment: + types: [created] + issue_comment: + types: [created] + +jobs: + review: + uses: tradingtechnologies/tt-pipeline-github-actions/.github/workflows/claude_pr_review.yaml@main + secrets: + GH_BEDROCK_IAM: ${{ secrets.GH_BEDROCK_IAM }} + STANDARDS_READ_TOKEN: ${{ secrets.STANDARDS_READ_TOKEN }}