Skip to content

Commit e2a437c

Browse files
authored
Prevent unhandled exception when running via schedule (#69)
* Prevent unhandled exception when running via schedule
1 parent 2d5c80f commit e2a437c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pull-request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def main():
394394
if not from_branch:
395395
print("PULL_REQUEST_FROM_BRANCH is not set, checking branch in payload.")
396396
with open(check_events_json(), "r") as fd:
397-
from_branch = json.loads(fd.read()).get("ref")
397+
from_branch = json.loads(fd.read()).get("ref", "")
398398
from_branch = from_branch.replace("refs/heads/", "").strip("/")
399399
else:
400400
print("PULL_REQUEST_FROM_BRANCH is set.")

0 commit comments

Comments
 (0)