Skip to content
This repository was archived by the owner on Mar 14, 2023. It is now read-only.

Commit ce206f9

Browse files
committed
Fix bug in unexpected branch stuff
1 parent 7d5d2cc commit ce206f9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

highfive/newpr.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,11 @@ def modifies_submodule(diff):
293293
def unexpected_branch(payload, config):
294294
""" returns (expected_branch, actual_branch) if they differ, else None
295295
"""
296+
296297
# If unspecified, assume master.
297-
expected_target = config["expected_branch"]
298+
expected_target = None
299+
if "expected_branch" in config:
300+
expected_target = config["expected_branch"]
298301
if not expected_target:
299302
expected_target = "master"
300303

@@ -344,6 +347,7 @@ def new_pr(payload, user, token):
344347
post_comment(review_msg(reviewer, author), owner, repo, issue, user, token)
345348

346349
warnings = []
350+
347351
# Lets not check for unsafe code for now, it doesn't seem to be very useful and gets a lot of false positives.
348352
#if modifies_unsafe(diff):
349353
# warnings += [unsafe_warning_msg]

0 commit comments

Comments
 (0)