From cf8b67b7e9b49bed087ef27b4847edd84c687c34 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 14 Apr 2024 07:36:44 -0700 Subject: [PATCH] Update merge-main-into-prs.yml (#12922) Signed-off-by: Glenn Jocher --- .github/workflows/merge-main-into-prs.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/merge-main-into-prs.yml b/.github/workflows/merge-main-into-prs.yml index 06757d3..9ed945c 100644 --- a/.github/workflows/merge-main-into-prs.yml +++ b/.github/workflows/merge-main-into-prs.yml @@ -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: