Claude GitHub Automation
This project has GitHub Actions workflows that use Claude Code for autonomous issue implementation, incremental task progress, and CI follow-up. Additionally, Claude Code is used to review PRs and Dependabot PRs.
Use Cases
| I want to... | Do this |
|---|---|
| Fix a bug or implement a well-defined feature | Apply the claude label to the issue |
| Understand an issue before Claude starts coding | Comment @claude draft a plan for this on the issue |
| Work through a large project one reviewable step at a time | Create a checklist issue with the claude label |
| Ask a question, request a specific change, or point Claude at a review comment | Comment @claude ... on the issue or PR |
Automatic behaviours (no action needed):
- PR Code Review — every non-fork, non-Dependabot PR, draft or not, automatically receives a Claude code review with findings posted as inline diff comments. How it works
- Auto-repair — Claude fixes its own CI failures and addresses reviewer comments automatically, so PRs are in a clean state by the time you review them. How it works
- Dependabot review — every Dependabot PR includes a Claude-written assessment: what changed, whether anything is breaking, and a clear merge recommendation, saving engineers time. How it works
How to Use
1) Implementing a single issue
Write the issue clearly — the more specific it is about expected behaviour and relevant files, the better the result. Then:
- Open the GitHub issue
- Apply the
claudelabel - Claude creates a
claude/<issue-number>-<date>-<time>branch (e.g.claude/123-20240518-143022), implements the work, and opens a PR with theclaudelabel
Review and merge the PR as normal. Automatic follow-up will address any CI failures or review comments on the PR.
2) Working through a multi-task project
Use this when you have a larger project — a multi-step refactor, a new feature with several components, or a batch of related tasks — where you want to review each piece before the next one begins.
- Create a GitHub issue using the issue format below and apply the
claudelabel - Claude picks up the oldest eligible issue once a day at 2am UTC and implements one unchecked task
- Claude opens a PR for that task — review and merge before the next task runs
- The cycle repeats until all tasks are checked off
To run immediately without waiting for the daily schedule: Actions > Claude Code > Run workflow, then enter the issue number.
3) Asking or directing Claude with @claude
Use this to ask Claude a question in context, request a specific change to an existing PR, or have Claude address review feedback directly. Mention @claude in:
- An issue comment — to ask a question or kick off an implementation
- A PR comment — to request a specific code change
- An inline PR review comment — to point Claude at a specific line and have it act on that feedback
- A PR review body — to have Claude respond to your review feedback
Claude will push changes to the branch or reply in a new comment.
Note
This requires write access to the repository. @claude only responds to comments and reviews from people with write access or higher — everyone else's mention fails rather than getting a response. If you're an external contributor without write access, ask a maintainer to invoke Claude on your behalf.
Example prompts:
| Situation | What to comment |
|---|---|
| You want a plan before any code is written | @claude draft a plan for this issue |
| Your PR is missing test coverage | @claude write unit tests for the changes in this PR |
| A bot (e.g. Sentry, CodeClimate) left a review comment | @claude address the review comment from <bot name> |
| You want to understand what a file or function does | @claude explain how X works |
| CI is failing and you want Claude to investigate | @claude the CI is failing — can you diagnose and fix it? |
Issue Format for multi-task projects
## Goal
Brief description of what the project aims to achieve.
## Context
Optional background info Claude should know about.
## Tasks
### Task 1: Short description
- [ ] Task 1
Detailed context for this task. Include relevant file paths, expected
behaviour, edge cases, or links to related code.
### Task 2: Short description
- [ ] Task 2
More context here. The more specific you are about what "done" looks
like, the better the result.
### Task 3: Already completed
- [x] Task 3
### Task 4: Blocked task
- [ ] blocked: Task 4 - explain why
## Learnings
<!-- Claude updates this section with discoveries -->
Each task gets its own section with a checkbox and a context block. Claude uses the checkbox to track progress — keep it on its own line.
Automatic Workflows
Automatic Follow-up
After Claude opens a PR, one round of fixes runs automatically when the Lint and Test workflow completes — whether it passed or failed. This applies only to claude/** branches — it does not trigger on regular developer PRs.
What you'll see:
- If CI failed, Claude fixes lint, type, test, and lock file issues and pushes a commit
- If there are open review comments, Claude addresses actionable ones
- A summary comment is added to the PR describing what was changed, or confirming no changes were needed
- The
claude-followup-donelabel is applied unconditionally to prevent a second round
One round only. If CI still fails after the follow-up, address the remaining issues manually or trigger a new run via @claude in a PR comment.
Dependabot PR Review
This workflow runs automatically on every Dependabot PR. It:
- Identifies all changed dependencies and their version ranges
- Fetches changelogs and release notes for each package
- Assesses breaking changes and security impact against the OCS codebase
- Posts a review comment with a risk level (LOW/MEDIUM/HIGH) and a merge recommendation (APPROVE / REVIEW_NEEDED / HOLD)
This workflow can also be triggered manually via Actions > Claude Dependabot PR Review > Run workflow, providing a PR number.
PR Code Review
Every non-fork, non-Dependabot PR, including drafts, triggers an automated code review in two stages. OpenCodeReview runs first and posts findings as inline comments. If it finds nothing, the Claude review runs and posts its findings as inline comments on the changed lines. If OCR has findings, fix them and push; the Claude review runs on that push. The Automated review verdict check fails while either stage has findings.
It runs when a PR is opened, when it is marked ready for review, and on every push, so you get feedback while the PR is still a draft. There is no manual trigger; to get a fresh review, push a new commit.
Note
Pull requests from a fork do not trigger this automatic review. Claude Code actions require write access, so an external contributor should ask a maintainer trigger a Claude review.
Maintaining These Workflows
For engineers responsible for extending, debugging, or operating the Claude workflows, see README-claude-workflows.md in the repository's .github/workflows directory on GitHub.