rm branchname label
nclazz/gitea-bot/pipeline/head This commit looks good
Details
nclazz/gitea-bot/pipeline/head This commit looks good
Details
parent
b60acdd9fa
commit
eaa8758025
|
@ -21,15 +21,13 @@ module.exports = {
|
|||
|
||||
let body
|
||||
if(issue.body.includes('Branchname')) {
|
||||
body = issue.body.replaceAll(/\*\*Branchname\*\*: <code>.+<\/code>/g, `**Branchname**: <code>${branchName}</code>`)
|
||||
body = issue.body.replaceAll(/> <code>.+<\/code>/g, `> <code>${branchName}</code>`)
|
||||
}else {
|
||||
body = issue.body
|
||||
body += '\n\n'
|
||||
body += `> **Branchname**: <code>${branchName}</code>`
|
||||
body += `> <code>${branchName}</code>`
|
||||
}
|
||||
|
||||
// body = body.replaceAll('\n', '\\n')
|
||||
|
||||
const path = `/repos/${repository.full_name}/issues/${issue.number}`
|
||||
return gitea.patch(path, { body })
|
||||
.then(() => {})
|
||||
|
|
Loading…
Reference in New Issue