From e136c96333da271a41d180e3119dd715cce36b13 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 6 Feb 2019 12:39:54 +0100 Subject: [PATCH] [mod] cap number of commits shown in push --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index 49545a1..b8d2932 100644 --- a/server.py +++ b/server.py @@ -65,7 +65,7 @@ async def github(request): else: url = request.json["compare"] notify(f"[{repository}] @{user} pushed {len(commits)} commits to {branch}: {url}") - for commit in commits: + for commit in commits[-5:]: author = commit["author"]["name"] commit_message = commit["message"] notify(f"[{repository}/{branch}] {commit_message} - {author}")