Skip to content

Commit

Permalink
Prevent unhandled exception when running via schedule (#69)
Browse files Browse the repository at this point in the history
* Prevent unhandled exception when running via schedule
  • Loading branch information
mcbanderson committed Apr 19, 2021
1 parent 2d5c80f commit e2a437c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pull-request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down

0 comments on commit e2a437c

Please sign in to comment.