Skip to content
Open
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
12 changes: 6 additions & 6 deletions apps/api/src/webhooks/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
}

Expand Down Expand Up @@ -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('/');
Expand All @@ -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' });
}
Expand All @@ -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' });
}
Expand All @@ -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({
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/src/app/docs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export default function DocsPage() {
<div className="absolute -left-[5px] top-0 w-2.5 h-2.5 rounded-full bg-purple-500 ring-4 ring-zinc-900"></div>
<h4 className="text-sm font-bold text-zinc-100 mb-3">2. Manual Trigger</h4>
<div className="bg-black/50 rounded-lg p-3 font-mono text-xs text-zinc-300 border border-zinc-800 inline-block mb-2">
<span className="text-purple-400">@Review-scope</span> re-review
<span className="text-purple-400">@reviewscope</span> review
</div>
<p className="text-xs text-zinc-500">Use this to force a re-scan after pushing commits.</p>
</div>
Expand All @@ -342,7 +342,7 @@ export default function DocsPage() {
<div className="absolute -left-[5px] top-0 w-2.5 h-2.5 rounded-full bg-pink-500 ring-4 ring-zinc-900"></div>
<h4 className="text-sm font-bold text-zinc-100 mb-3">3. Interactive Chat</h4>
<div className="bg-black/50 rounded-lg p-3 font-mono text-xs text-zinc-300 border border-zinc-800 inline-block mb-2">
<span className="text-purple-400">@Review-scope</span> Why is this variable nullable?
<span className="text-purple-400">@reviewscope</span> Why is this variable nullable?
</div>
<p className="text-xs text-zinc-500">ReviewScope replies with context-aware answers.</p>
</div>
Expand Down
8 changes: 4 additions & 4 deletions docs/USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ 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

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
Expand Down