Send branch ref in Github deployment
and deployment_status
events
#7581
Replies: 17 comments 11 replies
-
This would make our DX so much better. For our CI/CD we need to set the current deploy URL as the Auth0 callback URL in an env var except on Doesn't currently look possible to do this There are also other things like building Storybook on Vercel in the same repo. The Cypress CI/CD tests also fire for that as there's no way to differentiate in GitHub actions where the Vercel build has come from 🥲 |
Beta Was this translation helpful? Give feedback.
-
Is there any update on this from Vercel side? Are we missing something? This seems like an obvious thing to do - if a commit on a specific branch trigger deployment, then Vercel should provide the same info back on Our problem. We use stage and production environments, each with a fixed domain. We don't have an issue for production environment, but we keep struggling with properly setting up a stage environment. For the app itself, we use NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF to recognize both stage and production environments. But we cannot figure out how to properly run E2E tests for Stage. We can detect production environment using |
Beta Was this translation helpful? Give feedback.
-
Are there any plans to introduce the source branch in the event sent to Github? |
Beta Was this translation helpful? Give feedback.
-
Facing a major blocker because of this 🙏 |
Beta Was this translation helpful? Give feedback.
-
I ended up using a git command to get all branches that contain the commit, since in my case it's a merge commit that will only be available on the specific branch:
|
Beta Was this translation helpful? Give feedback.
-
+1 for this. We want run our Playwright e2e tests against our Vercel deploys but this is very wasteful because there's no way to cache the |
Beta Was this translation helpful? Give feedback.
-
Hoping something like this get implemented soon! |
Beta Was this translation helpful? Give feedback.
-
I feel weird +1ing my own issue, but this is still important |
Beta Was this translation helpful? Give feedback.
-
This is available at request on Enterprise accounts, per Github organisation. Upon request, Vercel sends the branch ref instead of SHA. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm building a fairly large project, currently hosted on Vercel. I want to trigger a suite of automated checks against PR preview deployments (and production deployments) triggered by pushes and PRs in Github.
I have that working, using the Vercel-Github integration, and Github workflows triggered on Github
deployment_status
events. However, within those events, both theref
and thesha
field are set to the value of the SHA of the commit that triggered the build.That means that within the Github workflow the context/env variable for the ref is undefined, e.g.
GITHUB_REF=""
. That means the Github actionactions/setup-node
cannot be used with caching, see actions/cache#319 .The lack of caching for Node dependencies significantly slows down Github CI/CD workflows triggered by Vercel deploys.
All of those deployments have an associated branch, either directly or as the head branch (feature branch) in the PR. Would it be possible to send that information in the ref field of the Github
deployment
anddeployment_status
events?Beta Was this translation helpful? Give feedback.
All reactions