Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## AI Code Review

- **Team members only**: AI review runs automatically when PR is opened or marked ready for review
- Team members can also trigger a review by commenting `@continue-general-review` or `@continue-detailed-review`
- Team members can also trigger a review by commenting `@continue-review`

## Checklist

Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/continue-detailed-review.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -343,31 +343,6 @@ jobs:

# GitHub does not have a way of requiring that all checks pass (you must manually select each job)
# This action at least lets us manage the list of required tests via source control
pr-review-action-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 20

- name: Cache PR review action node modules
uses: actions/cache@v4
id: pr-review-cache
with:
path: actions/detailed-review/node_modules
key: ${{ runner.os }}-pr-review-action-${{ hashFiles('actions/detailed-review/package.json') }}

- name: Install dependencies
if: steps.pr-review-cache.outputs.cache-hit != 'true'
run: |
cd actions/detailed-review
npm install

- name: Run tests
run: |
cd actions/detailed-review
npm test

# so that creators of new jobs can add them to this list
require-all-checks-to-pass:
Expand All @@ -385,7 +360,6 @@ jobs:
- vscode-package-extension-linux
- vscode-e2e-tests
- jetbrains-tests
- pr-review-action-tests

steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down
129 changes: 13 additions & 116 deletions actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,64 +4,19 @@ GitHub Actions that provide automated code reviews for pull requests using Conti

## Available Actions

This repository provides two GitHub Actions for different review styles:
This repository provides a GitHub Action for automated PR reviews:

### 1. General Review Action
### General Review Action

Provides high-level PR assessment with overall feedback and recommendations.

- **Path:** `continuedev/continue/actions/general-review@<commit-sha>`
- **Trigger:** `@continue-general-review`
- **Path:** `continuedev/continue/actions/general-review@main`
- **Trigger:** `@continue-review`
- **Output:** Summary comment with strengths, issues, and recommendations

### 2. Detailed Review Action

Provides line-by-line inline comments on specific code changes.

- **Path:** `continuedev/continue/actions/detailed-review@<commit-sha>`
- **Trigger:** `@continue-detailed-review`
- **Output:** Inline review comments on specific lines of code

## Quick Start

### Using Both Actions Together

```yaml
name: PR Reviews
on:
pull_request:
types: [opened, ready_for_review]
issue_comment:
types: [created]

permissions:
contents: read
pull-requests: write
issues: write

jobs:
general-review:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: continuedev/continue/actions/general-review@<commit-sha>
with:
continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
continue-org: "your-org-name"
continue-config: "your-org-name/review-bot"

detailed-review:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: continuedev/continue/actions/detailed-review@<commit-sha>
with:
continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
continue-org: "your-org-name"
continue-config: "your-org-name/review-bot"
```

### General Review Only
### Setting up General Review

```yaml
name: PR General Review
Expand All @@ -81,34 +36,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: continuedev/continue/actions/general-review@<commit-sha>
with:
continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
continue-org: "your-org-name"
continue-config: "your-org-name/review-bot"
```

### Detailed Review Only

```yaml
name: PR Detailed Review
on:
pull_request:
types: [opened, ready_for_review]
issue_comment:
types: [created]

permissions:
contents: read
pull-requests: write
issues: write

jobs:
review:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: continuedev/continue/actions/detailed-review@<commit-sha>
- uses: continuedev/continue/actions/general-review@main
with:
continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
continue-org: "your-org-name"
Expand All @@ -117,7 +45,7 @@ jobs:

## Inputs

Both actions accept the same inputs:
The action accepts the following inputs:

| Input | Description | Required |
| ------------------ | -------------------------------------- | -------- |
Expand Down Expand Up @@ -155,7 +83,7 @@ The workflow requires these permissions:

## Triggering Reviews

Both actions can be triggered in two ways:
The action can be triggered in two ways:

### Automatic Triggers

Expand All @@ -166,12 +94,9 @@ Both actions can be triggered in two ways:

Team members can trigger reviews by commenting on any pull request:

- `@continue-general-review` - Triggers a general review
- `@continue-detailed-review` - Triggers a detailed inline review
- `@continue-review` - Triggers a review

## Review Outputs

### General Review Output
## Review Output

The general review provides a structured comment that includes:

Expand All @@ -180,46 +105,24 @@ The general review provides a structured comment that includes:
- **Suggestions**: Improvement recommendations
- **Overall Assessment**: Final recommendation (APPROVE, REQUEST_CHANGES, or COMMENT)

### Detailed Review Output

The detailed review provides:

- **Inline Comments**: Specific feedback on individual lines of code
- **Position Markers**: Comments appear directly on the changed lines
- **Review Summary**: Overall assessment of the changes
- **Actionable Feedback**: Specific suggestions for each issue found

## How It Works

### General Review Process

1. Checks out repository code
2. Fetches PR diff using GitHub CLI
3. Generates a comprehensive review prompt
4. Runs Continue CLI with specified configuration
5. Posts review as a PR comment

### Detailed Review Process

1. Checks out repository code
2. Fetches PR diff with GitHub API positions
3. Annotates diff with position markers
4. Generates inline review prompt
5. Runs Continue CLI for detailed analysis
6. Posts inline comments using GitHub's review API

## Versioning

We recommend using a specific commit SHA for stability and predictability:
We recommend using the main branch:

- `@<commit-sha>` - Pins to a specific commit for maximum stability (recommended)
- `@main` - Uses the latest code from the main branch (for bleeding edge)
- `@v1` - Uses a version tag when available
- `@main` - Uses the latest code from the main branch

Example:

```yaml
uses: continuedev/continue/actions/general-review@64bda6b2b3dac1037e9895dbee4ce1d35565e1fe
uses: continuedev/continue/actions/general-review@main
```

## Troubleshooting
Expand All @@ -236,12 +139,6 @@ uses: continuedev/continue/actions/general-review@64bda6b2b3dac1037e9895dbee4ce1
- Verify your Continue configuration is correct
- Ensure your Continue API key is valid

### Inline comments not appearing (Detailed Review)

- Check that the PR has a valid diff
- Verify GitHub API permissions are correct
- Review action logs for position calculation errors

## Support

For issues or questions:
Expand Down
Loading
Loading