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
+
1
4
import {
2
5
type ProviderEnvs ,
3
6
type ProviderServiceParams ,
@@ -48,7 +51,15 @@ function _getSHA(inputs: ProviderUtilInputs): string {
48
51
function _getSlug ( inputs : ProviderUtilInputs ) : string {
49
52
const { args, envs } = inputs ;
50
53
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 ;
52
63
}
53
64
54
65
// 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", () => {
42
42
envs : {
43
43
VERCEL : "true" ,
44
44
VERCEL_GIT_COMMIT_SHA : "testingsha" ,
45
- VERCEL_GIT_REPO_SLUG : "testOrg/testRepo" ,
45
+ VERCEL_GIT_REPO_SLUG : "testRepo" ,
46
+ VERCEL_GIT_REPO_OWNER : "testOrg" ,
46
47
} ,
47
48
} ;
48
49
@@ -73,7 +74,8 @@ describe("Vercel Params", () => {
73
74
envs : {
74
75
VERCEL : "true" ,
75
76
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" ,
77
79
} ,
78
80
} ;
79
81
You can’t perform that action at this time.
0 commit comments