Skip to content

Add issue-fields: read permission scope#41714

Closed
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/add-issue-fields-read-permission
Closed

Add issue-fields: read permission scope#41714
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/add-issue-fields-read-permission

Conversation

Copilot AI commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

gh-aw didn't recognize issue-fields as a valid GitHub Actions permission scope, so workflows requesting it would fail validation with an "unknown permission scope" error. This scope is required to read org issue field definitions and values via GITHUB_TOKEN.

Changes

  • pkg/workflow/permissions.go — adds PermissionIssueFields = "issue-fields" constant and includes it in GetAllPermissionScopes(), making it valid for GITHUB_TOKEN, recognized by the scope-name validator, rendered in YAML output, and included in read-all/write-all expansions

  • Tests — updates four count-based merge assertions and the write-all dangerous-permissions count to reflect the new scope; adds issue-fields to the valid-scope enumeration test and a new ValidatePermissionScopeNames case

  • Docs (reference/permissions.md) — lists issue-fields alongside other key scopes and adds a dedicated section explaining when it's needed and least-privilege guidance

permissions:
  contents: read
  issues: read
  issue-fields: read  # required for list_issue_fields, list_issue_types, and issue field value APIs

Copilot AI and others added 2 commits June 26, 2026 14:11
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support in gh-aw for granular permission issue_fields: read Add issue-fields: read permission scope Jun 26, 2026
Copilot AI requested a review from pelikhan June 26, 2026 14:25
@pelikhan pelikhan closed this Jun 26, 2026
@github-actions
github-actions Bot deleted the copilot/add-issue-fields-read-permission branch July 4, 2026 02:59
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.

2 participants