Annotations using environment files
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 think it would be valuable to be able to set an annotation without it being printed to stdout, as currently, they can lead to duplicated output.
For example, I'm working on a node:test reporter that outputs failures for the user in the CLI and also annotates the PRs when running on GitHub actions. I use core.error() for the latter, but that leads to duplicated error messages.
If I could write to an environment file instead, it would lead to a tidier experience.
Additional information
There are other pieces of functionality that can work either by printing output or by concatenating commands into a file whose path is available as an env variable. That mechanism may be reusable for annotations.
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 core.error() and the existing functionality that writes commands to an environment file whose path comes from an environment variable. Trace how annotations are currently printed, then determine how the same mechanism could support them without stdout output; done means annotations still reach GitHub Actions while duplicate CLI messages are avoided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100