diff --git a/src/deploy/deploy.util.ts b/src/deploy/deploy.util.ts index b0cdde8..3c92ab9 100644 --- a/src/deploy/deploy.util.ts +++ b/src/deploy/deploy.util.ts @@ -60,8 +60,11 @@ export async function createDeployInfo( let branchName = gitBranch if (backendCfg.hashedBranches) { - // todo: jira - branchName = md5(gitBranch).slice(0, 10) + // Obfuscates the branch name by hashing it. + // If there are Jira issue names in the branch name, the first one found will be used as a prefix. + const jiraIssue = gitBranch.match(/([Dd][Ee][Vv]-\d+)/)?.[0] + const branchHash = md5(gitBranch).slice(0, 10) + branchName = [jiraIssue, branchHash].filter(Boolean).join('-') } gaeService = validateGAEServiceName([branchName, gaeService].join('--'))