docs(action): fix missing required or default fields#1007
Open
kranthipoturaju wants to merge 1 commit into
Open
docs(action): fix missing required or default fields#1007kranthipoturaju wants to merge 1 commit into
kranthipoturaju wants to merge 1 commit into
Conversation
- 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>
There was a problem hiding this comment.
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 forgpg-private-key. - Expanded
java-version-filedescription to cover additional version file formats and document precedence vsjava-version. - Clarified
gpg-passphraseand other input descriptions to reflect actual default/behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 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.' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Corrects missing
required/defaultproperties and two factually inaccurate descriptions inaction.yml. No runtime behaviour is changed.Changes
java-version— addedrequired: false(was implicit, now explicit)java-version-file— addedrequired: false; fixed description which stated "the.java-versionfile" when the action also accepts.tool-versionsand.sdkmanrc(seesrc/util.ts:134–141)gpg-private-key— addeddefault: ''to match the existing description that already stated "Default is empty string"gpg-passphrase— fixed description:GPG_PASSPHRASEis only used as a fallback whengpg-private-keyis set; the original implied it was an unconditional default (seesrc/auth.ts:28–29)job-status— addedrequired: false(haddefaultbut norequired)token— addedrequired: false(haddefaultbut norequired)Motivation
action.ymlis the authoritative contract for users of this action — it drives IDE autocompletion, the Marketplace UI, and schema validators.Four inputs were missing an explicit
requiredfield, one was missing itsdefaultdespite the description documenting it, and two descriptions contradicted the implementation.Impact
requireddefaults tofalsein the GitHub Actions schema when omitted, so adding it explicitly is non-breaking.default: ''forgpg-private-keymatches whatcore.getInput()already returns when the input is unset.Testing
action.ymlhas no compiled artifact. Each change was verified against the implementation:java-version-filefile-format support:src/util.ts:134–141gpg-passphraseconditional default:src/auth.ts:28–29gpg-private-keyempty default:src/constants.ts:17requiredflags: cross-referencedcore.getInput()call sites insrc/setup-java.tsandsrc/auth.tsRelated issue:
No issue was created as the change is for the documentation only.
Check list: