From afe2f008d04106fda7fa0ab163737cd9283da787 Mon Sep 17 00:00:00 2001 From: "Malcolm R. Kente" Date: Fri, 13 Mar 2026 21:54:04 +0100 Subject: [PATCH] Configure Git identity for GitHub CLI Added Git identity configuration for GitHub CLI authentication. --- .github/workflows/dependency-automerge.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependency-automerge.yml b/.github/workflows/dependency-automerge.yml index 3187bd4..2de1e3d 100644 --- a/.github/workflows/dependency-automerge.yml +++ b/.github/workflows/dependency-automerge.yml @@ -18,17 +18,19 @@ jobs: runs-on: ubuntu-latest steps: - # ✅ Step 1: Checkout the repo (Fixes "not a git repository" issue) - name: Checkout Repository uses: actions/checkout@v6 - # ✅ Step 2: Authenticate GitHub CLI (Ensure gh CLI works) + - name: Set Git Identity + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + - name: Authenticate GitHub CLI run: gh auth setup-git env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # ✅ Step 3: Fetch all PRs sorted from oldest to newest - name: Get Oldest PRs id: get-prs run: | @@ -37,12 +39,17 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # ✅ Step 4: Process PRs One by One - name: Process PRs run: | for pr in $prs; do echo "Processing PR #$pr" + # Skip draft PRs + if [ "$(gh pr view $pr --json isDraft --jq '.isDraft')" = "true" ]; then + echo "PR #$pr is a draft; skipping..." + continue + fi + # Checkout PR branch gh pr checkout $pr