Skip to content

docs(action): fix missing required or default fields#1007

Open
kranthipoturaju wants to merge 1 commit into
actions:mainfrom
kranthipoturaju:docs/fix-action-yml-input-metadata
Open

docs(action): fix missing required or default fields#1007
kranthipoturaju wants to merge 1 commit into
actions:mainfrom
kranthipoturaju:docs/fix-action-yml-input-metadata

Conversation

@kranthipoturaju
Copy link
Copy Markdown

Summary

Corrects missing required/default properties and two factually inaccurate descriptions in action.yml. No runtime behaviour is changed.

Changes

  • java-version — added required: false (was implicit, now explicit)
  • java-version-file — added required: false; fixed description which stated "the .java-version file" when the action also accepts .tool-versions and .sdkmanrc (see src/util.ts:134–141)
  • gpg-private-key — added default: '' to match the existing description that already stated "Default is empty string"
  • gpg-passphrase — fixed description: GPG_PASSPHRASE is only used as a fallback when gpg-private-key is set; the original implied it was an unconditional default (see src/auth.ts:28–29)
  • job-status — added required: false (had default but no required)
  • token — added required: false (had default but no required)

Motivation

action.yml is the authoritative contract for users of this action — it drives IDE autocompletion, the Marketplace UI, and schema validators.
Four inputs were missing an explicit required field, one was missing its default despite the description documenting it, and two descriptions contradicted the implementation.

Impact

  • Users: no change in runtime behaviour; required defaults to false in the GitHub Actions schema when omitted, so adding it explicitly is non-breaking. default: '' for gpg-private-key matches what core.getInput() already returns when the input is unset.
  • Tooling: schema validators and IDE extensions will now correctly reflect these inputs as optional.
  • Backward compatibility: fully preserved — no input names, types, or previously declared defaults were altered.

Testing

action.yml has no compiled artifact. Each change was verified against the implementation:

  • java-version-file file-format support: src/util.ts:134–141
  • gpg-passphrase conditional default: src/auth.ts:28–29
  • gpg-private-key empty default: src/constants.ts:17
  • required flags: cross-referenced core.getInput() call sites in src/setup-java.ts and src/auth.ts

Related issue:
No issue was created as the change is for the documentation only.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

- Add required: false to java-version, java-version-file, job-status, and token, which had defaults or were optional but lacked the explicit flag
- Add default: '' to gpg-private-key to match its stated description
- Fix java-version-file description: the input accepts .java-version, .tool-versions, and .sdkmanrc, not only .java-version
- Fix gpg-passphrase description: GPG_PASSPHRASE is only defaulted when gpg-private-key is provided, not unconditionally

Co-authored-by: Kranthi Poturaju <152148+kranthipoturaju@users.noreply.github.com>

Co-authored-by: Panuganti Saketh <sakethpanuganti@gmail.com>
Copilot AI review requested due to automatic review settings May 25, 2026 13:41
@kranthipoturaju kranthipoturaju requested a review from a team as a code owner May 25, 2026 13:41
Copy link
Copy Markdown

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

Note

Copilot was unable to run its full agentic suite in this review.

Updates the GitHub Action metadata to better describe optional inputs and clarify how Java version selection and GPG passphrase handling work.

Changes:

  • Marked several inputs as explicitly optional (required: false) and added an explicit empty-string default for gpg-private-key.
  • Expanded java-version-file description to cover additional version file formats and document precedence vs java-version.
  • Clarified gpg-passphrase and other input descriptions to reflect actual default/behavior.

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

Comment thread action.yml
gpg-passphrase:
description: 'Environment variable name for the GPG private key passphrase. Default is
$GPG_PASSPHRASE.'
description: 'Environment variable name for the GPG private key passphrase. Defaults to GPG_PASSPHRASE when gpg-private-key is set; ignored otherwise.'
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.

3 participants