From 3178538a2ad84cdd8cdce78cdf4b6da6e70e50b2 Mon Sep 17 00:00:00 2001 From: MithunSrinivas28 Date: Tue, 26 May 2026 18:29:18 +0530 Subject: [PATCH] Update review workflow commands --- apps/api/src/webhooks/github.ts | 12 ++++++------ apps/dashboard/src/app/docs/page.tsx | 4 ++-- docs/USER_GUIDE.md | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/api/src/webhooks/github.ts b/apps/api/src/webhooks/github.ts index 062620d..510266e 100644 --- a/apps/api/src/webhooks/github.ts +++ b/apps/api/src/webhooks/github.ts @@ -267,7 +267,7 @@ githubWebhook.post('/', async (c) => { } const body = comment.body.toLowerCase(); - if (!body.includes('@review-scope')) { + if (!body.includes('@review-scope') && !body.includes('@reviewscope') && !body.includes('/reviewscope')) { return c.json({ status: 'ignored', reason: 'no_mention' }); } @@ -295,7 +295,7 @@ githubWebhook.post('/', async (c) => { const limits = getPlanLimits(dbInst.planId); try { - if (body.includes('re-review')) { + if (/(@reviewscope|@review-scope|\/reviewscope)\s+(re-)?review\b/.test(body)) { const [config] = await db.select().from(configs).where(eq(configs.installationId, dbInst.id)).limit(1); if (limits.tier === 'PRO' && !config?.apiKeyEncrypted) { const [owner, repoName] = repo.full_name.split('/'); @@ -304,7 +304,7 @@ githubWebhook.post('/', async (c) => { owner, repoName, issue.number, - '## Re-review Blocked\n\nPro plan requires your own API key. Add a Gemini or OpenAI key in Settings first.' + '## Review Blocked\n\nPro plan requires your own API key. Add a Gemini or OpenAI key in Settings first.' ); return c.json({ status: 'blocked_missing_api_key' }); } @@ -315,7 +315,7 @@ githubWebhook.post('/', async (c) => { owner, repoName, issue.number, - '## Re-review Blocked\n\nSarvam is available only on Free plan. On Pro, configure Gemini or OpenAI in Settings.' + '## Review Blocked\n\nSarvam is available only on Free plan. On Pro, configure Gemini or OpenAI in Settings.' ); return c.json({ status: 'blocked_invalid_provider' }); } @@ -339,7 +339,7 @@ githubWebhook.post('/', async (c) => { baseSha: pr.base.sha, deliveryId: `re-review-${Date.now()}`, }); - console.warn(`[Webhook] Re-review enqueued for PR #${issue.number}`); + console.warn(`[Webhook] Review enqueued for PR #${issue.number}`); } else { // 💬 CHAT MODE: Treat as a question await enqueueChatJob({ @@ -375,7 +375,7 @@ githubWebhook.post('/', async (c) => { } const body = comment.body.toLowerCase(); - const hasMention = body.includes('@review-scope'); + const hasMention = body.includes('@review-scope') || body.includes('@reviewscope') || body.includes('/reviewscope'); let isReplyToBot = false; // Smart Reply Detection: If no mention, check if replying to bot thread diff --git a/apps/dashboard/src/app/docs/page.tsx b/apps/dashboard/src/app/docs/page.tsx index 6165fff..bbc36cf 100644 --- a/apps/dashboard/src/app/docs/page.tsx +++ b/apps/dashboard/src/app/docs/page.tsx @@ -332,7 +332,7 @@ export default function DocsPage() {

2. Manual Trigger

- @Review-scope re-review + @reviewscope review

Use this to force a re-scan after pushing commits.

@@ -342,7 +342,7 @@ export default function DocsPage() {

3. Interactive Chat

- @Review-scope Why is this variable nullable? + @reviewscope Why is this variable nullable?

ReviewScope replies with context-aware answers.

diff --git a/docs/USER_GUIDE.md b/docs/USER_GUIDE.md index cef6001..91373f7 100644 --- a/docs/USER_GUIDE.md +++ b/docs/USER_GUIDE.md @@ -36,11 +36,11 @@ ReviewScope works automatically in the background. ### Manual Triggers & Chat -You can interact with ReviewScope by commenting on the Pull Request. You must mention **@review-scope** for the bot to respond. +You can interact with ReviewScope by commenting on the Pull Request. You must mention **@reviewscope** or use **/reviewscope** for the bot to respond. Example commands: ``` - @review-scope re-review + @reviewscope review ``` ### Asking Questions @@ -48,8 +48,8 @@ Example commands: You can also ask specific questions about the code changes: ``` - @review-scope Why is this change necessary? - @review-scope Can you explain the logic in the auth module? + @reviewscope Why is this change necessary? + @reviewscope Can you explain the logic in the auth module? ``` ## Understanding the Feedback