Prevent unhandled exception when running via schedule (#69)
* Prevent unhandled exception when running via schedule
This commit is contained in:
@@ -394,7 +394,7 @@ def main():
|
|||||||
if not from_branch:
|
if not from_branch:
|
||||||
print("PULL_REQUEST_FROM_BRANCH is not set, checking branch in payload.")
|
print("PULL_REQUEST_FROM_BRANCH is not set, checking branch in payload.")
|
||||||
with open(check_events_json(), "r") as fd:
|
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("/")
|
from_branch = from_branch.replace("refs/heads/", "").strip("/")
|
||||||
else:
|
else:
|
||||||
print("PULL_REQUEST_FROM_BRANCH is set.")
|
print("PULL_REQUEST_FROM_BRANCH is set.")
|
||||||
|
|||||||
Reference in New Issue
Block a user