Skip to content

Fix: Trigger @dcoapp recheck from PR reviews#290

Merged
tykeal merged 1 commit into
dcoapp:mainfrom
tykeal:fix/recheck-via-reviews
Jul 13, 2026
Merged

Fix: Trigger @dcoapp recheck from PR reviews#290
tykeal merged 1 commit into
dcoapp:mainfrom
tykeal:fix/recheck-via-reviews

Conversation

@tykeal

@tykeal tykeal commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the #289 root cause without requiring a permission bump. The previous
issue_comment implementation needed the Issues permission, which the app does
not have. Adding that permission would force every installation admin to
re-approve the app, so production never received those webhook events.

This switches recheck handling to pull_request_review.submitted and
pull_request_review_comment.created. Both are covered by the existing
pull_requests: read permission, so this requires no app permission increase and
no installation re-approval. The non-working issue_comment path is removed and
plain PR conversation comments are deferred to a future expanded-scope change.

To invoke a recheck, put this command on its own line in either a PR review
summary or an inline review comment:

@dcoapp recheck

Re #289. This intentionally does not auto-close the issue: production still
requires a redeploy and enabling the two review events in the GitHub App settings
before the fix works there.

Validation

  • npm test passed with 100% statement/branch/function/line coverage.
  • pre-commit run --all-files passed.

Expected checks

  • preview-smoke is expected to fail on this PR because no authorized Vercel
    preview exists for this SHA. That is the intended fail-on-no-preview behavior
    from CI: Fix smoke tests for fork pull requests #287, not a regression.
  • The Vercel org-gate check is expected.

@tykeal tykeal requested review from a team and Copilot July 11, 2026 14:56
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

@tykeal is attempting to deploy a commit to the DCO App Team on Vercel.

A member of the Team first needs to authorize it.

This comment was marked as outdated.

GitHub gates issue_comment webhooks behind the Issues permission. The
deployed app only has pull_requests:read, and adding Issues:read would
force every existing installation admin to re-approve a new permission
scope. As a result, the app never received the comment events added for
@dcoapp recheck.

Listen for pull_request_review.submitted and
pull_request_review_comment.created instead. Both events are available
under the existing pull_requests:read permission, so the fix does not
require a permission bump. Remove the non-working issue_comment path and
defer plain PR conversation comments to future work.

The command now matches when @dcoapp recheck appears on its own line,
case-insensitively with surrounding whitespace allowed. Update the
README to describe review summaries and inline review comments as the
supported surfaces.

Add review-comment coverage for require.members: false so rechecks
exercise org membership lookups with realistic webhook payloads.

Re dcoapp#289

Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 11, 2026 15:03
@tykeal tykeal force-pushed the fix/recheck-via-reviews branch from d6cd616 to 8be4670 Compare July 11, 2026 15:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jul 11, 2026 4:16pm

@tykeal tykeal merged commit 960e962 into dcoapp:main Jul 13, 2026
7 of 8 checks passed
@tykeal tykeal deleted the fix/recheck-via-reviews branch July 13, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants