Files
vibe-kanban/crates
Louis Knight-Webb 8a689ae4cb feat: trigger code review via !reviewfast PR comment (Vibe Kanban) (#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
2025-12-18 14:39:42 +00:00
..
2025-12-17 18:25:34 +00:00
2025-12-17 15:24:54 +00:00
2025-12-17 18:22:42 +00:00
2025-12-17 15:24:54 +00:00
2025-12-17 15:24:54 +00:00