You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stop mentioning users when they create a PR (#261)
* stop mentioning users when they create a PR
- creates notifications that seem fairly pointless given that people just created the PR
- not sure people with mail workflows have a different perspective on this
* dlangbot.github: Preserve formatting of fake mentions
Use the trick from
github/markup#1168 (comment).
* dlang-bot.test.comments: Update test suite
Co-authored-by: Vladimir Panteleev <[email protected]>
Copy file name to clipboardExpand all lines: source/dlangbot/github.d
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -63,16 +63,19 @@ string formatComment(in ref PullRequest pr, in IssueRef[] refs, in Issue[] descs
63
63
.deserializeJson!(GHUser[])
64
64
.canFind!(l => l.login == pr.user.login);
65
65
66
+
// Avoid actually mentioning users when referring to them
67
+
auto userRef = `**@<!-- -->%s**`.format(pr.user.login);
68
+
66
69
if (isMember)
67
70
{
68
71
app.formattedWrite(
69
-
`Thanks for your pull request, @%s!
70
-
`, pr.user.login, pr.repoSlug);
72
+
`Thanks for your pull request, %s!
73
+
`, userRef, pr.repoSlug);
71
74
}
72
75
else
73
76
{
74
77
app.formattedWrite(
75
-
"Thanks for your pull request and interest in making D better, @%s! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
78
+
"Thanks for your pull request and interest in making D better, %s! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
76
79
Please verify that your PR follows this checklist:
77
80
78
81
- My PR is fully covered with tests (you can see the coverage diff by visiting the _details_ link of the codecov check)
@@ -85,7 +88,7 @@ Please see [CONTRIBUTING.md](https://github.com/%s/blob/master/CONTRIBUTING.md)
85
88
---
86
89
87
90
If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.",
88
-
pr.user.login, pr.repoSlug);
91
+
userRef, pr.repoSlug);
89
92
}
90
93
91
94
// markdown doesn't support breaking of long lines
0 commit comments