Skip to content

Accept status_changed issue triggers - #77179

Merged
pelikhan merged 3 commits into
mainfrom
copilot/accept-status-changed-in-on-issues-types
Nov 12, 2026
Merged

pelikhan merged 3 commits into
mainfrom
copilot/accept-status-changed-in-on-issues-types

Conversation

Copilot AI commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

on.issues.types rejected GitHub’s preview status_changed activity. Add support while keeping invalid values such as status_change rejected.

  • Schemas: Update the frontmatter schema and generated Actions schema; fix the Makefile selector to patch issue types nested under oneOf.
  • Compiler validation: Extend the compiler overlay with status_changed while preserving the pinned upstream schema.
on:
  issues:
    types: [status_changed]

Copilot AI linked an issue Nov 12, 2026 that may be closed by this pull request
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add status_changed to on.issues.types Accept status_changed issue triggers Nov 12, 2026
Copilot AI requested a review from pelikhan November 12, 2026 15:54
@pelikhan
pelikhan marked this pull request as ready for review November 12, 2026 17:29
Copilot AI dynamic review requested due to automatic review settings November 12, 2026 17:29
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated from Ponytail Reviewer · routed: gpt61 medium · ~5 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 181 · ◷

Generated by Ponytail Reviewer for #77179

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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: reported_no_action

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.

Generated from Design Decision Gate 🏗️ · routed: sonnet55 high · ~6 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.5K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

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.

Generated from PR Specification Reviewer · gpt56 · ~2 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 1.6K · ◷

Generated by PR Specification Reviewer for #77179

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

Generated from Test Quality Sentinel · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.2K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-12T17:35:00Z
review_event: COMMENT
top_themes: [schema regeneration robustness]
files_reviewed: [Makefile, pkg/parser/schema_test.go, pkg/parser/schemas/main_workflow_schema.json, pkg/workflow/actionslanguageservice/compiler_schema.go, pkg/workflow/actionslanguageservice/compiler_schema_test.go, pkg/workflow/schema_validation_test.go, pkg/workflow/schemas/github-workflow.json]
comment_count: 1

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review to run again

Comment thread Makefile Outdated
@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"])' \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 issues entry, 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-type overlay key exists in workflow-v1.0.json.
  • Targeted tests pass: actionslanguageservice, parser, and workflow schema 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 omit status_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

Comment thread Makefile Outdated
@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"])' \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/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 . end

A cheap alternative is a jq -e assertion on the output that status_changed is present in the patched enum.

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment explaining that the slice is copied before append to preserve the cached upstream schema.

@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot run pr-finisher skill

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

@copilot run pr-finisher skill

Ran the PR finisher pass. Review fixes are in commit f716b5f; local formatting, lint, focused and impacted tests, and workflow drift checks passed. CI needs a maintainer re-trigger after this push.

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_chang...

Added a fail-fast selector guard and output assertions to the Makefile schema patch target.

@pelikhan
pelikhan merged commit 7766e83 into main Nov 12, 2026
121 checks passed
@pelikhan
pelikhan deleted the copilot/accept-status-changed-in-on-issues-types branch November 12, 2026 20:13
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.3

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.

Accept status_changed in on.issues.types

3 participants