Skip to content

Conversation

@ericsciple
Copy link
Collaborator

@ericsciple ericsciple commented Dec 7, 2025

Fixes:

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)
  • Validates description text mentions all activity types
  • Has WEBHOOK_ONLY for types not valid as workflow triggers
  • Has SCHEMA_ONLY for types valid in workflows but not in webhooks
  • Has NAME_MAPPINGS for naming differences
  • Provides actionable error messages when mismatches are found

Updated docs/json-data-files.md with instructions for fixing schema sync failures.

@ericsciple ericsciple marked this pull request as ready for review December 7, 2025 20:21
@ericsciple ericsciple requested a review from a team as a code owner December 7, 2025 20:21
Copilot AI review requested due to automatic review settings December 7, 2025 20:21
Copy link
Contributor

Copilot AI left a 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.

@ericsciple ericsciple force-pushed the users/ericsciple/25-12-activity-types branch from 410743a to 037c78b Compare December 7, 2025 20:28
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
@ericsciple ericsciple force-pushed the users/ericsciple/25-12-activity-types branch from 037c78b to 5ec1a88 Compare December 7, 2025 20:35
@ericsciple ericsciple merged commit 8507419 into main Dec 8, 2025
7 checks passed
@ericsciple ericsciple deleted the users/ericsciple/25-12-activity-types branch December 8, 2025 19:44
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.

3 participants