Core: Ability to get all environment variables
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
Because I can not get $HOME from toolkit/exec, but I have many places where I use it. So I want to have a way to get all environment variables in custom actions.
Code Snippet
Add a new function in core.ts.
export function getEnv(name: string): string {
const val: string = process.env[name.toUpperCase()] || ''
return val.trim()
}
And I could use it in my custom actions like this.
let HOME_DIR = core.getEnv('HOME')
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 in core.ts, where the issue requests a new environment-variable helper for custom actions. Check how toolkit/exec and existing core utilities expose process values, then verify that the helper returns the requested environment variable in the expected form. Done means custom actions can retrieve values such as HOME through core.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100