-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Fix: replaced the ref sent to Vercel set in githubCommitRef
by the branch name
#232
base: master
Are you sure you want to change the base?
Fix: replaced the ref sent to Vercel set in githubCommitRef
by the branch name
#232
Conversation
|
Just preventing the bot to close this |
|
Once again, just preventing the bot to close this. @BetaHuhn could you please check this out? |
|
Once again, just preventing the bot to close this. @BetaHuhn could you please check this out? |
@Elindorath could you elaborate on this? |
@BetaHuhn One huge issue (despite the cosmetics) comes with the use of preview environments per branch on Vercel. You cannot link a preview environment variable to the deployed branch I hope this helps 😃 |
Oops, sorry, didn't see your question @BetaHuhn |
dist/index.js
Outdated
@@ -16001,7 +16001,7 @@ const setDynamicVars = () => { | |||
context.ACTOR = github.context.actor | |||
context.REF = github.context.ref | |||
context.SHA = github.context.sha | |||
context.BRANCH = github.context.ref.substr(11) | |||
context.BRANCH = github.context.ref.substring(11) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe one could even be more explicit and state where the 11
char length comes from?
context.BRANCH = github.context.ref.substring(11) | |
context.BRANCH = github.context.ref.substring("refs/heads/".length) |
I am dealing with the same issue where, I have setup staging environment by pointing a preview branch of name @BetaHuhn @wagnertimo please can you guys get this PR merged? |
Is it possible to merge this pr? We are experiencing the same issue. @BetaHuhn @wagnertimo thanks! |
Hey @shehroze-1122 and @MartinLupa thx for your interest and request but unfortunately I am not the owner of this repo and have no permission to merge 😞 |
Thanks for all your solutions! I have forked this project and published a fixed version that you can use out of box: https://github.com/EvanNotFound/vercel-deployment-for-github-actions If you need it, feel free to check it out! |
I just updated this PR with the last changes on the repo and made the enhancement suggested by @wagnertimo (thanks btw 😉). |
When deploying on a commit event, the ref is in the form
refs/heads/${branch}
(see github context docs) which is not consistent with the way Vercel works