Skip to content

Commit

Permalink
[chore] [OTEL-2387] skip local branch check for collector.pull_request (
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgopack4 authored Jan 23, 2025
1 parent f1383a3 commit fa60e46
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tasks/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,13 @@ def pull_request(ctx):
f'git commit -m "Update OTel Collector dependencies to {OCB_VERSION} and generate OTel Agent" --no-verify'
)
try:
# don't check if local branch exists; we just created it
check_clean_branch_state(ctx, gh, branch_name)
except Exit as e:
print(e)
return
# local branch already exists, so skip error if this is thrown
if "already exists locally" not in str(e):
print(e)
return
ctx.run(f'git push -u origin {branch_name} --no-verify') # skip pre-commit hook if installed locally
gh.create_pr(
pr_title=f"Update OTel Collector dependencies to v{OCB_VERSION}",
Expand Down

0 comments on commit fa60e46

Please sign in to comment.