fixed whitespace issues
nclazz/gitea-bot/pipeline/head This commit looks good Details

master
Niclas Thobaben 2022-07-09 00:52:42 +02:00
parent 7ce9be3c9b
commit b60acdd9fa
1 changed files with 4 additions and 2 deletions

View File

@ -23,10 +23,12 @@ module.exports = {
if(issue.body.includes('Branchname')) {
body = issue.body.replaceAll(/\*\*Branchname\*\*: <code>.+<\/code>/g, `**Branchname**: <code>${branchName}</code>`)
}else {
body = `${issue.body}<br>**Branchname**: <code>${branchName}</code>`
body = issue.body
body += '\n\n'
body += `> **Branchname**: <code>${branchName}</code>`
}
body = body.replaceAll('\n', '\\n')
// body = body.replaceAll('\n', '\\n')
const path = `/repos/${repository.full_name}/issues/${issue.number}`
return gitea.patch(path, { body })