Skip to main content
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.

The Workflow

Trigger Cline by mentioning @cline in any issue comment:
Issue comment with @cline mention
Cline’s automated analysis appears as a new comment, with insights drawn from your actual codebase:
Automated analysis response from Cline
The entire investigation runs autonomously in GitHub Actions - from file exploration to posting results. Let’s configure your repository.

Prerequisites

Before you begin, you’ll need:
  • Cline CLI knowledge - Completed the Installation Guide and understand basic usage
  • GitHub repository - With admin access to configure Actions and secrets
  • GitHub Actions familiarity - Basic understanding of workflows and CI/CD
  • API provider account - OpenRouter, Anthropic, or similar with API key

Setup

1. Copy the Workflow File

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.
Alternatively, you can copy the full workflow file directly into .github/workflows/cline-responder.yml:
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:
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.

2. Configure API Keys

Add your AI provider API keys as repository secrets:
  1. Go to your GitHub repository
  2. Navigate to SettingsEnvironment and Add a new environment.
    Navigate to Actions secrets
    Make sure to name it “cline-actions” so that it matches the environment value at the top of the cline-responder.yml file.
  3. Click New repository secret
  4. Add a secret for the OPENROUTER_API_KEY with a value of an API key from openrouter.com.
    Add API key secret
  5. Verify your secret is configured:
    API key configured
Now you’re ready to supply Cline with the credentials it needs in a GitHub Action.

3. Add Analysis Script

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)
Option B: Manual copy-paste Create the directory and file manually, then paste the script content:
After pasting the script content, make it executable:
This analysis script calls Cline to execute a prompt on a GitHub issue, summarizing the output to populate the reply to the issue.

4. Commit and Push

Usage

Once set up, simply mention @cline in any issue comment:
GitHub Actions will:
  1. Detect the @cline mention
  2. Start a Cline CLI instance
  3. Download the analysis script
  4. Analyze the issue using Act mode with auto-approval enabled
  5. Post Cline’s analysis as a new comment
Note: The workflow only triggers on issue comments, not pull request comments.

How It Works

The workflow (cline-responder.yml):
  1. Triggers on issue comments (created or edited)
  2. Detects @cline mentions (case-insensitive)
  3. Installs Cline CLI globally using npm
  4. Configures authentication using cline auth --provider openrouter --apikey ...
  5. Downloads the reusable analyze-issue.sh script from the github-issue-rca sample
  6. Runs analysis in Cline CLI
  7. Posts the analysis result as a comment