Skip to content

Commit

Permalink
Fix Duplicate ping author
Browse files Browse the repository at this point in the history
  • Loading branch information
JavidSumra committed Nov 28, 2024
1 parent 6bea49a commit a0b0114
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/thank-you.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
const { assignees, user } = result.data
const assignees_tagged = assignees.map((user) => '@' + user.login).join(' ')
const owner_tagged = '@' + user.login
const taggedUsers = assignees.length > 0
? assignees.map((u) => '@' + u.login).join(' ')
: '@' + user.login;
if (assignees.length == 0) {
await github.rest.issues.createComment({ ...options, body: `${owner_tagged} ${thankyouNote}` })
} else {
await github.rest.issues.createComment({ ...options, body: `${assignees_tagged} ${owner_tagged} ${thankyouNote}` })
}
await github.rest.issues.createComment({
...options,
body: `${taggedUsers} ${thankyouNote}`
});

0 comments on commit a0b0114

Please sign in to comment.