diff --git a/src/hooks/issueBranchName.js b/src/hooks/issueBranchName.js index 9805ecc..7e8d79c 100644 --- a/src/hooks/issueBranchName.js +++ b/src/hooks/issueBranchName.js @@ -12,7 +12,9 @@ module.exports = { const { issue, repository } = req.body const isBug = issue.labels.length && !!issue.labels.find(label => label.name === 'bug') const prefix = isBug ? 'bugfix' : 'feature' - const branch = issue.title.replace(/[^a-z0-9\s]/gi, '').replaceAll(' ', '-') + const branch = issue.title.replace(/[^a-z0-9\s]/gi, '') + .replaceAll(' ', '-') + .toLowerCase() const branchName = `${prefix}/ISS-${issue.number}-${branch}` log(`Created branch name ${branchName} in ${repository.full_name}`)