Overview
Set up Claude Code in GitHub Actions to review pull requests, explain failed checks and draft changelog entries from merged work, with a person approving anything before it is published.
Problem or Objective
- Which agents review pull requests?
- Which agents can draft a document section by section and save it in a reusable, structured format?
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Claude Code · GitHub Actions
- Prerequisites
- A GitHub repository with Actions enabled, the Claude GitHub App or your own app, and an API key or subscription token saved as a repository secret.
How It Works
Run /install-github-app from Claude Code, or install the app, add the secret and copy the workflow file yourself; choose only the workflows you want. Before merging the setup change, read it and remove the comment option from the review workflow's prompt, so findings stay in the run log, then try it on a test pull request and add posting only once you approve of what it writes. For a failed check, add a prompt-driven workflow with read access to CI results that writes the likely cause and a proposed fix to the run log, with no permission to push. For a changelog, add a second prompt-driven workflow that summarises merged work since the last release and writes the draft to the log. Check what each job can actually read. Verify every line against the merged pull requests, then publish the changelog and apply any fix yourself.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Claude Code.
- Connect the toolsConnect the tools this workflow relies on: Claude Code, GitHub Actions.
- Check the prerequisitesA GitHub repository with Actions enabled, the Claude GitHub App or your own app, and an API key or subscription token saved as a repository secret.
- Gather your detailsCollect what the prompt asks for: Repository, Previous release tag, Changelog sections, Failed job.
- Run the starter promptPaste the starter prompt below into Claude Code and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at code.claude.com before you rely on it.
Practical Starter Prompt: Draft release notes and explain a failed check
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
In [Repository], summarise the pull requests merged since [Previous release tag] as a draft changelog grouped into [Changelog sections], with the pull request number beside every line. Then, for the failed job [Failed job], read the log you can access, quote the first real error, give the likely cause and propose a fix, saying how confident you are. Write everything to the run log only. Do not post comments, push commits, create releases or merge; wait for my approval for any of those.Keep output in the run log until you approve it, check each changelog line against its pull request, and publish or fix things yourself.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. Anthropic's pages document the GitHub Action, prompt-driven and mention-triggered runs, and name release notes and overnight CI failure analysis as uses. They do not cover your pipeline, and review findings or summaries from it have not been checked.
Limitations and Considerations
Mentioning @claude in a pull request or issue can lead to pushed commits, so grant the workflow only the permissions it needs and review changes before merging. The setup stores an API key or subscription token as a repository secret. Pull request text and logs can contain instructions written by others; check who is able to trigger runs. Check what API usage and Actions minutes will cost for your repository. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Official Website
The official site of the main tool or project in this use case.
Visit Website (opens in a new tab)code.claude.com
Related Videos
About anthropics/claude-code
The SECRET Claude Code Upgrade That Has Everyone Going Nuts (Full Guide) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)About anthropics/claude-code
The only Claude Code guide you'll ever need (Opus 4.5) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Claude Code GitHub Actions - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 2 Dec 2026, 13:21 UTC
What this source supports
- Mention @claude in a pull request or issue comment to have Claude analyze code, implement changes, and push commits.
- Without it, Claude posts nothing, and you read the findings in the workflow run log.
- By default, results appear in the workflow run log rather than a comment.
- Overview - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 2 Dec 2026, 13:21 UTC
What this source supports
- Claude Code handles the tedious tasks that eat up your day: writing tests for untested code, fixing lint errors across a project, resolving merge conflicts, updating dependencies, and writing release notes.
- Run Claude on a schedule to automate work that repeats: morning PR reviews, overnight CI failure analysis, weekly dependency audits, or syncing docs after PRs merge.

