Skip to content

Handle synchronize webhook and add AMENDED bill status#299

Merged
mfosterw merged 1 commit intomasterfrom
handle-synchronize-webhook
Mar 3, 2026
Merged

Handle synchronize webhook and add AMENDED bill status#299
mfosterw merged 1 commit intomasterfrom
handle-synchronize-webhook

Conversation

@mfosterw
Copy link
Copy Markdown
Owner

Summary

  • Adds a new AMENDED bill status for bills invalidated by a PR code update
  • Adds PullRequestHandler.synchronize() to handle GitHub's synchronize webhook action (fired when new commits are pushed to an open PR)
  • When triggered, the handler updates the stored PR SHA and closes any open bill with AMENDED status; draft bills are not affected
  • Modifies Bill.close() to accept an optional status parameter (default CLOSED) enabling reuse for the amended case

Test plan

  • TestBill::test_close_amendedbill.close(status=AMENDED) sets status and disables submit task
  • TestPullRequestHandler::test_synchronize — open bill is closed with AMENDED status and task disabled
  • TestPullRequestHandler::test_synchronize_no_open_bill — gracefully returns (pull_request, None) when no open bill exists
  • Full suite: 240/240 tests passing
  • All pre-commit hooks passing

🤖 Generated with Claude Code

When new commits are pushed to a PR with an open bill, the bill is now
closed with a new AMENDED status instead of being silently invalidated.
The PullRequestHandler.synchronize() method updates the stored PR SHA
and closes any open bill as amended; draft bills are unaffected.

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

codecov Bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d7cfec9) to head (12e85f7).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #299   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        49           
  Lines         2008      2018   +10     
=========================================
+ Hits          2008      2018   +10     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mfosterw mfosterw merged commit a08a50e into master Mar 3, 2026
4 checks passed
@mfosterw mfosterw deleted the handle-synchronize-webhook branch March 3, 2026 20:39
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.

1 participant