fix Branch naming
parent
592b6c1a95
commit
f92f30b1a7
|
@ -12,7 +12,9 @@ module.exports = {
|
||||||
const { issue, repository } = req.body
|
const { issue, repository } = req.body
|
||||||
const isBug = issue.labels.length && !!issue.labels.find(label => label.name === 'bug')
|
const isBug = issue.labels.length && !!issue.labels.find(label => label.name === 'bug')
|
||||||
const prefix = isBug ? 'bugfix' : 'feature'
|
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}`
|
const branchName = `${prefix}/ISS-${issue.number}-${branch}`
|
||||||
|
|
||||||
log(`Created branch name ${branchName} in ${repository.full_name}`)
|
log(`Created branch name ${branchName} in ${repository.full_name}`)
|
||||||
|
|
Loading…
Reference in New Issue