-
Notifications
You must be signed in to change notification settings - Fork 51
Add missing activity types for pull_request and pull_request_target #242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds four missing activity types (milestoned, demilestoned, enqueued, dequeued) to the pull_request and pull_request_target workflow trigger events, ensuring they're consistent with GitHub's official documentation. Additionally, it introduces a comprehensive test suite to automatically detect and prevent future synchronization issues between the workflow schema and webhook definitions.
Key changes:
- Added missing activity types to both pull_request and pull_request_target events in the workflow schema
- Created automated schema-sync test with bidirectional validation and exception handling
- Updated test data to reflect the new activity types
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| workflow-parser/src/workflow-v1.0.json | Added milestoned, demilestoned, enqueued, and dequeued to the allowed-values arrays and descriptions for both pull-request-activity-type and pull-request-target-activity-type definitions |
| workflow-parser/src/schema-sync.test.ts | New test file that validates activity types stay synchronized between workflow-v1.0.json and webhooks.json with support for known discrepancies (webhook-only types, schema-only types, and naming differences) |
| workflow-parser/testdata/reader/events-mapping-all.yml | Updated test data to include the four new activity types in both the YAML event definitions and expected JSON output for pull_request and pull_request_target events |
| docs/json-data-files.md | Added comprehensive documentation explaining the schema synchronization test, how to resolve test failures, and the three categories of known discrepancies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
410743a to
037c78b
Compare
Fixes #51 Added the following activity types to pull_request and pull_request_target: - milestoned - demilestoned - enqueued - dequeued These types were missing from workflow-v1.0.json but are valid workflow triggers per GitHub docs. Also added schema-sync.test.ts to ensure activity types in workflow-v1.0.json stay in sync with webhooks.json. The test: - Checks both directions (webhooks→schema and schema→webhooks) - Has WEBHOOK_ONLY for types not valid as workflow triggers: - check_suite: requested, rerequested - registry_package: default - Has SCHEMA_ONLY for types valid in workflows but not in webhooks: - registry_package: updated - Has NAME_MAPPINGS for naming differences: - project_column: edited (webhook) ↔ updated (schema) - Provides actionable error messages when mismatches are found
037c78b to
5ec1a88
Compare
Fixes:
(de)milestoned#51Added the following activity types to
pull_requestandpull_request_target:milestoneddemilestonedenqueueddequeuedThese types were missing from workflow-v1.0.json but are valid workflow triggers per GitHub docs.
Also added
schema-sync.test.tsto ensure activity types in workflow-v1.0.json stay in sync with webhooks.json. The test:WEBHOOK_ONLYfor types not valid as workflow triggersSCHEMA_ONLYfor types valid in workflows but not in webhooksNAME_MAPPINGSfor naming differencesUpdated
docs/json-data-files.mdwith instructions for fixing schema sync failures.