Add bug branch prefix for any label with the word 'bug'
nclazz/gitea-bot/pipeline/head This commit looks good
Details
nclazz/gitea-bot/pipeline/head This commit looks good
Details
parent
39e19dc8fa
commit
72d41d1218
|
@ -10,7 +10,7 @@ module.exports = {
|
|||
return
|
||||
}
|
||||
const { issue, repository } = req.body
|
||||
const isBug = issue.labels.length && !!issue.labels.find(label => label.name === 'bug' || label.name === 'type: bug')
|
||||
const isBug = issue.labels.length && !!issue.labels.find(label => label.name.includes('bug'))
|
||||
const prefix = isBug ? 'bugfix' : 'feature'
|
||||
const branch = issue.title.replace(/[^a-z0-9\s]/gi, '')
|
||||
.replaceAll(' ', '-')
|
||||
|
@ -36,4 +36,4 @@ module.exports = {
|
|||
.catch(reason => reason)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue