core.getOriginalInput() or core.getStringInput()
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 enhancement
I would like a way to get the original input string, without parsing to a number.
The main motivation is the YAML parser behaves unexpectedly for myinput: 3.0 as noted in https://github.com/actions/runner/issues/849, core.getInput() will return "3" instead of the expected "3.0".
Given https://github.com/actions/runner/issues/849 has seen no progress at all in years, and it could be a compatibility issue, maybe there is an easier way to address the issue.
So if we could have core.getOriginalInput("myinput") or core.getStringInput("myinput"), that would return "3.0" for myinput: 3.0. That probably means the YAML parser would need to preserve that string before interpreting it (not sure whether it does currently) and somehow pass it through to env vars and so toolkit core could access it.
This sounds to me like a fairly simple solution to https://github.com/actions/runner/issues/849 without any major drawback.
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 with the toolkit core.getInput() entry point and the proposed core.getOriginalInput() or core.getStringInput() APIs. Trace how action inputs move through YAML parsing and environment variables, as described in the issue, and define completion as preserving and returning the original string such as "3.0" without numeric parsing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- api, developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100