Use this file to discover all available pages before exploring further.
Automate GitHub issue analysis with AI. Mention @cline in any issue comment to trigger an autonomous investigation that reads files, analyzes code, and provides actionable insights - all running automatically in GitHub Actions.
New to Cline CLI? This sample assumes you understand Cline CLI basics and have completed the Installation Guide. If you’re new to Cline CLI, we recommend starting with the GitHub RCA sample first, as it’s simpler and will help you understand the fundamentals before setting up GitHub Actions.
Copy the workflow file from this sample to your repository. The workflow file must be placed in the .github/workflows/ directory in your repository root for GitHub Actions to detect and run it. In this case, we’ll name it cline-responder.yml.
# In your repository rootmkdir -p .github/workflowscurl -o .github/workflows/cline-responder.yml https://raw.githubusercontent.com/cline/cline/main/src/samples/cli/github-integration/cline-responder.yml
Alternatively, you can copy the full workflow file directly into .github/workflows/cline-responder.yml:
Click to view the complete cline-responder.yml workflow
You MUST edit the workflow file before committing!Open .github/workflows/cline-responder.yml and update the “Download analyze script” step within the workflow to specify your GitHub organization and repository where the analysis script is stored:
Example: If your repository is github.com/acme/myproject, set:
export GITORG="acme"export GITREPO="myproject"
This tells the workflow where to download the analysis script from your repository after you commit it in step 3.
The workflow will look for new or updated issues, check for @cline mentions, and then
start up the Cline CLI to dig into the issue, providing feedback as a reply to the issue.
Add the analysis script from the github-issue-rca sample to your repository. First, you’ll need to create a git-scripts directory in your repository root where the script will be located. Choose one of these options:Option A: Download directly (Recommended)
# In your repository root, create the directory and download the scriptmkdir -p git-scriptscurl -o git-scripts/analyze-issue.sh https://raw.githubusercontent.com/cline/cline/main/src/samples/cli/github-issue-rca/analyze-issue.shchmod +x git-scripts/analyze-issue.sh
Option B: Manual copy-pasteCreate the directory and file manually, then paste the script content:
# In your repository rootmkdir -p git-scripts# Create and edit the file with your preferred editornano git-scripts/analyze-issue.sh # or use vim, code, etc.
Click to view the complete analyze-issue.sh script
#!/bin/bash# Analyze a GitHub issue using Cline CLIif [ -z "$1" ]; then echo "Usage: $0 <github-issue-url> [prompt]" echo "Example: $0 https://github.com/owner/repo/issues/123" echo "Example: $0 https://github.com/owner/repo/issues/123 'What is the root cause of this issue?'" exit 1fi# Gather the argsISSUE_URL="$1"PROMPT="${2:-What is the root cause of this issue?}"# Ask Cline for its analysis, showing only the summarycline --auto-approve true --json "$PROMPT: $ISSUE_URL" | \ jq -r 'select(.type == "agent_event" and .event.type == "done") | .event.text' | \ sed 's/\\n/\n/g'
After pasting the script content, make it executable:
chmod +x git-scripts/analyze-issue.sh
This analysis script calls Cline to execute a prompt on a GitHub issue,
summarizing the output to populate the reply to the issue.