Skip to content

Commit

Permalink
fix slack notification message when PR got approved
Browse files Browse the repository at this point in the history
  • Loading branch information
Serghei Paduret committed Jan 16, 2024
1 parent 1708550 commit 4d48300
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/other/notification.titles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ export function GetSlackNotificationTitle(options: NotificationOptions): string
title = `:pull_request: @${options.pullRequest.author.user.name} assigned you a new pull request`;
break;
case PullRequestActivityAction.Approved:
title = `:white_check_mark: @${options.activity?.user.name} approved your pull request`;
const users = options.pullRequest.reviewers
.filter(r => r.approved)
.map(a => `@${a.user.name}`)
.join(', ');
title = `:white_check_mark: ${users} approved your pull request`;
break;
case PullRequestActivityAction.Merged:
title = `:merged: @${options.activity?.user.name} merged pull request`;
Expand Down

0 comments on commit 4d48300

Please sign in to comment.