mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
Update merge-main-into-prs.yml (#12921)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
6c8f693352
commit
51dc1af6e8
2
.github/workflows/merge-main-into-prs.yml
vendored
2
.github/workflows/merge-main-into-prs.yml
vendored
@ -44,9 +44,9 @@ jobs:
|
|||||||
|
|
||||||
for pr in open_pulls:
|
for pr in open_pulls:
|
||||||
# Compare PR head with main to see if it's behind
|
# 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
|
comparison = repo.compare(pr.base.ref, pr.head.ref) # Ensure correct order of base and head
|
||||||
if comparison.behind_by > 0:
|
if comparison.behind_by > 0:
|
||||||
try:
|
|
||||||
# Merge main into the PR branch
|
# Merge main into the PR branch
|
||||||
success = pr.update_branch()
|
success = pr.update_branch()
|
||||||
assert success, "Branch update failed"
|
assert success, "Branch update failed"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user