Skip to content

Commit

Permalink
feat: show jira issues in hashed deploy-gae urls
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonwellsjo committed Dec 4, 2024
1 parent 9204bd3 commit 60bcbde
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/deploy/deploy.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(/(DEV-\d+)/)?.[0]
const branchHash = md5(gitBranch).slice(0, 10)
branchName = jiraIssue ? `${jiraIssue}-${branchHash}` : branchHash
}

gaeService = validateGAEServiceName([branchName, gaeService].join('--'))
Expand Down

0 comments on commit 60bcbde

Please sign in to comment.