actions / actions/toolkit

If version is not semver version, use it "as is"

Open
#1,004 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Describe the enhancement
I just spent a day figuring out why tool-cache find function does not find my item in the cache. It was because my version in cacheFile was v1.0.3 (named after release branch name), but find used semver.clean("v1.0.3") (which is equal 1.0.3) - this resulted in cache miss.

Please change this behavior.

If a version is semver, use semver.clean in both cases.
Otherwise, use version "as is" in the cache.

This allows to use git commits as cache keys.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the TypeScript implementation of the tool-cache find function and its uses of semver.clean. Check the existing cache tests, then cover semver versions and non-semver values such as git commits; done means both lookup and storage use cleaned semver values when applicable and preserve other versions as-is.

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
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.