diff --git a/bors.py b/bors.py index 842f980..35db999 100755 --- a/bors.py +++ b/bors.py @@ -308,11 +308,10 @@ def last_comment(self): def approval_list(self): return ([u for (d,u,c) in self.head_comments - if (c.startswith("r+") or - c.startswith("r=me"))] + + if 'r+' in c or 'r=me' in c] + [ m.group(1) for (_,_,c) in self.head_comments - for m in [re.match(r"^r=(\w+)", c)] if m ]) + for m in [re.search(r'\b(?:r=(\w+))\b', c)] if m ]) def batched(self): for date, user, comment in self.head_comments: @@ -336,11 +335,11 @@ def prioritized_state(self): def disapproval_list(self): return [u for (d,u,c) in self.head_comments - if c.startswith("r-")] + if 'r-' in c] def count_retries(self): - return len([c for (d,u,c) in self.head_comments if ( - c.startswith("@bors: retry"))]) + return len([c for (d,u,c) in self.head_comments + for m in [re.search(r'\b(?:retry)\b', c)] if m]) # annoyingly, even though we're starting from a "pull" json # blob, this blob does not have the "mergeable" flag; only