rm branchname label
nclazz/gitea-bot/pipeline/head This commit looks good Details

master
Niclas Thobaben 2022-07-09 00:57:36 +02:00
parent b60acdd9fa
commit eaa8758025
1 changed files with 2 additions and 4 deletions

View File

@ -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(() => {})