From 854bc5cccf2be8e39c10b0ffafed91d8a6975627 Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Fri, 15 Aug 2025 13:53:03 -0700 Subject: [PATCH 1/8] test: gh action --- gui/src/redux/thunks/edit.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/src/redux/thunks/edit.ts b/gui/src/redux/thunks/edit.ts index 700d49d55..e1f963762 100644 --- a/gui/src/redux/thunks/edit.ts +++ b/gui/src/redux/thunks/edit.ts @@ -58,11 +58,15 @@ export const streamEditThunk = createAsyncThunk< stripImages(content), ].join("\n\n"); + console.log("DEBUG"); + const response = await extra.ideMessenger.request("edit/sendPrompt", { prompt, range: codeToEdit[0] as RangeInFileWithContents, }); + throw new Error("DEBUG"); // TODO: remove + dispatch(setInactive()); if (response.status === "error") { From 381ef1c2d1d79495bf12d3db2b6a0bf4b93c62ff Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Fri, 15 Aug 2025 14:05:00 -0700 Subject: [PATCH 2/8] fix: do not run on draft PRs --- actions/detailed-review/action.yml | 15 ++++++++++----- actions/general-review/action.yml | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/actions/detailed-review/action.yml b/actions/detailed-review/action.yml index e0280fa28..e3c7c34e8 100644 --- a/actions/detailed-review/action.yml +++ b/actions/detailed-review/action.yml @@ -29,12 +29,17 @@ runs: SHOULD_RUN="false" if [ "${{ github.event_name }}" = "pull_request" ]; then - # Check PR author association - AUTHOR_ASSOC="${{ github.event.pull_request.author_association }}" - if [ "$AUTHOR_ASSOC" = "OWNER" ] || [ "$AUTHOR_ASSOC" = "MEMBER" ] || [ "$AUTHOR_ASSOC" = "COLLABORATOR" ]; then - SHOULD_RUN="true" + # Check if PR is a draft + if [ "${{ github.event.pull_request.draft }}" = "true" ]; then + echo "::notice::Skipping review - PR is a draft" else - echo "::notice::Skipping review - PR author is not a team member (association: $AUTHOR_ASSOC)" + # Check PR author association + AUTHOR_ASSOC="${{ github.event.pull_request.author_association }}" + if [ "$AUTHOR_ASSOC" = "OWNER" ] || [ "$AUTHOR_ASSOC" = "MEMBER" ] || [ "$AUTHOR_ASSOC" = "COLLABORATOR" ]; then + SHOULD_RUN="true" + else + echo "::notice::Skipping review - PR author is not a team member (association: $AUTHOR_ASSOC)" + fi fi elif [ "${{ github.event_name }}" = "issue_comment" ]; then # Check if it's a PR comment with the trigger phrase diff --git a/actions/general-review/action.yml b/actions/general-review/action.yml index 060494b94..bf5e221e1 100644 --- a/actions/general-review/action.yml +++ b/actions/general-review/action.yml @@ -29,12 +29,17 @@ runs: SHOULD_RUN="false" if [ "${{ github.event_name }}" = "pull_request" ]; then - # Check PR author association - AUTHOR_ASSOC="${{ github.event.pull_request.author_association }}" - if [ "$AUTHOR_ASSOC" = "OWNER" ] || [ "$AUTHOR_ASSOC" = "MEMBER" ] || [ "$AUTHOR_ASSOC" = "COLLABORATOR" ]; then - SHOULD_RUN="true" + # Check if PR is a draft + if [ "${{ github.event.pull_request.draft }}" = "true" ]; then + echo "::notice::Skipping review - PR is a draft" else - echo "::notice::Skipping review - PR author is not a team member (association: $AUTHOR_ASSOC)" + # Check PR author association + AUTHOR_ASSOC="${{ github.event.pull_request.author_association }}" + if [ "$AUTHOR_ASSOC" = "OWNER" ] || [ "$AUTHOR_ASSOC" = "MEMBER" ] || [ "$AUTHOR_ASSOC" = "COLLABORATOR" ]; then + SHOULD_RUN="true" + else + echo "::notice::Skipping review - PR author is not a team member (association: $AUTHOR_ASSOC)" + fi fi elif [ "${{ github.event_name }}" = "issue_comment" ]; then # Check if it's a PR comment with the trigger phrase From fb3f37ff3dbed19499e303212f1442c42d118829 Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Fri, 15 Aug 2025 14:06:50 -0700 Subject: [PATCH 3/8] chore: update SHA --- .github/workflows/continue-detailed-review.yaml | 2 +- .github/workflows/continue-general-review.yaml | 2 +- actions/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continue-detailed-review.yaml b/.github/workflows/continue-detailed-review.yaml index 3d314ff37..bfefa3731 100644 --- a/.github/workflows/continue-detailed-review.yaml +++ b/.github/workflows/continue-detailed-review.yaml @@ -18,7 +18,7 @@ jobs: timeout-minutes: 10 steps: - name: Run Detailed PR Review - uses: continuedev/continue/actions/detailed-review@23d9260536372acf4eb57a41e6ab62bc5869b070 + uses: continuedev/continue/actions/detailed-review@381ef1c2d1d79495bf12d3db2b6a0bf4b93c62ff with: continue-api-key: ${{ secrets.CONTINUE_API_KEY }} continue-org: continuedev diff --git a/.github/workflows/continue-general-review.yaml b/.github/workflows/continue-general-review.yaml index 3030c6fdf..96ab67ab1 100644 --- a/.github/workflows/continue-general-review.yaml +++ b/.github/workflows/continue-general-review.yaml @@ -18,7 +18,7 @@ jobs: timeout-minutes: 10 steps: - name: Run Continue PR Review Action - uses: continuedev/continue/actions/general-review@23d9260536372acf4eb57a41e6ab62bc5869b070 + uses: continuedev/continue/actions/general-review@381ef1c2d1d79495bf12d3db2b6a0bf4b93c62ff with: continue-api-key: ${{ secrets.CONTINUE_API_KEY }} continue-org: "continuedev" diff --git a/actions/README.md b/actions/README.md index 464867658..38b873973 100644 --- a/actions/README.md +++ b/actions/README.md @@ -219,7 +219,7 @@ We recommend using a specific commit SHA for stability and predictability: Example: ```yaml -uses: continuedev/continue/actions/general-review@17fe39cc4f1760838ce4428aad0a984af13f8266 +uses: continuedev/continue/actions/general-review@381ef1c2d1d79495bf12d3db2b6a0bf4b93c62ff ``` ## Troubleshooting From c4d698e2a9ea95ba7c0047751a06b6b70bf642ac Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Fri, 15 Aug 2025 14:08:56 -0700 Subject: [PATCH 4/8] Revert "test: gh action" This reverts commit 854bc5cccf2be8e39c10b0ffafed91d8a6975627. --- gui/src/redux/thunks/edit.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gui/src/redux/thunks/edit.ts b/gui/src/redux/thunks/edit.ts index e1f963762..700d49d55 100644 --- a/gui/src/redux/thunks/edit.ts +++ b/gui/src/redux/thunks/edit.ts @@ -58,15 +58,11 @@ export const streamEditThunk = createAsyncThunk< stripImages(content), ].join("\n\n"); - console.log("DEBUG"); - const response = await extra.ideMessenger.request("edit/sendPrompt", { prompt, range: codeToEdit[0] as RangeInFileWithContents, }); - throw new Error("DEBUG"); // TODO: remove - dispatch(setInactive()); if (response.status === "error") { From f7c1140064871260f562be499f9223c51e9807ab Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Fri, 15 Aug 2025 14:16:46 -0700 Subject: [PATCH 5/8] fix: deduplicate comments --- actions/detailed-review/action.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/actions/detailed-review/action.yml b/actions/detailed-review/action.yml index e3c7c34e8..3c493ae44 100644 --- a/actions/detailed-review/action.yml +++ b/actions/detailed-review/action.yml @@ -273,7 +273,23 @@ runs: console.log('Invalid comments:', JSON.stringify(invalidComments, null, 2)); } - const comments = validComments.map(comment => ({ + // Deduplicate comments based on path + position + body + const uniqueComments = []; + const seen = new Set(); + + for (const comment of validComments) { + const key = `${comment.path}:${comment.position}:${comment.body}`; + if (!seen.has(key)) { + seen.add(key); + uniqueComments.push(comment); + } + } + + if (uniqueComments.length < validComments.length) { + console.log(`Filtered out ${validComments.length - uniqueComments.length} duplicate comments (same path + position + body)`); + } + + const comments = uniqueComments.map(comment => ({ path: comment.path, position: comment.position, body: comment.body From c7afc6674d182a896dc4cccb57f7c8a4456ea63f Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Fri, 15 Aug 2025 14:17:04 -0700 Subject: [PATCH 6/8] chore: update SHA --- .github/workflows/continue-detailed-review.yaml | 2 +- .github/workflows/continue-general-review.yaml | 2 +- actions/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continue-detailed-review.yaml b/.github/workflows/continue-detailed-review.yaml index bfefa3731..cf38e64e7 100644 --- a/.github/workflows/continue-detailed-review.yaml +++ b/.github/workflows/continue-detailed-review.yaml @@ -18,7 +18,7 @@ jobs: timeout-minutes: 10 steps: - name: Run Detailed PR Review - uses: continuedev/continue/actions/detailed-review@381ef1c2d1d79495bf12d3db2b6a0bf4b93c62ff + uses: continuedev/continue/actions/detailed-review@f7c1140064871260f562be499f9223c51e9807ab with: continue-api-key: ${{ secrets.CONTINUE_API_KEY }} continue-org: continuedev diff --git a/.github/workflows/continue-general-review.yaml b/.github/workflows/continue-general-review.yaml index 96ab67ab1..4f42d0f49 100644 --- a/.github/workflows/continue-general-review.yaml +++ b/.github/workflows/continue-general-review.yaml @@ -18,7 +18,7 @@ jobs: timeout-minutes: 10 steps: - name: Run Continue PR Review Action - uses: continuedev/continue/actions/general-review@381ef1c2d1d79495bf12d3db2b6a0bf4b93c62ff + uses: continuedev/continue/actions/general-review@f7c1140064871260f562be499f9223c51e9807ab with: continue-api-key: ${{ secrets.CONTINUE_API_KEY }} continue-org: "continuedev" diff --git a/actions/README.md b/actions/README.md index 38b873973..2c7d823dd 100644 --- a/actions/README.md +++ b/actions/README.md @@ -219,7 +219,7 @@ We recommend using a specific commit SHA for stability and predictability: Example: ```yaml -uses: continuedev/continue/actions/general-review@381ef1c2d1d79495bf12d3db2b6a0bf4b93c62ff +uses: continuedev/continue/actions/general-review@f7c1140064871260f562be499f9223c51e9807ab ``` ## Troubleshooting From 64bda6b2b3dac1037e9895dbee4ce1d35565e1fe Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Fri, 15 Aug 2025 14:25:26 -0700 Subject: [PATCH 7/8] fix: prevent review actions from running on draft PRs and deduplicate comments - Add draft PR check to both general-review and detailed-review actions - Add deduplication logic to filter identical comments (same path + position + body) - Include triggered-by message in detailed review body when initiated from comment - Remove redundant separate triggered-by comment --- actions/detailed-review/action.yml | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/actions/detailed-review/action.yml b/actions/detailed-review/action.yml index 3c493ae44..97c47018f 100644 --- a/actions/detailed-review/action.yml +++ b/actions/detailed-review/action.yml @@ -304,12 +304,19 @@ runs: // Create the review if (comments.length > 0) { try { + let reviewBody = `${reviewData.review_summary || 'AI Code Review'}\n\n---\n*💡 To request a new detailed review, comment \`@continue-detailed-review\`*`; + + // Add triggered by note if from comment + if (context.eventName === 'issue_comment') { + reviewBody = `*Triggered by @${context.payload.comment.user.login}'s request*\n\n${reviewBody}`; + } + await github.rest.pulls.createReview({ owner: context.repo.owner, repo: context.repo.repo, pull_number: prNumber, commit_id: commitSha, - body: `${reviewData.review_summary || 'AI Code Review'}\n\n---\n*💡 To request a new detailed review, comment \`@continue-detailed-review\`*`, + body: reviewBody, event: 'COMMENT', comments: comments }); @@ -331,22 +338,19 @@ runs: } } else { // No inline comments, just post the summary + let summaryBody = `## AI Code Review\n\n${reviewData.review_summary}\n\n*No specific line comments generated.*\n\n` + + `---\n*💡 To request a new detailed review, comment \`@continue-detailed-review\`*`; + + // Add triggered by note if from comment + if (context.eventName === 'issue_comment') { + summaryBody = `*Triggered by @${context.payload.comment.user.login}'s request*\n\n${summaryBody}`; + } + await github.rest.issues.createComment({ issue_number: prNumber, owner: context.repo.owner, repo: context.repo.repo, - body: `## AI Code Review\n\n${reviewData.review_summary}\n\n*No specific line comments generated.*\n\n` + - `---\n*💡 To request a new detailed review, comment \`@continue-detailed-review\`*` - }); - } - - // Add triggered by note if from comment - if (context.eventName === 'issue_comment') { - await github.rest.issues.createComment({ - issue_number: prNumber, - owner: context.repo.owner, - repo: context.repo.repo, - body: `*Inline review triggered by @${context.payload.comment.user.login}*` + body: summaryBody }); } From 5361d5e33b880add1d3d050eeadd01971434fb75 Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Fri, 15 Aug 2025 14:26:22 -0700 Subject: [PATCH 8/8] fix: update sha --- .github/workflows/continue-detailed-review.yaml | 2 +- .github/workflows/continue-general-review.yaml | 2 +- actions/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continue-detailed-review.yaml b/.github/workflows/continue-detailed-review.yaml index cf38e64e7..3f73a5d5b 100644 --- a/.github/workflows/continue-detailed-review.yaml +++ b/.github/workflows/continue-detailed-review.yaml @@ -18,7 +18,7 @@ jobs: timeout-minutes: 10 steps: - name: Run Detailed PR Review - uses: continuedev/continue/actions/detailed-review@f7c1140064871260f562be499f9223c51e9807ab + uses: continuedev/continue/actions/detailed-review@64bda6b2b3dac1037e9895dbee4ce1d35565e1fe with: continue-api-key: ${{ secrets.CONTINUE_API_KEY }} continue-org: continuedev diff --git a/.github/workflows/continue-general-review.yaml b/.github/workflows/continue-general-review.yaml index 4f42d0f49..3a37e3303 100644 --- a/.github/workflows/continue-general-review.yaml +++ b/.github/workflows/continue-general-review.yaml @@ -18,7 +18,7 @@ jobs: timeout-minutes: 10 steps: - name: Run Continue PR Review Action - uses: continuedev/continue/actions/general-review@f7c1140064871260f562be499f9223c51e9807ab + uses: continuedev/continue/actions/general-review@64bda6b2b3dac1037e9895dbee4ce1d35565e1fe with: continue-api-key: ${{ secrets.CONTINUE_API_KEY }} continue-org: "continuedev" diff --git a/actions/README.md b/actions/README.md index 2c7d823dd..6d3bbf377 100644 --- a/actions/README.md +++ b/actions/README.md @@ -219,7 +219,7 @@ We recommend using a specific commit SHA for stability and predictability: Example: ```yaml -uses: continuedev/continue/actions/general-review@f7c1140064871260f562be499f9223c51e9807ab +uses: continuedev/continue/actions/general-review@64bda6b2b3dac1037e9895dbee4ce1d35565e1fe ``` ## Troubleshooting