Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
platform: github
base_url: https://github.com
module: backend # Optional: for monorepo setups
module_path: services/backend # Optional: path for resolving files in monorepo
```

## Inputs
Expand All @@ -69,6 +70,7 @@ jobs:
| `platform` | Git platform (github, gitlab, bitbucket) | No | `github` |
| `base_url` | Base URL of the git platform | No | `https://github.com` |
| `module` | Module name for monorepo setups (optional) | No | `''` |
| `module_path` | Module path for resolving files in monorepo (e.g., services/backend, defaults to module if not provided) | No | `''` |
Copy link

Choose a reason for hiding this comment

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

Suggestion: Fix the Inputs table inconsistency by clarifying that module_path defaults to the value of module when not provided and reflect that in the Default column. [possible issue]

Severity Level: Minor ⚠️

Suggested change
| `module_path` | Module path for resolving files in monorepo (e.g., services/backend, defaults to module if not provided) | No | `''` |
| `module_path` | Module path for resolving files in monorepo (e.g., services/backend; defaults to the value of `module` if not provided) | No | `module` |
Why it matters? ⭐

The Inputs table currently states that module_path defaults to the module when not provided, yet the Default column shows an empty string ('').
That is a documentation inconsistency that can mislead users; updating the table to reflect the intended fallback (e.g., module) is a clear, correct fix.

Prompt for AI Agent 🤖
<code>This is a comment left during a code review.

**Path:** README.md
**Line:** 73:73
**Comment:**
	*Possible Issue: Fix the Inputs table inconsistency by clarifying that `module_path` defaults to the value of `module` when not provided and reflect that in the Default column.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.


## Supported Coverage Formats

Expand Down
8 changes: 7 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ inputs:
description: 'Module name for monorepo setups (optional)'
required: false
default: ''
module_path:
description: 'Module path for resolving files in monorepo (e.g., services/backend, defaults to module if not provided)'
Copy link

Choose a reason for hiding this comment

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

Suggestion: Update the module_path input description to explicitly document the enforced fallback to module and the expected allowed format (relative path, no '..', no leading '/'). [possible issue]

required: false
default: ''

runs:
using: 'composite'
Expand Down Expand Up @@ -65,6 +69,7 @@ runs:
PLATFORM: ${{ inputs.platform }}
BASE_URL: ${{ inputs.base_url }}
MODULE: ${{ inputs.module }}
MODULE_PATH: ${{ inputs.module_path }}
run: |
bash upload_coverage.sh \
-t "$ACCESS_TOKEN" \
Expand All @@ -74,4 +79,5 @@ runs:
-p "$PLATFORM" \
-b "$BRANCH" \
-u "$BASE_URL" \
-m "$MODULE"
-m "$MODULE" \
-P "$MODULE_PATH"
Copy link

Choose a reason for hiding this comment

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

Suggestion: Use shell parameter expansion when passing MODULE_PATH to the script so it falls back to MODULE when module_path input is empty. [possible issue]

Severity Level: Minor ⚠️

Suggested change
-P "$MODULE_PATH"
-P "${MODULE_PATH:-$MODULE}"
Why it matters? ⭐

The current invocation will pass an empty MODULE_PATH if the input is unset, which contradicts the action description that implies a fallback. Using shell parameter expansion ensures the runtime behavior matches the docs and avoids passing an empty path to upload_coverage.sh. This is a practical, minimal change that fixes a likely bug in common usage.

Prompt for AI Agent 🤖
<code>This is a comment left during a code review.

**Path:** action.yml
**Line:** 83:83
**Comment:**
	*Possible Issue: Use shell parameter expansion when passing `MODULE_PATH` to the script so it falls back to `MODULE` when `module_path` input is empty.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.