diff --git a/pull-request.py b/pull-request.py index ac352c0..9b2ca7b 100755 --- a/pull-request.py +++ b/pull-request.py @@ -394,7 +394,7 @@ def main(): if not from_branch: print("PULL_REQUEST_FROM_BRANCH is not set, checking branch in payload.") with open(check_events_json(), "r") as fd: - from_branch = json.loads(fd.read()).get("ref") + from_branch = json.loads(fd.read()).get("ref", "") from_branch = from_branch.replace("refs/heads/", "").strip("/") else: print("PULL_REQUEST_FROM_BRANCH is set.")