Skip to content

Allow target in safe-outputs.create-check-run frontmatter schema - #53113

Merged
pelikhan merged 7 commits into
mainfrom
copilot/fix-create-check-run-target
Aug 16, 2026
Merged

Allow target in safe-outputs.create-check-run frontmatter schema#53113
pelikhan merged 7 commits into
mainfrom
copilot/fix-create-check-run-target

Conversation

CopilotAI commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

The Go compiler parses a target field on safe-outputs.create-check-run and the safe-outputs reference documents all four targeting modes, but the frontmatter JSON schema never declared the property while setting additionalProperties: false. Any workflow copying the documented example fails to compile, with a suggestion list pointing at unrelated keys.

safe-outputs:
create-check-run:
name: "Test Check"target: "*"
• .github/workflows/t.md:10:5: error: Unknown property: target. Did you mean 'staged'?

Changes

  • pkg/parser/schemas/main_workflow_schema.json — added the target string property to properties.safe-outputs.properties.create-check-run, matching the shape used by the ~27 other safe outputs that already declare it.
  • pkg/parser/schema_safe_outputs_target_test.go — added a create-check-run with target case to the existing TestMainWorkflowSchema_SafeOutputsTargetProperties regression table.

The reproduction workflow now compiles, and the generated lock file gains the pull-requests: read permission the docs describe as auto-added when target is configured — previously unreachable.

Not addressed

The issue also proposes extending scripts/check-safe-outputs-conformance.sh to assert that every yaml: tag on a safe-output config struct has a matching schema property, which would catch this class of drift rather than each instance. That is a broader change and is left as a follow-up so this fix stays narrow.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title [WIP] Fix schema rejection for create-check-run.targetAllow target in safe-outputs.create-check-run frontmatter schemaAug 16, 2026
CopilotAI requested a review from pelikhanAugust 16, 2026 12:49
@pelikhan
pelikhan marked this pull request as ready for review August 16, 2026 12:52
CopilotAI balanced review requested due to automatic review settings August 16, 2026 12:52
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot do this work: The issue also proposes extending scripts/check-safe-outputs-conformance.sh to assert that every yaml: tag on a safe-output config struct has a matching schema property, which would catch this class of drift rather than each instance.

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

Pull request overview

Adds schema support for safe-outputs.create-check-run.target, aligning validation with compiler behavior and documentation.

Changes:

  • Declares the target string property.
  • Adds regression coverage for schema validation.
Show a summary per file
FileDescription
pkg/parser/schemas/main_workflow_schema.jsonAdds create-check-run.target to the schema.
pkg/parser/schema_safe_outputs_target_test.goVerifies configurations using the property pass validation.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

},
"target": {
"type": "string",
"description": "Target pull request for check run attachment: 'triggering' (default), '*' (any PR), or explicit PR number"
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot PR sous-chef triage for #53113.

Run: https://github.com/github/gh-aw/actions/runs/31948478139

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 4.7 AIC · ⌖ 5.76 AIC · ⊞ 8.7K ·
Comment /souschef to run again

CopilotAIand others added 4 commits August 16, 2026 13:13
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

CopilotAI commented Aug 16, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot do this work: The issue also proposes extending scripts/check-safe-outputs-conformance.sh to assert that every yaml: tag on a safe-output config struct has a matching schema property, which w...

Implemented the conformance check in 4f1327b. It compares directly declared YAML fields on registered safe-output handler configs with their schema properties and now reports existing schema drift, while covering create-check-run.target.

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

CopilotAI commented Aug 16, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot PR sous-chef triage for #53113.

  • Failed checks:...

Addressed the outstanding target-semantics review in bc4ad18. Scoped validation passes; the reported prior unit-test failures reproduce in unrelated workflow validation tests and predate this correction.

CopilotAI requested a review from gh-aw-botAugust 16, 2026 13:36
@pelikhan
pelikhan merged commit 6871e22 into mainAug 16, 2026
@pelikhan
pelikhan deleted the copilot/fix-create-check-run-target branch August 16, 2026 13:37
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.1

Sign up for freeto 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.

create-check-run.target is parsed by the compiler and documented, but rejected by the frontmatter schema

4 participants

@pelikhan@gh-aw-bot