Integrate gitStream with Claude Code
Automation Examples
Automatically Label Claude Code-Assisted PRs
Automatically apply labels to PRs that are assisted by Claude Code. You can apply labels based on a known list of Claude Code users, PR tags, or by prompting the PR author to indicate if they used Claude Code.
Prompt PR authors to indicate if they used Claude Code for the PR and automatically label the PR if they did. This requires two separate automation files to handle posting the prompt and labeling accordingly.
Configuration Description
Conditions:
- A PR is created
Automation Actions:
- Post a comment prompting the author to indicate if Claude Code assisted the author with writing the code in the PR.
Ask the PR author about Claude Code usage.
Configuration Description
Conditions:
- A PR is updated or merged where the author indicates they used Claude Code via a prompt.
Automation Actions:
- Apply a
🤖 Claude Code
label to the PR
Label PRs where the user indicated Claude Code usage
Automatically apply labels to PRs that are created by known users of generative AI coding tools.
Configuration Description
Conditions:
- The PR author is one of a specified list of contributors
Automation Actions:
- Apply a
🤖 Claude Code
label to the PR
Look for a specific tag in the PR title, description, comments or commit messages and if found add a label to the PR
Configuration Description
Conditions:
- The
#claude_code#
tag is found in any of the PR title, description, comments or commit messages for commits in the PR
Automation Actions:
- Apply a
🤖 Claude Code
label to the PR
Label Claude Code by Tag
# -*- mode: yaml -*-
manifest:
version: 1.0
on:
- comment_added
- commit
- pr_created
automations:
label_claude_code:
if:
- {{ claude_code_tag.pr_title or claude_code_tag.pr_desc or claude_code_tag.pr_comments or claude_code_tag.commit_messages }}
run:
- action: add-label@v1
args:
label: '🤖 Claude Code'
claude_code_tag:
pr_title: {{ pr.title | includes(regex=r/#claude_code#/) }}
pr_desc: {{pr.description | includes(regex=r/#claude_code#/) }}
pr_comments: {{ pr.comments | map(attr='content') | match(regex=r/#claude_code#/) | some }}
commit_messages: {{ branch.commits.messages | match(regex=r/#claude_code#/) | some }}
📈 Track the Business Impact
By labeling PRs assisted by Claude Code, you can measure:
- Time savings (via Cycle Time, Review Time)
- PR risk (via Refactor Rate, CFR)
- Productivity lift from AI tools
Additional Resources
gitStream is a workflow automation tool that enables you to use YAML configuration files to optimize your code review process. Add context to PRs, find code experts for reviews, and automate the merge process to maximize developer productivity.
Learn More about how gitStream Works.
More Automations can be found on the Automation Library and Integrations pages.