Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/bundler-plugin-core/src/utils/getPreSignedURL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const getPreSignedURL = async ({
* proper tokenless upload.
* See: https://github.com/codecov/codecov-api/pull/741
*/
if (!uploadToken && serviceParams.branch?.includes(":")) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this condition means the format of the branch is no longer checked. Has the branch check been moved elsewhere, or is it no longer needed? If not necessary anymore, kindly disregard the comment.

if (!uploadToken) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check now only verifies the existence of an 'uploadToken'. It will enter the if block even if there is no ':' in the 'branch'. Consider rechecking the requirements for 'uploadToken' and 'branch'.

if (gitService) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you are setting 'gitService' if 'uploadToken' is not available. The control flow suggests that these two fields are somehow interchangeable or correlated. However, there might not be any correlation between 'uploadToken' and 'gitService', consider segregating the conditions or explain the logical correlation between them.

requestBody.git_service = gitService;
} else {
Expand Down
Loading