Skip to content

docs(github): correct GitHub Action inputs - #44668

Closed
harshil-mistry wants to merge 1 commit into
anomalyco:devfrom
harshil-mistry:docs-github-action-inputs
Closed

docs(github): correct GitHub Action inputs#44668
harshil-mistry wants to merge 1 commit into
anomalyco:devfrom
harshil-mistry:docs-github-action-inputs

Conversation

@harshil-mistry

Copy link
Copy Markdown

Issue for this PR

Closes#44667

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The Configuration list on the GitHub Action docs page didn't match github/action.yml.

It documented a token input, which the action doesn't define — so anyone following the docs and setting with: token: ... gets it silently ignored, because composite actions just drop unknown inputs. The setup example had the same problem with a commented-out # github_token: xxxx. At the same time, four inputs that do exist (use_github_token, mentions, variant, oidc_base_url) weren't documented at all.

So this replaces the token bullet with use_github_token and adds the three missing ones, and changes the example's commented line to # use_github_token: true.

I also reworded the paragraph under it. It previously read as "alternatively you can use the built-in GITHUB_TOKEN", which suggested that using the runner token was a separate path from the input. It isn't — use_github_token: true is what selects it, and the token still has to be passed in env. github.handler.ts reads USE_GITHUB_TOKEN and then requires GITHUB_TOKEN, throwing GITHUB_TOKEN environment variable is not set. When using use_github_token, you must provide GITHUB_TOKEN. if it's absent. The PR example further down the same page already passes it that way, so this makes the Configuration section agree with the example.

Descriptions for the new bullets are taken from the description fields in action.yml and the defaults in the handler (mentions defaults to /opencode,/oc, oidc_base_url defaults to https://api.opencode.ai, use_github_token defaults to false).

How did you verify your code works?

Docs-only change, so there's nothing to run. I checked it by diffing the documented inputs against the inputs: block in github/action.yml, and by tracing each one to where it's consumed: USE_GITHUB_TOKEN and OIDC_BASE_URL in github.handler.ts, MENTIONS in the same file with the /opencode,/oc fallback, and VARIANT/AGENT/SHARE/PROMPT passed through the action's env block.

A reviewer can confirm by comparing the bullet list against github/action.yml.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

The Configuration list documented a `token` input that action.yml does not
define, and omitted use_github_token, mentions, variant and oidc_base_url.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@neriousy

Copy link
Copy Markdown
Contributor

Thanks @harshil-mistry for identifying the stale GitHub Action input documentation. This is superseded by #44793 (dev) and #44795 (v2), which include the same input correction plus a complete GITHUB_TOKEN example, OIDC-permission clarification, and corrected workflow indentation. Both replacement PRs credit your original report and contribution. Closing to consolidate the fix across both branches.

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.

GitHub Action docs document a token input that does not exist

2 participants

@harshil-mistry@neriousy