| 1 | # Continue PR Review Actions |
| 2 | |
| 3 | GitHub Actions that provide automated code reviews for pull requests using Continue CLI. |
| 4 | |
| 5 | ## Available Actions |
| 6 | |
| 7 | This repository provides a GitHub Action for automated PR reviews: |
| 8 | |
| 9 | ### General Review Action |
| 10 | |
| 11 | Provides high-level PR assessment with overall feedback and recommendations. |
| 12 | |
| 13 | - **Path:** `continuedev/continue/actions/general-review@main` |
| 14 | - **Trigger:** `@continue-review` |
| 15 | - **Output:** Summary comment with strengths, issues, and recommendations |
| 16 | |
| 17 | ## Quick Start |
| 18 | |
| 19 | ### Setting up General Review |
| 20 | |
| 21 | ```yaml |
| 22 | name: PR General Review |
| 23 | on: |
| 24 | pull_request: |
| 25 | types: [opened, ready_for_review] |
| 26 | issue_comment: |
| 27 | types: [created] |
| 28 | |
| 29 | permissions: |
| 30 | contents: read |
| 31 | pull-requests: write |
| 32 | issues: write |
| 33 | |
| 34 | jobs: |
| 35 | review: |
| 36 | runs-on: ubuntu-latest |
| 37 | timeout-minutes: 10 |
| 38 | steps: |
| 39 | - uses: continuedev/continue/actions/general-review@main |
| 40 | with: |
| 41 | continue-api-key: ${{ secrets.CONTINUE_API_KEY }} |
| 42 | continue-org: "your-org-name" |
| 43 | continue-config: "your-org-name/review-bot" |
| 44 | ``` |
| 45 | |
| 46 | ## Inputs |
| 47 | |
| 48 | The action accepts the following inputs: |
| 49 | |
| 50 | | Input | Description | Required | |
| 51 | | ------------------ | -------------------------------------- | -------- | |
| 52 | | `continue-api-key` | API key for Continue service | Yes | |
| 53 | | `continue-org` | Organization for Continue config | Yes | |
| 54 | | `continue-config` | Config path (e.g., "myorg/review-bot") | Yes | |
| 55 | |
| 56 | ## Setup Requirements |
| 57 | |
| 58 | ### 1. Continue API Key |
| 59 | |
| 60 | Add your Continue API key as a secret named `CONTINUE_API_KEY` in your repository: |
| 61 | |
| 62 | 1. Go to your repository's Settings |
| 63 | 2. Navigate to Secrets and variables → Actions |
| 64 | 3. Click "New repository secret" |
| 65 | 4. Name: `CONTINUE_API_KEY` |
| 66 | 5. Value: Your Continue API key |
| 67 | |
| 68 | ### 2. Continue Configuration |
| 69 | |
| 70 | Set up your review bot configuration in Continue: |
| 71 | |
| 72 | 1. Create a configuration for your organization |
| 73 | 2. Configure the review bot settings |
| 74 | 3. Note your organization name and config path |
| 75 | |
| 76 | ### 3. Workflow Permissions |
| 77 | |
| 78 | The workflow requires these permissions: |
| 79 | |
| 80 | - `contents: read` - To checkout and read repository code |
| 81 | - `pull-requests: write` - To post review comments on PRs |
| 82 | - `issues: write` - To respond to comment triggers |
| 83 | |
| 84 | ## Triggering Reviews |
| 85 | |
| 86 | The action can be triggered in two ways: |
| 87 | |
| 88 | ### Automatic Triggers |
| 89 | |
| 90 | - When a PR is opened by a team member (OWNER, MEMBER, or COLLABORATOR) |
| 91 | - When a PR is marked as "ready for review" by a team member |
| 92 | |
| 93 | ### Manual Triggers |
| 94 | |
| 95 | Team members can trigger reviews by commenting on any pull request: |
| 96 | |
| 97 | - `@continue-review` - Triggers a review |
| 98 | |
| 99 | ## Review Output |
| 100 | |
| 101 | The general review provides a structured comment that includes: |
| 102 | |
| 103 | - **Strengths**: What was done well in the PR |
| 104 | - **Issues Found**: Categorized by severity (Critical, High, Medium, Low) |
| 105 | - **Suggestions**: Improvement recommendations |
| 106 | - **Overall Assessment**: Final recommendation (APPROVE, REQUEST_CHANGES, or COMMENT) |
| 107 | |
| 108 | ## How It Works |
| 109 | |
| 110 | 1. Checks out repository code |
| 111 | 2. Fetches PR diff using GitHub CLI |
| 112 | 3. Generates a comprehensive review prompt |
| 113 | 4. Runs Continue CLI with specified configuration |
| 114 | 5. Posts review as a PR comment |
| 115 | |
| 116 | ## Versioning |
| 117 | |
| 118 | We recommend using the main branch: |
| 119 | |
| 120 | - `@main` - Uses the latest code from the main branch |
| 121 | |
| 122 | Example: |
| 123 | |
| 124 | ```yaml |
| 125 | uses: continuedev/continue/actions/general-review@main |
| 126 | ``` |
| 127 | |
| 128 | ## Troubleshooting |
| 129 | |
| 130 | ### Review not triggering |
| 131 | |
| 132 | - Ensure the PR author or commenter has appropriate permissions (OWNER, MEMBER, or COLLABORATOR) |
| 133 | - Check that the workflow file is in the default branch |
| 134 | - Verify the Continue API key is correctly set as a repository secret |
| 135 | |
| 136 | ### No review output generated |
| 137 | |
| 138 | - Check the action logs for any errors |
| 139 | - Verify your Continue configuration is correct |
| 140 | - Ensure your Continue API key is valid |
| 141 | |
| 142 | ## Support |
| 143 | |
| 144 | For issues or questions: |
| 145 | |
| 146 | - [Continue Documentation](https://docs.continue.dev) |
| 147 | - [GitHub Issues](https://github.com/continuedev/continue/issues) |
| 148 | - [Discord Community](https://discord.gg/vapESyrFmJ) |