Repository navigation
Accept status_changed issue triggers - #77179
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
status_changed issue triggers
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review to run again
| @echo "Patching GitHub Actions schema with custom permissions..." | ||
| @tmpfile=$$(mktemp) && \ | ||
| jq 'def append_missing($$items): reduce $$items[] as $$item (. ; if index($$item) then . else . + [$$item] end); .definitions["permissions-event"].properties += {"copilot-requests": {"type": "string", "enum": ["write", "none"]}, "drives": {"$$ref": "#/definitions/permissions-level"}, "vulnerability-alerts": {"type": "string", "enum": ["read", "none"]}} | (.properties.on.oneOf[] | select(.properties? and .properties.issues? and .properties.issues.properties? and .properties.issues.properties.types?).properties.issues.properties.types.items.enum) |= append_missing(["typed", "untyped", "field_added", "field_removed"]) | (.properties.on.oneOf[] | select(.properties? and .properties.issues? and .properties.issues.properties? and .properties.issues.properties.types?).properties.issues.properties.types.default) |= append_missing(["typed", "untyped", "field_added", "field_removed"])' \ | ||
| jq 'def append_missing($$items): reduce $$items[] as $$item (. ; if index($$item) then . else . + [$$item] end); .definitions["permissions-event"].properties += {"copilot-requests": {"type": "string", "enum": ["write", "none"]}, "drives": {"$$ref": "#/definitions/permissions-level"}, "vulnerability-alerts": {"type": "string", "enum": ["read", "none"]}} | (.properties.on.oneOf[] | select(.properties?.issues?.oneOf?) | .properties.issues.oneOf[] | select(.properties?.types?).properties.types.items.enum) |= append_missing(["typed", "untyped", "field_added", "field_removed", "status_changed"]) | (.properties.on.oneOf[] | select(.properties?.issues?.oneOf?) | .properties.issues.oneOf[] | select(.properties?.types?).properties.types.default) |= append_missing(["typed", "untyped", "field_added", "field_removed", "status_changed"])' \ |
There was a problem hiding this comment.
The selector now depends on the downloaded schema representing issues as an object containing oneOf; if SchemaStore changes that shape, both |= paths silently match nothing and this target still succeeds, leaving the generated schema without status_changed. That turns a regeneration into a latent validation regression. Please make the target assert that the resulting enum/default contain status_changed (or otherwise fail when the selector matches no nodes).
There was a problem hiding this comment.
Added a fail-fast selector check and verified that every matched issue enum and default contains status_changed, so schema regeneration cannot silently no-op.
There was a problem hiding this comment.
Found one maintainability/correctness risk in the schema regeneration target: the jq selector can silently no-op if the upstream schema shape changes, allowing a generated schema without status_changed to be committed. Please add an assertion or fail-fast check after patching. No tests were run per static-review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change adding status_changed issue activity support.
No open issues 🎉
What changed in this PR
Adds support for the preview status_changed issue activity in gh-aw, addressing #77162 while continuing to reject invalid values such as status_change.
Changes:
- Updates the frontmatter and generated Actions schemas to accept
status_changed. - Fixes the Makefile selector for nested issue activity types.
- Extends compiler validation without modifying the pinned upstream schema, with positive and negative regression tests.
| File | Description |
|---|---|
pkg/workflow/schemas/github-workflow.json |
Adds status_changed to issue activity values and defaults. |
pkg/workflow/schema_validation_test.go |
Tests valid and misspelled issue activity types. |
pkg/workflow/actionslanguageservice/compiler_schema.go |
Extends the compiler overlay using a copied activity-type slice. |
pkg/workflow/actionslanguageservice/compiler_schema_test.go |
Tests acceptance, typo rejection, and upstream schema isolation. |
pkg/parser/schemas/main_workflow_schema.json |
Allows status_changed in workflow frontmatter. |
pkg/parser/schema_test.go |
Tests frontmatter acceptance and typo rejection. |
Makefile |
Corrects the nested schema selector and includes status_changed. |
Review effort: Balanced (auto)
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design, /tdd, and a schema-consistency check. The change is correct. I found no blocking issues, only robustness and clarity suggestions.
📋 Verification performed
- The jq selector matches exactly one upstream
issuesentry, and the Makefile recipe is idempotent on the committed schema. - All three schema copies (
pkg/workflow/schemas,pkg/parser/schemas, and the overlay) are consistent. - The
issues-activity-typeoverlay key exists inworkflow-v1.0.json. - Targeted tests pass:
actionslanguageservice,parser, andworkflowschema tests.
💬 Open questions
- The webhook gateway catalog (
actions/setup/js/github_notification_webhooks.json) and its spec table (docs/src/content/docs/specs/webhook-gateway-specification.md) still omitstatus_changed. Confirm whether that is intentional scope. If the gateway should accept it, update both. - The jq selector fails open if the upstream shape changes (see the inline comment on the Makefile).
See the three inline comments for details. @copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| @echo "Patching GitHub Actions schema with custom permissions..." | ||
| @tmpfile=$$(mktemp) && \ | ||
| jq 'def append_missing($$items): reduce $$items[] as $$item (. ; if index($$item) then . else . + [$$item] end); .definitions["permissions-event"].properties += {"copilot-requests": {"type": "string", "enum": ["write", "none"]}, "drives": {"$$ref": "#/definitions/permissions-level"}, "vulnerability-alerts": {"type": "string", "enum": ["read", "none"]}} | (.properties.on.oneOf[] | select(.properties? and .properties.issues? and .properties.issues.properties? and .properties.issues.properties.types?).properties.issues.properties.types.items.enum) |= append_missing(["typed", "untyped", "field_added", "field_removed"]) | (.properties.on.oneOf[] | select(.properties? and .properties.issues? and .properties.issues.properties? and .properties.issues.properties.types?).properties.issues.properties.types.default) |= append_missing(["typed", "untyped", "field_added", "field_removed"])' \ | ||
| jq 'def append_missing($$items): reduce $$items[] as $$item (. ; if index($$item) then . else . + [$$item] end); .definitions["permissions-event"].properties += {"copilot-requests": {"type": "string", "enum": ["write", "none"]}, "drives": {"$$ref": "#/definitions/permissions-level"}, "vulnerability-alerts": {"type": "string", "enum": ["read", "none"]}} | (.properties.on.oneOf[] | select(.properties?.issues?.oneOf?) | .properties.issues.oneOf[] | select(.properties?.types?).properties.types.items.enum) |= append_missing(["typed", "untyped", "field_added", "field_removed", "status_changed"]) | (.properties.on.oneOf[] | select(.properties?.issues?.oneOf?) | .properties.issues.oneOf[] | select(.properties?.types?).properties.types.default) |= append_missing(["typed", "untyped", "field_added", "field_removed", "status_changed"])' \ |
There was a problem hiding this comment.
[/codebase-design] The new selector is correct for the current schema (it matches exactly one issues entry). But if upstream reshapes on.issues.oneOf, select yields nothing, jq exits 0, and the enum patch becomes a silent no-op.
💡 Suggested guard
Fail the recipe when the selector matches nothing, for example by adding a stage before the patch:
if ([.properties.on.oneOf[] | select(.properties?.issues?.oneOf?)] | length) == 0 then error("issues types selector matched nothing") else . endA cheap alternative is a jq -e assertion on the output that status_changed is present in the patched enum.
@copilot please address this.
There was a problem hiding this comment.
Added the suggested guard plus a post-patch assertion for both the enum and default arrays in the Makefile target.
| statusChanged := "on:\n issues:\n types: [status_changed]\njobs:\n build:\n runs-on: ubuntu-latest\n steps: [{run: echo hi}]\n" | ||
| require.NoError(t, ValidateWorkflowWithCacheMode("issues.yml", statusChanged)) | ||
|
|
||
| _, err := ParseWorkflow("upstream.yml", statusChanged) |
There was a problem hiding this comment.
[/tdd] This assertion intentionally pins the upstream schema to reject status_changed, which proves the overlay is needed. That intent is not obvious, and the test will start failing once the pinned schema adds the value.
💡 Suggested clarification
Add a one-line comment above the ParseWorkflow call, for example: // Pinned upstream still rejects status_changed; this fails when the overlay is no longer needed.
@copilot please address this.
There was a problem hiding this comment.
Added a test comment clarifying that the pinned upstream schema must reject status_changed until it includes the value.
| schema := maps.Clone(upstream) | ||
| schema["cache-mode"] = definition{AllowedValues: []string{"read", "write", "write-only", "none"}} | ||
| issuesActivityType := schema["issues-activity-type"] | ||
| issuesActivityType.AllowedValues = append(append([]string(nil), issuesActivityType.AllowedValues...), "status_changed") |
There was a problem hiding this comment.
[/codebase-design] Copying AllowedValues before appending correctly avoids mutating the cached upstream slice. That aliasing risk is non-obvious, so a short comment would help future edits.
@copilot please address this.
There was a problem hiding this comment.
Added a comment explaining that the slice is copied before append to preserve the cached upstream schema.
|
@copilot run pr-finisher skill |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Ran the PR finisher pass. Review fixes are in commit
Added a fail-fast selector guard and output assertions to the Makefile schema patch target. |
|
🎉 This pull request is included in a new release. Release: |
on.issues.typesrejected GitHub’s previewstatus_changedactivity. Add support while keeping invalid values such asstatus_changerejected.oneOf.status_changedwhile preserving the pinned upstream schema.status_changedinon.issues.types#77162