Skip to content

Commit

Permalink
Add owner tag to thank you note in "Say thanks for the contributors" …
Browse files Browse the repository at this point in the history
…workflow (#5066)

This PR updates the "Say thanks for the contributors" workflow to include a tag for the owner of the PR in the thank you note comment. This is to acknowledge the owner's contributions and show appreciation for their efforts.
  • Loading branch information
Ashesh3 authored Mar 8, 2023
1 parent cdfeff6 commit 62b35b3
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/thank-you.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@ jobs:
repo: context.repo.repo,
})
const { assignees } = result.data
if (assignees.length == 0) {
await github.rest.issues.createComment({ ...options, body: thankyouNote })
return
}
const { assignees, user } = result.data
const assignees_tagged = assignees.map((user) => '@' + user.login).join(' ')
await github.rest.issues.createComment({
...options,
body: `${assignees_tagged} ${thankyouNote}`,
})
const owner_tagged = '@' + 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}` })
}

0 comments on commit 62b35b3

Please sign in to comment.