Skip to content

fix: add missing args input to GitHub Action and fix entrypoint quoting#61

Merged
maff merged 1 commit into
mainfrom
fix/action-entrypoints
Mar 15, 2026
Merged

fix: add missing args input to GitHub Action and fix entrypoint quoting#61
maff merged 1 commit into
mainfrom
fix/action-entrypoints

Conversation

@maff
Copy link
Copy Markdown
Owner

@maff maff commented Mar 15, 2026

Summary

  • Add missing args input to action.yml — all documentation references this input but it was never defined, meaning users could not pass CLI flags (e.g. -e npm -e java -c ...) through the GitHub Action
  • Entrypoint reads INPUT_ARGS env var — consistent with how INPUT_ENV, INPUT_JSON, INPUT_YAML are already handled. Replaces the unused $@ passthrough.
  • Fix entrypoint.sh quoting$PWD was unquoted inside an unnecessary sh -c wrapper, breaking on paths with spaces. Now matches the correct pattern in entrypoint-action.sh.

Test plan

  • CI passes (unit tests, e2e tests, action entrypoint tests)
  • Verify action entrypoint tests now pass INPUT_ARGS="" to cover the new env var
  • Test action locally with args: "-e npm" to confirm args are forwarded

Copilot AI review requested due to automatic review settings March 15, 2026 15:14
The action.yml was missing the documented `args` input, meaning users
could not pass CLI flags (e.g. `-e npm -e java -c ...`) through the
GitHub Action. The entrypoint now reads INPUT_ARGS directly, consistent
with how the other inputs are handled.

Also fixes entrypoint.sh where $PWD was unquoted inside an unnecessary
sh -c wrapper, which would break on paths with spaces.
@maff maff force-pushed the fix/action-entrypoints branch from b7830db to 7070e65 Compare March 15, 2026 15:15
@maff maff enabled auto-merge (squash) March 15, 2026 15:16
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

This PR fixes the GitHub Action interface and entrypoints so users can pass additional CLI flags via an args input, and so the entrypoint behaves correctly in workspaces whose paths contain spaces.

Changes:

  • Define the previously undocumented/missing args input in action.yml.
  • Update the action entrypoint to read INPUT_ARGS instead of relying on $@.
  • Fix quoting in entrypoint.sh when configuring Git safe.directory.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
entrypoint.sh Quotes $PWD correctly when setting safe.directory.
entrypoint-action.sh Switches to INPUT_ARGS for forwarding CLI flags to git-that-semver.
action.yml Adds missing inputs.args definition so with: args: works.
.github/workflows/build.yml Updates action-entrypoint test runs to provide INPUT_ARGS (empty) to avoid set -u failures.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment thread entrypoint-action.sh
Comment on lines 8 to 10
if [ "$INPUT_ENV" = "true" ]; then
env_result=$(git-that-semver "$@")
env_result=$(git-that-semver $INPUT_ARGS)
echo "$env_result" | tee -a "$GITHUB_OUTPUT"
Comment thread entrypoint-action.sh
Comment on lines 19 to 21
if [ "$INPUT_JSON" = "true" ]; then
json_result=$(git-that-semver "$@" -o json -c output.json.indent=2)
json_result=$(git-that-semver $INPUT_ARGS -o json -c output.json.indent=2)
{
Comment thread entrypoint-action.sh
Comment on lines 34 to 36
if [ "$INPUT_YAML" = "true" ]; then
yaml_result=$(git-that-semver "$@" -o yaml)
yaml_result=$(git-that-semver $INPUT_ARGS -o yaml)
{
Comment on lines 92 to 96
-e INPUT_ENV=true \
-e INPUT_JSON=false \
-e INPUT_YAML=false \
-e INPUT_ARGS="" \
-e GITHUB_ACTIONS=true \
Comment on lines +124 to +128
-e INPUT_ENV=true \
-e INPUT_JSON=false \
-e INPUT_YAML=false \
-e INPUT_ARGS="-e npm" \
-e GITHUB_ACTIONS=true \
@@ -123,6 +151,7 @@ jobs:
-e INPUT_ENV=false \
-e INPUT_JSON=true \
-e INPUT_YAML=false \
@maff maff merged commit 9688bb4 into main Mar 15, 2026
6 checks passed
@maff maff deleted the fix/action-entrypoints branch March 15, 2026 15:17
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