Skip to content

docs(action): fix inaccuracies and add missing metadata to action.yml#2442

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

docs(action): fix inaccuracies and add missing metadata to action.yml#2442
kranthipoturaju wants to merge 1 commit into
actions:mainfrom
kranthipoturaju:docs/fix-action-yml-accuracy

Conversation

@kranthipoturaju
Copy link
Copy Markdown

Summary

Corrects and completes the metadata in action.yml to accurately reflect the runtime behavior of the action. No behavioral changes — documentation only.

Changes

  • persist-credentials description: Updated to reflect the v6 change where credentials are stored in a file under $RUNNER_TEMP (not written directly
    into .git/config), and that the post-job step removes that file.
  • filter description: Replaced the incorrect "Overrides sparse-checkout if set" with an accurate explanation — when filter and sparse-checkout are both set, the provided filter is used for git fetch instead of the automatic blob:none; sparse checkout itself still runs.
  • filter / sparse-checkout defaults: Removed default: null. YAML null is not a meaningful default for optional string inputs; omitting the key correctly signals no default value.
  • path default: Added default: '.' to document the code-level fallback (core.getInput('path') || '.').
  • required: false: Added to all optional inputs that had no explicit required field (ref, ssh-key, ssh-known-hosts, path, filter, sparse-checkout, github-server-url).
  • ref output description: Corrected — when the ref input is a full 40- or 64-character SHA, the code sets sourceSettings.ref = '', so this output is empty for SHA-based checkouts.
  • commit output 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.yml were stale (written before the v6 credential storage change), inaccurate (filter description, output descriptions), or incomplete (missing defaults and required flags). These inconsistencies could mislead users relying on the marketplace UI, tooling that parses action.yml, or anyone reading the source to understand the contract.

Impact

  • Users: No behavioral change. All input/output names and defaults remain backward compatible.
  • Tooling: Tools that parse action.yml (e.g., IDE extensions, linters, action documentation generators) will now see correct required and default values.
  • path default: Consumers setting path: '.' 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:

File Verified
src/input-helper.ts Input defaults and required semantics
src/git-source-provider.ts commit output only emitted in git path
src/main.ts ref output and SHA-based ref handling
src/git-auth-helper.ts persist-credentials / $RUNNER_TEMP behavior

Copilot AI review requested due to automatic review settings May 25, 2026 13:44
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

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 for path.
  • Expand/clarify descriptions for persist-credentials, filter, and outputs (ref, commit).
  • Remove default: null from inputs where absence should indicate “unset”.

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

Comment thread action.yml
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 thread action.yml
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.
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.

2 participants