Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/claude-issue-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Respond to @claude mentions in issues

on:
issues:
types: [opened, edited]
issue_comment:
types: [created, edited]

jobs:
claude-response:
runs-on: ubuntu-latest
permissions:
issues: write
contents: read

steps:
- name: Check if @claude was mentioned
id: check_mention
run: |
BODY="${{ github.event.issue.body || github.event.comment.body }}"
if [[ "$BODY" == *"@claude"* ]]; then
echo "mentioned=true" >> $GITHUB_OUTPUT
else
echo "mentioned=false" >> $GITHUB_OUTPUT
fi

- name: Respond to @claude mention
if: steps.check_mention.outputs.mentioned == 'true'
uses: actions/github-script@v7
with:
script: |
const issue_number = context.issue.number;
const repo = context.repo.repo;
const owner = context.repo.owner;

const body = github.event.issue?.body || github.event.comment?.body || '';

// Create a response comment
github.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: issue_number,
body: `👋 Hey! I see you've mentioned @claude.

To get Claude to help with this issue, I'm setting up a workflow to process your request. Please wait a moment...

**Note**: The Claude GitHub App is installed and ready to help with:
- 🔍 Analyzing pull requests and issues
- 🐛 Fixing CI errors
- 📝 Reviewing code changes
- 🤖 Responding to development tasks

Feel free to open a pull request or check back on this issue for updates!`
});

- name: Log issue details
if: steps.check_mention.outputs.mentioned == 'true'
run: |
echo "Issue #${{ github.event.issue.number }} mentioned @claude"
echo "Repository: ${{ github.repository }}"
echo "Issue Title: ${{ github.event.issue.title }}"
echo "Body: ${{ github.event.issue.body || github.event.comment.body }}"
Loading