Numerical removal of trailing zeros breaks version number inputs not entered as strings
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
This issue is more general, but specifically a problem for version numbers.
Take
with:
version: 1.10
getInput returns this as a string "1.1", whereas
with:
version: '1.10'
getInput returns a string "1.10".
In version numbers 1.1 != 1.10, and it's not possible for the action to defend against this to tell whether the entry might have been treated as a number before being presented as a string.
Expected behavior
getInput provide a way to get the raw entry, or indicate if input has been treated as a number before being returned as a string.
Or just never drop trailing zeros..
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the getInput entry point and trace how unquoted workflow values are converted before reaching it. Reproduce the 1.10 versus '1.10' cases, then inspect any input tests; done means the API preserves enough information to distinguish them or clearly reports numeric coercion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100