From 8da9ca465daadf48be6b839e88addeac2f61d1de Mon Sep 17 00:00:00 2001 From: actae0n <19864268+xpcmdshell@users.noreply.github.com> Date: Sun, 5 Apr 2026 02:01:01 -0700 Subject: [PATCH] Revert Dependabot refresh workflow changes --- .github/workflows/ci.yml | 1 - .github/workflows/dependabot-automerge.yml | 22 +++------------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71f6098..90a18d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,6 @@ on: branches: [main] push: branches: [main] - workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml index 9c48e14..b7f69a1 100644 --- a/.github/workflows/dependabot-automerge.yml +++ b/.github/workflows/dependabot-automerge.yml @@ -99,10 +99,6 @@ jobs: refresh-behind-dependabot-prs: name: Refresh behind Dependabot PRs if: github.event_name != 'pull_request' - permissions: - actions: write - contents: write - pull-requests: write runs-on: ubuntu-latest steps: - name: Update behind safe Dependabot PRs @@ -114,7 +110,7 @@ jobs: --repo "$REPOSITORY" \ --author 'app/dependabot' \ --state open \ - --json number,title,headRefName,mergeStateStatus,autoMergeRequest)" + --json number,title,mergeStateStatus)" export PRS_JSON="$prs_json" prs="$(python - <<'PY' @@ -155,10 +151,7 @@ jobs: continue if classify_from_title(pr["title"]) not in {"patch", "minor"}: continue - print( - f"{pr['number']}\t{pr['headRefName']}\t" - f"{'true' if pr['autoMergeRequest'] is not None else 'false'}" - ) + print(pr["number"]) PY )" @@ -167,20 +160,11 @@ jobs: exit 0 fi - while IFS=$'\t' read -r pr branch auto_merge_enabled; do + while IFS= read -r pr; do [ -n "$pr" ] || continue echo "Updating branch for PR #$pr" gh api \ --method PUT \ -H "Accept: application/vnd.github+json" \ "repos/$REPOSITORY/pulls/$pr/update-branch" - - # update-branch runs under GITHUB_TOKEN, so CI must be dispatched explicitly. - echo "Dispatching CI for $branch" - gh workflow run ci.yml --repo "$REPOSITORY" --ref "$branch" - - if [ "$auto_merge_enabled" != "true" ]; then - echo "Enabling auto-merge for PR #$pr" - gh pr merge --repo "$REPOSITORY" --auto --merge "$pr" - fi done <<< "$prs"