Skip to content

[WIP] Add missing organization-custom-org-roles and organization-custom-repository-roles to JSON Schema - #56982

Merged
pelikhan merged 3 commits into
mainfrom
copilot/deep-report-add-custom-role-fields
Aug 30, 2026
Merged

[WIP] Add missing organization-custom-org-roles and organization-custom-repository-roles to JSON Schema#56982
pelikhan merged 3 commits into
mainfrom
copilot/deep-report-add-custom-role-fields

Conversation

Copilot AI commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>[deep-report] JSON Schema missing organization-custom-org-roles / organization-custom-repository-roles permission fields</issue_title>
<issue_description>### Problem

organization-custom-org-roles and organization-custom-repository-roles are supported permission fields in the Go types and documented, but they are missing from the JSON Schema, so workflows using them would not get schema-validated (or would be flagged as invalid by external tooling/editors that validate against the schema).

Evidence

  • pkg/workflow/frontmatter_types.go:86,88 (GitHubAppPermissionsConfig) defines both fields.
  • Documented at docs/src/content/docs/reference/frontmatter.md:186.
  • Missing from $defs.github_actions_permissions.properties in the JSON Schema.
  • Source: Schema Consistency discussion github/gh-aw#56834, finding 3.

Suggested action

Add organization-custom-org-roles and organization-custom-repository-roles to $defs.github_actions_permissions.properties in the JSON Schema so schema-validated editors/tools recognize these already-supported fields.

Acceptance criteria

  • Both fields are present in the JSON Schema's github_actions_permissions definition with correct types.
  • A workflow frontmatter using either field validates cleanly against the schema.

[!WARNING]

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • api.anthropic.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.anthropic.com"

See Network Configuration for more information.

Generated by 🔬 Deep Report · claude · agent · 258.7 AIC · ⌖ 8.26 AIC · ⊞ 12.4K ·

  • expires on Aug 30, 2026, 10:49 PM UTC-08:00

Comments on the Issue (you are @copilot in this section)

@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot try again

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

Copilot AI commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

@copilot try again

Fixed: the workflow-level permission schema now includes organization-custom-org-roles and organization-custom-repository-roles, and I added a regression check to keep them validated. go test ./pkg/workflow -run 'TestPermission' passes.

@pelikhan
pelikhan marked this pull request as ready for review August 30, 2026 00:34
Copilot AI balanced review requested due to automatic review settings August 30, 2026 00:34

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.

🟡 Changes recommended

Permission error hints remain stale, and actual frontmatter validation lacks direct regression coverage.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds two supported organization role permissions to workflow schema validation and editor autocomplete.

Changes:

  • Adds both permission scopes to the shared schema.
  • Updates generated autocomplete metadata.
  • Adds schema consistency checks.
File summaries
File Description
pkg/parser/schemas/main_workflow_schema.json Defines both permission scopes.
docs/public/editor/autocomplete-data.json Exposes scopes in autocomplete.
pkg/workflow/permissions_schema_consistency_test.go Checks scope presence.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment on lines +14961 to +14964
"organization-custom-org-roles": {
"type": "string",
"enum": ["read", "write", "none"],
"description": "Permission level for organization custom org roles (read/write/none). Controls access to custom organization role metadata."

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 both scopes to knownFieldValidValues and knownFieldScopes for /permissions and /on/permissions in pkg/parser/schema_errors.go (commit 2eded67).

Comment on lines +72 to +75
if _, ok := actionsPermProps[string(scope)]; !ok {
t.Errorf("permission scope %q from GetAllGitHubAppOnlyScopes() is missing from "+
"$defs.github_actions_permissions.properties in pkg/parser/schemas/main_workflow_schema.json", scope)
}

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 TestOrganizationCustomRolePermissionsValidateAgainstSchema using ValidateMainWorkflowFrontmatterWithSchemaAndLocation, covering both valid values and invalid-value rejection for both scopes (commit 2eded67).

@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot run pr-finisher skill

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

Copy link
Copy Markdown
Collaborator

@copilot PR #56982 still needs forward progress.

  • A maintainer already asked to run the pr-finisher skill.
  • Please address the outstanding Copilot review feedback: update the permission error hints and add direct regression coverage for frontmatter validation of the two new organization role permissions.
  • After pushing the fix, rerun the pr-finisher skill and summarize the changes on the PR.

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 15 AIC · ⌖ 8.63 AIC · ⊞ 9K ·
Comment /souschef to run again

Copilot AI commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

@copilot PR #56982 still needs forward progress.

  • A maintainer already asked to run the pr-finisher skill....

The permission error hints and direct frontmatter validation regression coverage were already added and pushed in commit 2eded67 (before this comment was posted). Both changes are present on the current HEAD:

  • pkg/parser/schema_errors.go: knownFieldValidValues/knownFieldScopes for /permissions and /on/permissions now include both scopes.
  • pkg/workflow/permissions_schema_consistency_test.go: TestOrganizationCustomRolePermissionsValidateAgainstSchema validates both scopes via ValidateMainWorkflowFrontmatterWithSchemaAndLocation, including invalid-value rejection.

Re-running the pr-finisher skill now.

Copilot AI requested a review from gh-aw-bot August 30, 2026 02:56
@pelikhan
pelikhan merged commit 973ece4 into main Aug 30, 2026
1 check passed
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.

[deep-report] JSON Schema missing organization-custom-org-roles / organization-custom-repository-roles permission fields

4 participants