Parse pr:modified draft→ready flips as synthetic pr:ready_for_review#59
Merged
Conversation
- Emit pr:ready_for_review when previousDraft=true & draft=false - Skip title/description/target-only pr:modified variants - Attribute actor as author for the synthetic event - Add test fixtures and comprehensive parser tests - Update docs (README, setup guide, onboarding script)
Resolve conflict in tests/test_parsers_bitbucket.py by keeping both new test classes — TestExtractPrDeclined from #58 (master) and TestExtractPrModified from this branch. The pr:declined and pr:modified work is orthogonal; both belong in the parser tests. The script's REQUIRED_WEBHOOK_EVENTS tuple auto-merged with pr:declined inserted next to pr:modified — no manual fix-up needed there.
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
pr:ready_for_reviewevent type emitted by the parser when apr:modifiedpayload carriespreviousDraft=true, draft=false.pr:modifiedvariants (title/description/target changes) are skipped at parse time.pr:modifiedtrigger.COALESCE(pr:ready_for_review, pr:opened)withoccurred_at >= clock_startguard) in README.Testing
test_draft_to_ready_flip_emits_synthetic_ready_for_review— verifiespr:ready_for_reviewevent_type, raweventKeypreserved on payloadtest_draft_to_ready_uses_actor_as_author— maintainer flip attributes to flipper not PR authortest_title_only_modify_returns_skip— title/description changes returnBitbucketSkiptest_ready_to_draft_returns_skip— reverse flip (ready→draft) skippedtest_pr_opened_as_draft_passes_through_unchanged— regression guard: opened-as-draft rows still emitted with rawdraftfieldtest_modified_without_draft_fields_returns_skip— no draft fields → skip (not a synthetic ready)ruff check . && ruff format --check . && pyright— clean