docs(action): fix inaccuracies and add missing metadata to action.yml#2442
Open
kranthipoturaju wants to merge 1 commit into
Open
docs(action): fix inaccuracies and add missing metadata to action.yml#2442kranthipoturaju wants to merge 1 commit into
kranthipoturaju wants to merge 1 commit into
Conversation
Contributor
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 document optional inputs/outputs and clarify behavior for credential persistence and checkout options.
Changes:
- Mark several inputs as explicitly optional (
required: false) and add a default forpath. - Expand/clarify descriptions for
persist-credentials,filter, and outputs (ref,commit). - Remove
default: nullfrom inputs where absence should indicate “unset”.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+114
to
+115
| The branch or tag ref that was checked out. Empty when the checkout was | ||
| performed by a full commit SHA. |
Comment on lines
+58
to
+60
| steps. When true, credentials are stored in a file under `$RUNNER_TEMP` | ||
| and referenced from the local git config. The post-job step removes the | ||
| credential file. |
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 and completes the metadata in
action.ymlto accurately reflect the runtime behavior of the action. No behavioral changes — documentation only.Changes
persist-credentialsdescription: Updated to reflect the v6 change where credentials are stored in a file under$RUNNER_TEMP(not written directlyinto
.git/config), and that the post-job step removes that file.filterdescription: Replaced the incorrect "Overrides sparse-checkout if set" with an accurate explanation — whenfilterandsparse-checkoutare both set, the provided filter is used forgit fetchinstead of the automaticblob:none; sparse checkout itself still runs.filter/sparse-checkoutdefaults: Removeddefault: null. YAMLnullis not a meaningful default for optional string inputs; omitting the key correctly signals no default value.pathdefault: Addeddefault: '.'to document the code-level fallback (core.getInput('path') || '.').required: false: Added to all optional inputs that had no explicitrequiredfield (ref,ssh-key,ssh-known-hosts,path,filter,sparse-checkout,github-server-url).refoutput description: Corrected — when therefinput is a full 40- or 64-character SHA, the code setssourceSettings.ref = '', so this output is empty for SHA-based checkouts.commitoutput description: Added caveat that this output is only emitted in the git code path (git log --format=%H); it is never set when the action falls back to the GitHub REST API downloader.Motivation
Several descriptions in
action.ymlwere stale (written before the v6 credential storage change), inaccurate (filterdescription, output descriptions), or incomplete (missing defaults andrequiredflags). These inconsistencies could mislead users relying on the marketplace UI, tooling that parsesaction.yml, or anyone reading the source to understand the contract.Impact
action.yml(e.g., IDE extensions, linters, action documentation generators) will now see correctrequiredanddefaultvalues.pathdefault: Consumers settingpath: '.'explicitly may notice it is now the documented default — no functional difference.Testing
Documentation-only change. Validated by cross-referencing each modified field against the implementation in:
src/input-helper.tsrequiredsemanticssrc/git-source-provider.tscommitoutput only emitted in git pathsrc/main.tsrefoutput and SHA-based ref handlingsrc/git-auth-helper.tspersist-credentials/$RUNNER_TEMPbehavior