feat: trigger code review via !reviewfast PR comment (Vibe Kanban)#1604
Merged
stunningpixels merged 6 commits intomainfrom Dec 18, 2025
Merged
feat: trigger code review via !reviewfast PR comment (Vibe Kanban)#1604stunningpixels merged 6 commits intomainfrom
stunningpixels merged 6 commits intomainfrom
Conversation
## Implementation Complete I've implemented the `!reviewfast` comment trigger feature. Here's what was changed: ### Files Modified 1. **`crates/remote/src/db/reviews.rs`** (lines 253-279) - Added `has_pending_review_for_pr()` method to check if a review is already in progress for a given PR 2. **`crates/remote/src/routes/github_app.rs`** - Added import for `ReviewRepository` (line 21) - Added `TriggerReviewContext` and `PrMetadata` structs (lines 800-816) - Added `try_trigger_pr_review()` shared helper function (lines 818-928) - Refactored `handle_pull_request_event` to use the shared helper (lines 930-982) - Added `handle_issue_comment_event` handler (lines 984-1039) - Wired up `"issue_comment"` event in `handle_webhook` match (line 657) 3. **`crates/remote/.sqlx/query-7373b3a43a7dd6c5d77c13b5094bb01a63e2902a89dec683659644dd80eb6990.json`** - Added sqlx query cache for the new `has_pending_review_for_pr` query ### How It Works When a user comments exactly `!reviewfast` on a PR: 1. The `issue_comment` webhook is received 2. The handler validates: - It's a new comment (action = "created") - It's on a PR (not an issue) - The body is exactly `!reviewfast` - The commenter is not a bot 3. The shared `try_trigger_pr_review()` function then: - Checks the installation exists and isn't suspended - Checks the repository has reviews enabled - Checks no review is already pending for this PR - Checks R2 and review worker are configured - Fetches PR details from GitHub API - Spawns an async task to process the review ### Deployment Note The GitHub App must be configured to receive `issue_comment` webhook events in the GitHub App settings.
Vibe Kanban Review CompleteYour code review is ready! |
…bhook events. **Steps:** 1. Go to your GitHub App settings: `https://github.com/settings/apps/YOUR-APP-NAME` 2. Navigate to **Permissions & events** → **Subscribe to events** 3. Check the **Issue comments** checkbox 4. Save changes Without this, GitHub won't send the `issue_comment` webhook when someone comments `!reviewfast` on a PR.
…regardless of whether repositories have finished loading.
Contributor
Author
|
!reviewfast |
Review CompleteYour review story is ready! Comment !reviewfast on this PR to re-generate the story. |
hushhenry
pushed a commit
to hushhenry/vibe-kanban
that referenced
this pull request
Feb 17, 2026
…loopAI#1604) * All tasks are complete. Here's a summary of the implementation: ## Implementation Complete I've implemented the `!reviewfast` comment trigger feature. Here's what was changed: ### Files Modified 1. **`crates/remote/src/db/reviews.rs`** (lines 253-279) - Added `has_pending_review_for_pr()` method to check if a review is already in progress for a given PR 2. **`crates/remote/src/routes/github_app.rs`** - Added import for `ReviewRepository` (line 21) - Added `TriggerReviewContext` and `PrMetadata` structs (lines 800-816) - Added `try_trigger_pr_review()` shared helper function (lines 818-928) - Refactored `handle_pull_request_event` to use the shared helper (lines 930-982) - Added `handle_issue_comment_event` handler (lines 984-1039) - Wired up `"issue_comment"` event in `handle_webhook` match (line 657) 3. **`crates/remote/.sqlx/query-7373b3a43a7dd6c5d77c13b5094bb01a63e2902a89dec683659644dd80eb6990.json`** - Added sqlx query cache for the new `has_pending_review_for_pr` query ### How It Works When a user comments exactly `!reviewfast` on a PR: 1. The `issue_comment` webhook is received 2. The handler validates: - It's a new comment (action = "created") - It's on a PR (not an issue) - The body is exactly `!reviewfast` - The commenter is not a bot 3. The shared `try_trigger_pr_review()` function then: - Checks the installation exists and isn't suspended - Checks the repository has reviews enabled - Checks no review is already pending for this PR - Checks R2 and review worker are configured - Fetches PR details from GitHub API - Spawns an async task to process the review ### Deployment Note The GitHub App must be configured to receive `issue_comment` webhook events in the GitHub App settings. * Cleanup script changes for task attempt fc1ea8e0-fa6d-435d-b569-a6bbbff3c4d2 * update review comment * Yes, you need to update your GitHub App to receive `issue_comment` webhook events. **Steps:** 1. Go to your GitHub App settings: `https://github.com/settings/apps/YOUR-APP-NAME` 2. Navigate to **Permissions & events** → **Subscribe to events** 3. Check the **Issue comments** checkbox 4. Save changes Without this, GitHub won't send the `issue_comment` webhook when someone comments `!reviewfast` on a PR. * Fixed. The tip is now always shown when the GitHub App is installed, regardless of whether repositories have finished loading. * Update copy
brandonvalentino
pushed a commit
to brandonvalentino/kira-code2
that referenced
this pull request
Mar 16, 2026
…loopAI#1604) * All tasks are complete. Here's a summary of the implementation: ## Implementation Complete I've implemented the `!reviewfast` comment trigger feature. Here's what was changed: ### Files Modified 1. **`crates/remote/src/db/reviews.rs`** (lines 253-279) - Added `has_pending_review_for_pr()` method to check if a review is already in progress for a given PR 2. **`crates/remote/src/routes/github_app.rs`** - Added import for `ReviewRepository` (line 21) - Added `TriggerReviewContext` and `PrMetadata` structs (lines 800-816) - Added `try_trigger_pr_review()` shared helper function (lines 818-928) - Refactored `handle_pull_request_event` to use the shared helper (lines 930-982) - Added `handle_issue_comment_event` handler (lines 984-1039) - Wired up `"issue_comment"` event in `handle_webhook` match (line 657) 3. **`crates/remote/.sqlx/query-7373b3a43a7dd6c5d77c13b5094bb01a63e2902a89dec683659644dd80eb6990.json`** - Added sqlx query cache for the new `has_pending_review_for_pr` query ### How It Works When a user comments exactly `!reviewfast` on a PR: 1. The `issue_comment` webhook is received 2. The handler validates: - It's a new comment (action = "created") - It's on a PR (not an issue) - The body is exactly `!reviewfast` - The commenter is not a bot 3. The shared `try_trigger_pr_review()` function then: - Checks the installation exists and isn't suspended - Checks the repository has reviews enabled - Checks no review is already pending for this PR - Checks R2 and review worker are configured - Fetches PR details from GitHub API - Spawns an async task to process the review ### Deployment Note The GitHub App must be configured to receive `issue_comment` webhook events in the GitHub App settings. * Cleanup script changes for task attempt fc1ea8e0-fa6d-435d-b569-a6bbbff3c4d2 * update review comment * Yes, you need to update your GitHub App to receive `issue_comment` webhook events. **Steps:** 1. Go to your GitHub App settings: `https://github.com/settings/apps/YOUR-APP-NAME` 2. Navigate to **Permissions & events** → **Subscribe to events** 3. Check the **Issue comments** checkbox 4. Save changes Without this, GitHub won't send the `issue_comment` webhook when someone comments `!reviewfast` on a PR. * Fixed. The tip is now always shown when the GitHub App is installed, regardless of whether repositories have finished loading. * Update copy
brandonvalentino
added a commit
to brandonvalentino/kira-code2
that referenced
this pull request
Mar 16, 2026
…loopAI#1604) * All tasks are complete. Here's a summary of the implementation: ## Implementation Complete I've implemented the `!reviewfast` comment trigger feature. Here's what was changed: ### Files Modified 1. **`crates/remote/src/db/reviews.rs`** (lines 253-279) - Added `has_pending_review_for_pr()` method to check if a review is already in progress for a given PR 2. **`crates/remote/src/routes/github_app.rs`** - Added import for `ReviewRepository` (line 21) - Added `TriggerReviewContext` and `PrMetadata` structs (lines 800-816) - Added `try_trigger_pr_review()` shared helper function (lines 818-928) - Refactored `handle_pull_request_event` to use the shared helper (lines 930-982) - Added `handle_issue_comment_event` handler (lines 984-1039) - Wired up `"issue_comment"` event in `handle_webhook` match (line 657) 3. **`crates/remote/.sqlx/query-7373b3a43a7dd6c5d77c13b5094bb01a63e2902a89dec683659644dd80eb6990.json`** - Added sqlx query cache for the new `has_pending_review_for_pr` query ### How It Works When a user comments exactly `!reviewfast` on a PR: 1. The `issue_comment` webhook is received 2. The handler validates: - It's a new comment (action = "created") - It's on a PR (not an issue) - The body is exactly `!reviewfast` - The commenter is not a bot 3. The shared `try_trigger_pr_review()` function then: - Checks the installation exists and isn't suspended - Checks the repository has reviews enabled - Checks no review is already pending for this PR - Checks R2 and review worker are configured - Fetches PR details from GitHub API - Spawns an async task to process the review ### Deployment Note The GitHub App must be configured to receive `issue_comment` webhook events in the GitHub App settings. * Cleanup script changes for task attempt fc1ea8e0-fa6d-435d-b569-a6bbbff3c4d2 * update review comment * Yes, you need to update your GitHub App to receive `issue_comment` webhook events. **Steps:** 1. Go to your GitHub App settings: `https://github.com/settings/apps/YOUR-APP-NAME` 2. Navigate to **Permissions & events** → **Subscribe to events** 3. Check the **Issue comments** checkbox 4. Save changes Without this, GitHub won't send the `issue_comment` webhook when someone comments `!reviewfast` on a PR. * Fixed. The tip is now always shown when the GitHub App is installed, regardless of whether repositories have finished loading. * Update copy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the ability to trigger an automated code review by commenting
!reviewfaston any pull request.Changes Made
New Feature: Comment-Triggered Reviews
handle_issue_comment_event()webhook handler to processissue_commentevents!reviewfaston a PR, the system triggers an automated code reviewCode Refactoring
try_trigger_pr_review()helper functionTriggerReviewContextandPrMetadatastructs to reduce code duplicationhandle_pull_request_event()to use the shared helperDuplicate Prevention
has_pending_review_for_pr()method toReviewRepository!reviewfastcomments are ignoredSafety Features
review_enabledrepository settingFiles Changed
crates/remote/src/routes/github_app.rs- Webhook handler and shared logiccrates/remote/src/db/reviews.rs- New pending review check methodcrates/remote/.sqlx/query-*.json- SQLx query cache for new queryDeployment Note
The GitHub App must be configured to receive
issue_commentwebhook events. This is done in the GitHub App settings under "Permissions & events" → "Subscribe to events" → check "Issue comments".This PR was written using Vibe Kanban