Skip to content

Chore: Default path_prefix to the repository root - #125

Merged
tykeal merged 1 commit into
lfreleng-actions:mainfrom
modeseven-lfreleng-actions:chore/default-path-prefix
Jul 28, 2026
Merged

Chore: Default path_prefix to the repository root#125
tykeal merged 1 commit into
lfreleng-actions:mainfrom
modeseven-lfreleng-actions:chore/default-path-prefix

Conversation

@ModeSevenIndustrialSolutions

Copy link
Copy Markdown
Contributor

Chore: Default path_prefix to the repository root

Every sibling action in this organisation declares path_prefix with a . default — 28 of them. This one omitted it, so the declared interface didn't state where the action looks by default, and callers had to infer it or read the implementation.

Behaviour is unchanged

The action already normalises an empty value to . internally:

path_prefix="$PATH_PREFIX"
if [ -z "$path_prefix" ]; then
  path_prefix="."
fi

So this makes the declared interface match what the implementation always did. The practical gain is that GitHub surfaces the default in the Actions UI and in generated documentation, rather than leaving it blank.

Context

Part of a small consistency sweep across the estate, alongside gradle-build-action#103, which aligns that action's outlier path input onto path_prefix.

Deliberately not included in the sweep: python-audit-action, which defaults path_prefix to ''. That empty default is load-bearing — it is passed to pypa/gh-action-pip-audit as inputs:, where empty means "audit the installed environment" while '.' would mean "scan this directory". Changing it there would alter what gets audited.

Validation

pre-commit run --all-files — all hooks pass.

Every sibling action in this organisation declares path_prefix with
a '.' default; this one omitted it, so the interface did not state
where the action looks by default and callers had to infer it.

Behaviour is unchanged. The action already normalised an empty value
to '.' internally, so this makes the declared interface match what
the implementation always did, and lets GitHub surface the default
in the Actions UI.

Co-authored-by: Claude <claude@anthropic.com>
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions requested review from a team and Copilot July 28, 2026 13:15
@github-actions github-actions Bot added the chore Code chores (dependency updates, etc) label Jul 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns this action’s declared path_prefix input interface with its existing runtime behavior by surfacing the repository-root default in action.yaml, improving consistency with sibling actions and making the default visible in the GitHub Actions UI/docs.

Changes:

  • Set inputs.path_prefix.default to '.' in action.yaml to explicitly document the already-implemented default behavior.

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

@tykeal tykeal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Dependamerge
Approved this pull request ✅

@tykeal
tykeal merged commit d3bb00c into lfreleng-actions:main Jul 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Code chores (dependency updates, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants