Skip to content

Commit

Permalink
Check for PR branch
Browse files Browse the repository at this point in the history
before using the API so we hopefully save a call.
  • Loading branch information
vsoch authored Jan 7, 2023
1 parent c8e84ce commit dcba08c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pull-request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dcba08c

Please sign in to comment.