Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strip the prefix for github.ref (refs/heads) #86

Open
xavierchow opened this issue May 7, 2022 · 1 comment
Open

strip the prefix for github.ref (refs/heads) #86

xavierchow opened this issue May 7, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@xavierchow
Copy link

I have a case that in the staging environment we are not using the tags but a release-candidate branch, so I'm expecting to have a release candidate branch name as the version.
I noticed that only the refs/tags/ is stripped, so when setting version with ${{ github.ref }} it complains the slashes are not permitted.

I'm wondering if we can enhance the following regex process to allow strip the prefix for refs/heads as well?

// If the users passes in `${{github.ref}}, then it will have an unwanted prefix.
version = versionOption.replace(/^(refs\/tags\/)/, '');

@ceorourke ceorourke added the enhancement New feature or request label May 9, 2022
@ceorourke
Copy link
Member

Hi @xavierchow, thanks for the issue! I've created a ticket in our team's backlog to address this and we'll reply to this issue to update you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants