File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
packages/bundler-plugin-core/src/utils Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -45,24 +45,22 @@ export const getPreSignedURL = async ({
4545 } ) ;
4646
4747 const requestBody : RequestBody = serviceParams ;
48- /**
49- * We currently require the branch to be in the format `owner:branch` to identify that it is a
50- * proper tokenless upload.
51- * See: https://github.com/codecov/codecov-api/pull/741
52- */
53- if ( ! uploadToken ) {
54- if ( gitService ) {
55- requestBody . git_service = gitService ;
56- } else {
57- const foundGitService = findGitService ( ) ;
58- if ( ! foundGitService || foundGitService === "" ) {
48+
49+ if ( gitService ) {
50+ requestBody . git_service = gitService ;
51+ } else {
52+ const foundGitService = findGitService ( ) ;
53+ if ( ! foundGitService || foundGitService === "" && ! uploadToken ) {
54+ /**
55+ * gitService is required for tokenless upload.
56+ */
5957 red ( "Failed to find git service for tokenless upload" ) ;
6058 throw new UndefinedGitServiceError ( "No upload token provided" ) ;
6159 }
6260
6361 requestBody . git_service = foundGitService ;
64- }
65- } else if ( oidc ?. useGitHubOIDC && Core ) {
62+ }
63+ if ( oidc ?. useGitHubOIDC && Core ) {
6664 if ( serviceParams ?. service !== "github-actions" ) {
6765 red ( "OIDC is only supported for GitHub Actions" ) ;
6866 throw new BadOIDCServiceError (
You can’t perform that action at this time.
0 commit comments