Skip to content

Commit 7c99fb5

Browse files
committed
Another tweak to reduce unecessary message: skip the 'user pushed X commits' noisy stuff for PR merges
1 parent 7b39f03 commit 7c99fb5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

server.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,14 @@ def user_noping(user: str) -> str:
161161
if user in ["yunohost-bot", "github-actions[bot]"]:
162162
return empty()
163163

164+
# If the last commit is "Merge pull request #id from Org/Repo",
165+
# then it's most likely a PR that just got merged, and it's kind of
166+
# redundant with the "user merged pull requested #id" notification
167+
# So skip this to prevent unecessary noise, people can just look at
168+
# the PR to see the commits that got merged
169+
if commits and commits[-1]["message"].startswith("Merge pull request #")
170+
return empty()
171+
164172
user = user_noping(user)
165173

166174
branch = request.json["ref"].split("/", 2)[2]

0 commit comments

Comments
 (0)