Skip to content

Commit 9333d5f

Browse files
committed
github-merge: omit acks in quoted comments or markdown indented
1 parent 64b6a52 commit 9333d5f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

github-merge.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,13 @@ def get_acks_from_comments(head_commit, comments) -> dict:
211211
head_abbrev = head_commit[0:6]
212212
acks = {}
213213
for c in comments:
214-
review = [l for l in c['body'].splitlines() if 'ACK' in l and head_abbrev in l]
214+
review = [
215+
l for l in c["body"].splitlines()
216+
if "ACK" in l
217+
and head_abbrev in l
218+
and not l.startswith("> ") # omit if quoted comment
219+
and not l.startswith(" ") # omit if markdown indentation
220+
]
215221
if review:
216222
acks[c['user']['login']] = review[0]
217223
return acks

0 commit comments

Comments
 (0)