Skip to content

Commit 9e350dc

Browse files
committed
Merge #154: github-merge: omit ACKs in quoted comments or with markdown indentation
9333d5f github-merge: omit acks in quoted comments or markdown indented (Jon Atack) Pull request description: Avoid counting an ACK if it is in a quoted comment or with markdown indentation, when present in a review before the actual ACK. See bitcoin/bitcoin#27334 (comment) for an example. ACKs for top commit: maflcko: review ACK 9333d5f katesalazar: Concept ACK 9333d5f achow101: ACK 9333d5f laanwj: Code review ACK 9333d5f Tree-SHA512: 8eb606eb4d6f035feafeed4976e8b960223c091919a820ec155eca68627756531cd5f50c17233587b80591d0081ac719078f8d72ac5e3e67873737dc3086f1d7
2 parents c93dcfe + 9333d5f commit 9e350dc

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)