File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -520,7 +520,7 @@ export function getWebhookEventsForEventId(eventId: string | number) {
520
520
*/
521
521
export const getGitBranchUrl = ( gitUrl : string , branchName : string ) : string | null => {
522
522
if ( ! gitUrl ) return null
523
- const trimmedGitUrl = gitUrl . trim ( ) ? .replace ( / \. g i t $ / , '' ) . replace ( / \/ $ / , '' ) // Remove any trailing slash
523
+ const trimmedGitUrl = gitUrl . trim ( ) . replace ( / \. g i t $ / , '' ) . replace ( / \/ $ / , '' ) // Remove any trailing slash
524
524
if ( trimmedGitUrl . includes ( GitProviderType . GITLAB ) ) return `${ trimmedGitUrl } /-/tree/${ branchName } `
525
525
else if ( trimmedGitUrl . includes ( GitProviderType . GITHUB ) ) return `${ trimmedGitUrl } /tree/${ branchName } `
526
526
else if ( trimmedGitUrl . includes ( GitProviderType . BITBUCKET ) ) return `${ trimmedGitUrl } /branch/${ branchName } `
You can’t perform that action at this time.
0 commit comments