Skip to content

Commit 6f973aa

Browse files
bdougieclaude
andcommitted
feat(ci): add reusable Continue review workflows and simplified actions
- Add reusable workflow for Continue review integration - Create base-review action with zero-config setup - Add continue-review and public-review actions for third-party repos - Update test workflow to validate new base-review action - Add example workflows demonstrating different integration patterns - Enable GitHub App support with optional fallback to API-only mode Co-authored-by: Claude (Anthropic) <claude@anthropic.com> Generated-by: Continue CLI with Claude
1 parent 86c7687 commit 6f973aa

11 files changed

Lines changed: 329 additions & 3 deletions
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Reusable Continue Review
2+
on:
3+
workflow_call:
4+
inputs:
5+
continue-org:
6+
description: 'Continue organization'
7+
required: true
8+
type: string
9+
continue-config:
10+
description: 'Continue config path'
11+
required: true
12+
type: string
13+
secrets:
14+
CONTINUE_API_KEY:
15+
required: true
16+
CONTINUE_APP_ID:
17+
required: false
18+
CONTINUE_APP_PRIVATE_KEY:
19+
required: false
20+
21+
jobs:
22+
review:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
repository: continuedev/continue
29+
path: continue-actions
30+
31+
- name: Run Continue Review
32+
uses: ./continue-actions/actions/general-review
33+
with:
34+
continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
35+
continue-org: ${{ inputs.continue-org }}
36+
continue-config: ${{ inputs.continue-config }}
37+
app_id: ${{ secrets.CONTINUE_APP_ID }}
38+
app_private_key: ${{ secrets.CONTINUE_APP_PRIVATE_KEY }}
39+
use_github_app: true

.github/workflows/test-continue-agent.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test Continue Agent App Integration
1+
name: Test Continue Agent Actions
22
on:
33
pull_request:
44
types: [opened, ready_for_review]
@@ -12,6 +12,20 @@ permissions:
1212
issues: write
1313

1414
jobs:
15+
# Test the new simplified base-review action
16+
test-base-review:
17+
name: Test Base Review (Simplified)
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 10
20+
steps:
21+
- name: Checkout Repository
22+
uses: actions/checkout@v4
23+
24+
- name: Base Review
25+
uses: ./actions/base-review
26+
with:
27+
continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
28+
1529
# Test with GitHub App (default behavior)
1630
test-with-app:
1731
name: Test with Continue Agent App

actions/base-review/action.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "Continue Base Review"
2+
description: "Zero-config AI code review - just add this action and optionally an API key"
3+
author: "Continue Dev, Inc."
4+
5+
inputs:
6+
continue-api-key:
7+
description: "API key for Continue service (optional if using default)"
8+
required: false
9+
default: ""
10+
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: Check trigger
15+
id: check
16+
shell: bash
17+
run: |
18+
# Determine if we should run based on event type
19+
SHOULD_RUN="false"
20+
REVIEW_TYPE="general"
21+
22+
if [ "${{ github.event_name }}" = "pull_request" ]; then
23+
if [ "${{ github.event.pull_request.draft }}" != "true" ]; then
24+
SHOULD_RUN="true"
25+
fi
26+
elif [ "${{ github.event_name }}" = "issue_comment" ]; then
27+
if [ "${{ github.event.issue.pull_request }}" != "" ]; then
28+
COMMENT="${{ github.event.comment.body }}"
29+
# Check for @continue-agent mention
30+
if echo "$COMMENT" | grep -qi "@continue-agent"; then
31+
SHOULD_RUN="true"
32+
# Check for review type keywords
33+
if echo "$COMMENT" | grep -qi "detailed"; then
34+
REVIEW_TYPE="detailed"
35+
fi
36+
fi
37+
fi
38+
fi
39+
40+
echo "should_run=$SHOULD_RUN" >> $GITHUB_OUTPUT
41+
echo "review_type=$REVIEW_TYPE" >> $GITHUB_OUTPUT
42+
43+
- name: Run Continue Review
44+
if: steps.check.outputs.should_run == 'true'
45+
uses: continuedev/continue/actions/general-review@main
46+
with:
47+
continue-api-key: ${{ inputs.continue-api-key || secrets.CONTINUE_API_KEY || vars.CONTINUE_DEFAULT_KEY || 'demo-key' }}
48+
continue-org: "continue"
49+
continue-config: "continue/default"
50+
use_github_app: false # Keep it simple - no app complexity
51+
52+
branding:
53+
icon: "code"
54+
color: "blue"

actions/continue-review/action.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Continue Review"
2+
description: "Easy code review for any repository using Continue Agent"
3+
author: "Continue Dev, Inc."
4+
5+
inputs:
6+
continue-api-key:
7+
description: "API key for Continue service (get one at https://continue.dev)"
8+
required: true
9+
continue-org:
10+
description: "Organization for Continue config"
11+
required: false
12+
default: "continue"
13+
continue-config:
14+
description: 'Config path to use (e.g., "continue/default-reviewer")'
15+
required: false
16+
default: "continue/default-reviewer"
17+
review-type:
18+
description: "Type of review: 'general' or 'detailed'"
19+
required: false
20+
default: "general"
21+
22+
runs:
23+
using: "composite"
24+
steps:
25+
# The Continue org would host this action with embedded app credentials
26+
# This way users don't need to know about the GitHub App at all
27+
- name: Continue Review
28+
uses: continuedev/continue-agent-action@v1 # This would be the published action
29+
with:
30+
continue-api-key: ${{ inputs.continue-api-key }}
31+
continue-org: ${{ inputs.continue-org }}
32+
continue-config: ${{ inputs.continue-config }}
33+
review-type: ${{ inputs.review-type }}
34+
# App credentials are handled internally by the action
35+
36+
branding:
37+
icon: "code"
38+
color: "blue"

actions/general-review/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ inputs:
1717
default: "true"
1818
required: false
1919
app_id:
20-
description: "GitHub App ID (required if use_github_app is true)"
20+
description: "GitHub App ID (optional - uses Continue's app if not provided)"
2121
required: false
22+
default: ""
2223
app_private_key:
23-
description: "GitHub App Private Key (required if use_github_app is true)"
24+
description: "GitHub App Private Key (optional - uses Continue's app if not provided)"
2425
required: false
26+
default: ""
2527

2628
runs:
2729
using: "composite"

actions/public-review/action.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "Continue Public Review"
2+
description: "Public-facing Continue review action - only requires API key"
3+
author: "Continue Dev, Inc."
4+
5+
inputs:
6+
continue-api-key:
7+
description: "API key for Continue service"
8+
required: true
9+
continue-org:
10+
description: "Organization for Continue config"
11+
required: false
12+
default: "continue"
13+
continue-config:
14+
description: 'Config path (e.g., "myorg/review-bot")'
15+
required: false
16+
default: "continue/default-reviewer"
17+
18+
runs:
19+
using: "composite"
20+
steps:
21+
- name: Checkout Continue Actions
22+
uses: actions/checkout@v4
23+
with:
24+
repository: continuedev/continue
25+
sparse-checkout: |
26+
actions/general-review
27+
sparse-checkout-cone-mode: false
28+
path: .continue-actions
29+
30+
- name: Run Review with Continue's App
31+
uses: ./.continue-actions/actions/general-review
32+
with:
33+
continue-api-key: ${{ inputs.continue-api-key }}
34+
continue-org: ${{ inputs.continue-org }}
35+
continue-config: ${{ inputs.continue-config }}
36+
# These would be set by Continue org as repository secrets
37+
# in the continuedev/continue repo, not exposed to users
38+
app_id: ${{ env.CONTINUE_PUBLIC_APP_ID }}
39+
app_private_key: ${{ env.CONTINUE_PUBLIC_APP_KEY }}
40+
use_github_app: true
41+
42+
branding:
43+
icon: "code"
44+
color: "blue"

example-app-only-workflow.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Continue Agent Review (App Only)
2+
on:
3+
pull_request:
4+
types: [opened, ready_for_review]
5+
issue_comment:
6+
types: [created]
7+
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
issues: write
12+
13+
jobs:
14+
continue-review:
15+
name: AI Code Review
16+
runs-on: ubuntu-latest
17+
steps:
18+
# Option 1: If you publish the action to marketplace or make it reusable
19+
- name: Continue Agent Review
20+
uses: continuedev/continue/actions/general-review@main
21+
with:
22+
# Organization-level secrets (set once for all repos)
23+
continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
24+
app_id: ${{ secrets.CONTINUE_APP_ID }}
25+
app_private_key: ${{ secrets.CONTINUE_APP_PRIVATE_KEY }}
26+
27+
# Per-repo configuration (no secrets needed)
28+
continue-org: "bdougie"
29+
continue-config: "bdougie/review-bot"
30+
use_github_app: true

example-external-workflow.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Continue Agent Review
2+
on:
3+
pull_request:
4+
types: [opened, ready_for_review]
5+
issue_comment:
6+
types: [created]
7+
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
issues: write
12+
13+
jobs:
14+
continue-review:
15+
name: AI Code Review
16+
runs-on: ubuntu-latest
17+
steps:
18+
# Use the action directly from the continue repository
19+
- name: Continue Agent Review
20+
uses: continuedev/continue/actions/general-review@main
21+
with:
22+
# These would need to be set in the external repo's secrets
23+
continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
24+
continue-org: "bdougie" # Your Continue org
25+
continue-config: "bdougie/review-bot" # Your config path
26+
27+
# GitHub App credentials - these would be in the external repo
28+
app_id: ${{ secrets.CONTINUE_APP_ID }}
29+
app_private_key: ${{ secrets.CONTINUE_APP_PRIVATE_KEY }}
30+
use_github_app: true

example-minimal-workflow.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Place this in: .github/workflows/continue-review.yml
2+
name: Code Review
3+
on:
4+
pull_request:
5+
types: [opened, ready_for_review]
6+
7+
jobs:
8+
review:
9+
uses: continuedev/continue/.github/workflows/reusable-continue-review.yml@main
10+
with:
11+
continue-org: "bdougie"
12+
continue-config: "bdougie/review-bot"
13+
secrets: inherit # Inherits org-level secrets automatically

example-simplest-third-party.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Place in: .github/workflows/ai-review.yml
2+
name: AI Code Review
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, ready_for_review]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
review:
13+
runs-on: ubuntu-latest
14+
if: github.event.pull_request.draft == false
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: AI Review
20+
uses: continuedev/continue/actions/general-review@main
21+
with:
22+
continue-api-key: ${{ secrets.CONTINUE_API_KEY }}
23+
continue-org: "bdougie"
24+
continue-config: "bdougie/reviewer"
25+
use_github_app: false # No app needed!

0 commit comments

Comments
 (0)