From a01e5e5e16c7a119d7fbac00bb5c4722344ff08e Mon Sep 17 00:00:00 2001 From: kongr45gpen Date: Mon, 13 Nov 2017 00:48:14 +0200 Subject: Use a better verb for PR synchronisation --- local/utility.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'local') diff --git a/local/utility.py b/local/utility.py index fbf2db4..86e1b91 100644 --- a/local/utility.py +++ b/local/utility.py @@ -104,6 +104,10 @@ def maxLen(msg, maxn=400, splitLines=True): def colorAction(action): """Give an action string (e.g. created, edited) and get a nice IRC colouring""" + # Fix past tense for some github verbs + if action in ["synchronize"]: + action += "d" + if action in ["created", "opened", "tagged", "success", "passed", "fixed", "published", "completed", "ready"]: return ircutils.bold(ircutils.mircColor(action, "green")) @@ -111,7 +115,7 @@ def colorAction(action): "failed", "errored", "failure", "still failing", "broken", "error"]: return ircutils.bold(ircutils.mircColor(action, "red")) - if action in ["assigned", "merged", "synchronize"]: + if action in ["assigned", "merged", "synchronized"]: return ircutils.bold(ircutils.mircColor(action, "light blue")) if action in ["reopened", "pending"]: return ircutils.bold(ircutils.mircColor(action, "blue")) -- cgit v1.2.3