Skip to content

Commit e14da20

Browse files
authored
fix: description duplications (#201)
1 parent 45560d8 commit e14da20

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

dist/index.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,15 @@ async function action(): Promise<void> {
3131
})
3232

3333
// Exit/return if our markdown message is already present
34-
const body = pullRequest.body || ''
34+
let body = pullRequest.body || ''
3535
if (body.includes(markdown)) {
3636
info('Markdown message is already present. Exiting.')
3737
return
3838
}
3939

40+
// There have been issues with duplicate messages, so remove those
41+
body = body.split(markdown)[0]
42+
4043
// If we're here update the body
4144
info('Description is being updated.')
4245
await octokit.rest.pulls.update({

0 commit comments

Comments
 (0)