Skip to content

feat(github-workflow): add missing issues activity types - #6212

Open
MattSkala wants to merge 1 commit into
SchemaStore:masterfrom
MattSkala:feat/github-workflow-issues-activity-types
Open

feat(github-workflow): add missing issues activity types#6212
MattSkala wants to merge 1 commit into
SchemaStore:masterfrom
MattSkala:feat/github-workflow-issues-activity-types

Conversation

@MattSkala

Copy link
Copy Markdown

Closes #6211

What

Adds the four issues activity types that GitHub supports but the schema does not accept:

typed, untyped, field_added, field_removed

ref: https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#issues

typed and untyped came with Issue Types. They are the only way to start a workflow when a user sets or removes the type of an issue, so a triage workflow that acts on one type cannot see an issue that gets its type after creation.

The value list appears twice in the issues block, so this changes both the enum and the identical default.

Test

Adds src/test/github-workflow/issues-activity-types.yaml, which lists every documented activity type for the event.

I checked that the test fails without the schema change (5 Ajv errors) and passes with it:

$ node ./cli.js check --schema-name=github-workflow.json
✔️ Completed "pre-checks"
✔️ Completed "Ajv validation"

Prettier reports no changes for either file.

GitHub supports typed, untyped, field_added and field_removed for the
issues event, but the schema stops at demilestoned. Add the four values
to the enum and to the identical default list, and cover them with a
positive test.

Closes SchemaStore#6211
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the PR!

This section of the codebase is owned by @madskristensen and @hyperupcall - if they write a comment saying "LGTM" then it will be merged.

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.

Missing typed, untyped, field_added, field_removed issues activity types in github-workflow.json

1 participant