Add missing activity types for pull_request and pull_request_target#242
Merged
ericsciple merged 1 commit intomainfrom Dec 8, 2025
Merged
Add missing activity types for pull_request and pull_request_target#242ericsciple merged 1 commit intomainfrom
ericsciple merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
4 tasks
TingluoHuang
approved these changes
Dec 8, 2025
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.
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.