Check for PR branch

before using the API so we hopefully save a call.
This commit is contained in:
Vanessasaurus
2023-01-06 20:03:27 -07:00
committed by GitHub
parent c8e84cea4c
commit dcba08c9c2

View File

@@ -357,7 +357,10 @@ def main():
print("No branch prefix is set, all branches will be used.")
# Default to project default branch if none provided
pull_request_branch = os.environ.get("PULL_REQUEST_BRANCH", find_default_branch())
pull_request_branch = os.environ.get("PULL_REQUEST_BRANCH")
if not pull_request_branch:
pull_request_branch = find_default_branch()
print("Pull requests will go to %s" % pull_request_branch)
# Pull request draft