File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed
packages/bundler-plugin-core/src/utils/providers Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @codecov/bundler-plugin-core " : patch
3+ " @codecov/rollup-plugin " : patch
4+ " @codecov/vite-plugin " : patch
5+ " @codecov/webpack-plugin " : patch
6+ ---
7+
8+ Update Vercel env helper function to create full git slug
Original file line number Diff line number Diff line change 1+ // VERCEL ENV DOCS
2+ // https://vercel.com/docs/projects/environment-variables/system-environment-variables
3+
14import {
25 type ProviderEnvs ,
36 type ProviderServiceParams ,
@@ -48,7 +51,15 @@ function _getSHA(inputs: ProviderUtilInputs): string {
4851function _getSlug ( inputs : ProviderUtilInputs ) : string {
4952 const { args, envs } = inputs ;
5053 if ( args ?. slug && args ?. slug !== "" ) return args ?. slug ;
51- return envs ?. VERCEL_GIT_REPO_SLUG ?? "" ;
54+ const owner = envs ?. VERCEL_GIT_REPO_OWNER ?? "" ;
55+ const repo = envs ?. VERCEL_GIT_REPO_SLUG ?? "" ;
56+
57+ let slug = "" ;
58+ if ( owner && repo ) {
59+ slug = `${ owner } /${ repo } ` ;
60+ }
61+
62+ return slug ;
5263}
5364
5465// eslint-disable-next-line @typescript-eslint/require-await
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ describe("Vercel Params", () => {
4242 envs : {
4343 VERCEL : "true" ,
4444 VERCEL_GIT_COMMIT_SHA : "testingsha" ,
45- VERCEL_GIT_REPO_SLUG : "testOrg/testRepo" ,
45+ VERCEL_GIT_REPO_SLUG : "testRepo" ,
46+ VERCEL_GIT_REPO_OWNER : "testOrg" ,
4647 } ,
4748 } ;
4849
@@ -73,7 +74,8 @@ describe("Vercel Params", () => {
7374 envs : {
7475 VERCEL : "true" ,
7576 VERCEL_GIT_COMMIT_SHA : "testingsha" ,
76- VERCEL_GIT_REPO_SLUG : "other-org/testRepo" ,
77+ VERCEL_GIT_REPO_SLUG : "testRepo" ,
78+ VERCEL_GIT_REPO_OWNER : "testOrg" ,
7779 } ,
7880 } ;
7981
You can’t perform that action at this time.
0 commit comments