Skip to content

Commit d7651b5

Browse files
committed
fix: comment bug
1 parent f86f6d7 commit d7651b5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/comment.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ ${getReleasePlanMessage(releasePlan)}
6969
7070
[Click here if you're a maintainer who wants to add a changeset to this MR](${addChangesetUrl})
7171
72+
__Generated By Changesets Bot__
7273
`
7374

7475
const getApproveMessage = (
@@ -87,6 +88,7 @@ Not sure what this means? [Click here to learn what changesets are](https://git
8788
8889
[Click here if you're a maintainer who wants to add another changeset to this MR](${addChangesetUrl})
8990
91+
__Generated By Changesets Bot__
9092
`
9193

9294
const getNewChangesetTemplate = (changedPackages: string[], title: string) =>
@@ -100,7 +102,10 @@ ${title}
100102
const getCommentId = (api: Gitlab, mrIid: number | string) =>
101103
api.MergeRequestNotes.all(context.projectId, mrIid).then(comments => {
102104
const changesetBotComment = comments.find(
103-
comment => comment.author.username === process.env.GITLAB_CI_USER_NAME,
105+
comment =>
106+
comment.author.username === process.env.GITLAB_CI_USER_NAME &&
107+
!comment.system &&
108+
comment.body.includes('Generated By Changesets Bot'),
104109
)
105110
return changesetBotComment ? changesetBotComment.id : null
106111
})

0 commit comments

Comments
 (0)