Skip to content

Commit

Permalink
Update merge-main-into-prs.yml (ultralytics#12922)
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Jocher <[email protected]>
  • Loading branch information
glenn-jocher authored Apr 14, 2024
1 parent 51dc1af commit cf8b67b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/merge-main-into-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@ jobs:
for pr in open_pulls:
# Compare PR head with main to see if it's behind
try:
comparison = repo.compare(pr.base.ref, pr.head.ref) # Ensure correct order of base and head
if comparison.behind_by > 0:
# Merge main into the PR branch
success = pr.update_branch()
assert success, "Branch update failed"
print(f"Merged 'master' into PR #{pr.number} ({pr.head.ref}) successfully.")
# Merge main into the PR branch
success = pr.update_branch()
assert success, "Branch update failed"
print(f"Merged 'master' into PR #{pr.number} ({pr.head.ref}) successfully.")
except Exception as e:
print(f"Could not merge 'master' into PR #{pr.number} ({pr.head.ref}): {e}")
env:
Expand Down

0 comments on commit cf8b67b

Please sign in to comment.