Skip to content

feat: handle ready_for_review webhook action#920

Merged
drazisil-codecov merged 2 commits into
mainfrom
feat/ready-for-review-webhook
May 14, 2026
Merged

feat: handle ready_for_review webhook action#920
drazisil-codecov merged 2 commits into
mainfrom
feat/ready-for-review-webhook

Conversation

@drazisil-codecov
Copy link
Copy Markdown
Contributor

@drazisil-codecov drazisil-codecov commented May 13, 2026

Summary

  • Adds GitHubPullRequestActions constants class to webhook_handlers/constants.py
  • Adds ready_for_review to the list of actions that trigger PullsSync
  • Refactors pull_request() handler to use the new constants instead of bare strings

Test plan

  • New test: test_pull_request_ready_for_review_triggers_pulls_sync — verifies pulls_sync is called when action is ready_for_review
  • Existing tests pass: test_pull_request_triggers_pulls_sync_task_for_valid_actions, test_pull_request_updates_title_if_edited, test_pull_request_exits_early_if_repo_not_active

Closes https://github.com/codecov/core-engineering/issues/64

🤖 Generated with Claude Code


Note

Low Risk
Low risk: small change to GitHub webhook routing that only expands the set of PR actions that enqueue pulls_sync, with a focused unit test added.

Overview
The GitHub pull_request webhook now triggers TaskService().pulls_sync when the action is ready_for_review, aligning behavior with other PR lifecycle actions.

PR action handling is refactored to use a new GitHubPullRequestActions constants class (including a shared PULLS_SYNC_ACTIONS list), and a test is added to assert the new ready_for_review behavior.

Reviewed by Cursor Bugbot for commit 8ae9a82. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sentry
Copy link
Copy Markdown
Contributor

sentry Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.90%. Comparing base (d507da5) to head (8ae9a82).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #920   +/-   ##
=======================================
  Coverage   91.90%   91.90%           
=======================================
  Files        1316     1316           
  Lines       50643    50654   +11     
  Branches     1625     1625           
=======================================
+ Hits        46541    46552   +11     
  Misses       3796     3796           
  Partials      306      306           
Flag Coverage Δ
apiunit 94.95% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codecov-notifications
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

REOPENED = "reopened"
SYNCHRONIZE = "synchronize"
LABELED = "labeled"
EDITED = "edited"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: alphabetize this list, and separate EDITED after (could even add whitespace before). I got confused and thought EDITED was part of PULLS_SYNC_ACTIONS

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drazisil-codecov drazisil-codecov added this pull request to the merge queue May 14, 2026
Merged via the queue into main with commit e5be426 May 14, 2026
40 checks passed
@drazisil-codecov drazisil-codecov deleted the feat/ready-for-review-webhook branch May 14, 2026 15:31
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.

2 participants