]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Prevent invalid warnings about missing identifiers
authorMichał Kępień <michal@isc.org>
Wed, 3 Jun 2020 13:45:28 +0000 (15:45 +0200)
committerMichał Kępień <michal@isc.org>
Wed, 3 Jun 2020 13:45:28 +0000 (15:45 +0200)
The Danger script inspects differences between the current version of a
given merge request's target branch and the merge request branch.  If
the latter falls behind the former, the Danger script will wrongly warn
about missing GitLab/RT identifiers because it incorrectly treats the
"+++" diff marker as an indication of the merge request adding new lines
to a file.  Tweak the relevant conditional expression to prevent such
invalid warnings from being raised.

dangerfile.py

index 09f28cb4d6502dfbe012d798c4bac38319d67016..3a047c974dd0b54ad4ebf949ca2f2117556cabf8 100644 (file)
@@ -21,7 +21,7 @@ def added_lines(target_branch, paths):
                                     '--'] + paths)
     added_lines = []
     for line in diff.splitlines():
-        if line.startswith(b'+'):
+        if line.startswith(b'+') and not line.startswith(b'+++'):
             added_lines.append(line)
     return added_lines