Skip to content

Add missing permission-discussions input to action.yml#360

Closed
salmanmkc wants to merge 1 commit intoactions:mainfrom
salmanmkc:salmanmkc/add-permission-discussions
Closed

Add missing permission-discussions input to action.yml#360
salmanmkc wants to merge 1 commit intoactions:mainfrom
salmanmkc:salmanmkc/add-permission-discussions

Conversation

@salmanmkc
Copy link
Copy Markdown
Contributor

Problem

The discussions permission is already handled at runtime via process.env (like all other permissions), but it was never declared as an input in action.yml. This causes an "Unexpected input 'permission-discussions'" warning when users set it in their workflows.

Fix

Add the permission-discussions input declaration to action.yml, matching the pattern of all other permission inputs. This is a 2-line change — no runtime behavior changes.

Related

The discussions permission is already handled at runtime via
process.env but was not declared in action.yml, causing an
'Unexpected input' warning when users set it. This adds the
missing input declaration to match the other permission inputs.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds the missing permission-discussions input to the action metadata so workflows can set this permission without triggering the “Unexpected input” warning, aligning action.yml with the action’s runtime permission handling.

Changes:

  • Declare permission-discussions under the generated permissions inputs block in action.yml.
Show a summary per file
File Description
action.yml Adds the missing permission-discussions input declaration to eliminate “Unexpected input” warnings.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment on lines +46 to +47
permission-discussions:
description: "The level of permission to grant the access token for discussions. Can be set to 'read' or 'write'."
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This input is inside the # <START GENERATED PERMISSIONS INPUTS> block, but the generator (scripts/update-permission-inputs.js) currently derives inputs from scripts/generated/app-permissions.json, which does not include a discussions permission. Re-running the update script (e.g., when package.json/package-lock.json changes) will likely remove permission-discussions and reintroduce the warning. Please update the source of generation as well (e.g., bump @octokit/openapi to a schema version that includes discussions, or patch the generator to append this permission) so the generated block remains stable.

Copilot uses AI. Check for mistakes.
@salmanmkc
Copy link
Copy Markdown
Contributor Author

salmanmkc commented Apr 10, 2026

Note: This is a short-term fix. The permission-* inputs are auto-generated by scripts/update-permission-inputs.js from @octokit/openapi, and discussions is missing from the upstream OpenAPI spec's app-permissions schema (it only has team_discussions). A future run of the generator workflow would silently remove this addition.

The proper long-term fix is adding discussions to the app-permissions schema in octokit/openapi#529

@parkerbxyz
Copy link
Copy Markdown
Contributor

Closing in favor of #358.

@parkerbxyz parkerbxyz closed this Apr 11, 2026
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.

Add missing permission-discussions input to action.yml

3 participants