Repository navigation
Conversation
GitHub sends the `issues` event with the `status_changed` action when the status of an issue changes, and includes `status` on the issue in `issues` payloads. Workflow authors can filter on it with `types: [status_changed]`, but the editor reports it as an unexpected value. - Add `status_changed` to the `issues` activity types in workflow-v1.0.json and to the reader test data. - Update rest-api-description to 5c36b6f, which publishes the `status_changed` webhook and `status` on issues, and regenerate webhooks.json and objects.json with `npm run update-webhooks`, so `github.event.status`, `github.event.changes` and `github.event.issue.status` complete. This also picks up other changes made to the webhook descriptions since the last update. - Add `issue_relates_to` to DROPPED_EVENTS: it's not a workflow trigger. - Add `label` `archived` and `unarchived` to the schema-sync test's WEBHOOK_ONLY list: they're not listed as workflow trigger activity types. - Add completion, validation and payload tests, and add `status` to the expected issue properties. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the changes adding issue status-change support.
No open issues 🎉
What changed in this PR
Adds editor support for the preview issues.status_changed activity type, aligning workflow validation, completion, and event payload metadata with GitHub’s webhook schema.
Changes:
- Accepts and suggests
status_changedin issue trigger filters. - Updates the webhook schema dependency and generated payload data to expose issue status fields and other upstream additions.
- Adds regression tests and updates exclusions for webhook-only events and actions.
| File | Description |
|---|---|
workflow-parser/testdata/reader/events-mapping-all.yml |
Adds status_changed to the parser fixture and expected output. |
workflow-parser/src/workflow-v1.0.json |
Adds the activity type to the workflow schema and documentation. |
workflow-parser/src/schema-sync.test.ts |
Excludes webhook-only label archival actions from schema comparison. |
package-lock.json |
Updates the pinned rest-api-description commit. |
languageservice/src/validate.test.ts |
Tests validation of the new activity type. |
languageservice/src/context-providers/github.test.ts |
Adds status to expected issue context properties. |
languageservice/src/context-providers/events/webhooks.json |
Regenerates action payloads, including status_changed. |
languageservice/src/context-providers/events/objects.json |
Regenerates shared payload objects with status and upstream fields. |
languageservice/src/context-providers/events/eventPayloads.test.ts |
Tests status-change payload fields and previous-status access. |
languageservice/src/complete.test.ts |
Tests completion of status_changed in trigger filters. |
languageservice/script/webhooks/index.ts |
Excludes the non-trigger issue_relates_to webhook from generation. |
Review effort: Balanced
Pin rest-api-description to bd6df26 and regenerate webhooks.json and objects.json with `npm run update-webhooks`. This updates the planning status `id` descriptions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.
GitHub sends the
issueswebhook with astatus_changedaction when an issue's status changes, and includesstatuson the issue inissuespayloads (github/rest-api-description#7448). Workflows can filter on it withon: issues: types: [status_changed], but the editor reports it as an unexpected value. Issue statuses are in preview and only available to accounts enrolled in the preview.status_changedto theissuesactivity types inworkflow-v1.0.jsonandevents-mapping-all.yml.rest-api-descriptionto 5c36b6f and regenerateswebhooks.jsonandobjects.jsonwithnpm run update-webhooks, sogithub.event.status,github.event.changes.status.fromandgithub.event.issue.statuscomplete. This also picks up the other webhook changes since the last update, such aslabel.archived_atandlabelson issues, discussions and pull requests.issue_relates_towebhook toDROPPED_EVENTS, since it isn't a workflow trigger, and listslabelarchivedandunarchivedas webhook-only in the schema-sync test.statusto the expected issue properties.