From 778b647efb034d11d2194a3083d2f734adc9779b Mon Sep 17 00:00:00 2001 From: Gabriele Vernetti <62447440+GitGab19@users.noreply.github.com> Date: Fri, 30 Aug 2024 23:46:16 +0200 Subject: [PATCH] Update auto-rebase.yaml --- .github/workflows/auto-rebase.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-rebase.yaml b/.github/workflows/auto-rebase.yaml index 7277eacbd..8b4409566 100644 --- a/.github/workflows/auto-rebase.yaml +++ b/.github/workflows/auto-rebase.yaml @@ -31,14 +31,18 @@ jobs: - name: Fetch open pull requests with label run: | gh auth setup-git + echo "Fetching open PRs with label 'ready-to-be-merged'" gh pr list --state open --label "ready-to-be-merged" --json number,headRepositoryOwner,headRefName --jq '.[] | "\(.number) \(.headRepositoryOwner.login) \(.headRefName)"' > pr_details.txt + echo "PRs fetched:" + cat pr_details.txt # Debug: print the content of the file env: GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }} - name: Rebase pull requests run: | + echo "Starting rebase process for PRs" while read pr_number pr_owner pr_branch; do - echo "Processing PR #$pr_number" + echo "Processing PR #$pr_number from $pr_owner/$pr_branch" # Add the contributor's fork as a remote git remote add contributor https://github.com/$pr_owner/$(gh repo view --json name -q '.name').git @@ -62,7 +66,7 @@ jobs: # Rebase the branch on top of the main branch git fetch origin main if ! git rebase origin/main; then - echo "Conflict detected. Aborting rebase and continuing." + echo "Conflict detected during rebase of PR #$pr_number. Aborting rebase and continuing." git rebase --abort # Post a comment on the PR to notify the author about the conflict