From ee7535fe060305833157ebf0c121fb03d5fd767d Mon Sep 17 00:00:00 2001 From: PerfectPan <24316656+PerfectPan@users.noreply.github.com> Date: Sat, 14 Nov 2026 00:16:48 +0800 Subject: [PATCH] ci(deps): close the pending loop and stop bogus node updates Renovate defaults to prCreation pending: it pushes the update branch and only opens the PR once status checks pass. The shrinkwrap workflow only listened for pull_request events, so the pre-PR branch never got its rush update, CI never reported, and the PR could wait forever. Also listen for pushes to renovate/** branches and key concurrency, checkout and branch naming off github.head_ref || github.ref_name so both events share one lane. The dashboard also proposed node.js runtime updates that do not belong here: the runtime is pinned in lockstep across .node-version, rush.json nodeSupportedVersionRange and the workflows, and the old Dependabot config never touched it. Disable the node-version datasource and engines updates to match. --- .github/workflows/renovate-shrinkwrap.yml | 19 ++++++++++++------- renovate.json | 11 +++++++++++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/renovate-shrinkwrap.yml b/.github/workflows/renovate-shrinkwrap.yml index 8a455bf..1503b5f 100644 --- a/.github/workflows/renovate-shrinkwrap.yml +++ b/.github/workflows/renovate-shrinkwrap.yml @@ -2,9 +2,11 @@ name: Renovate shrinkwrap # Renovate edits package.json but does not understand Rush (renovatebot/renovate#3681): it leaves # common/config/rush/pnpm-lock.yaml stale, and `rush install` fails on an outdated shrinkwrap. -# After a Renovate dependency PR opens or updates, run `rush update` here, push the refreshed -# shrinkwrap, and re-dispatch CI on the new commit: a push made with the GITHUB_TOKEN does not -# trigger the pull_request synchronize event by itself, so ci.yml must also allow workflow_dispatch. +# Run `rush update` on every Renovate branch, push the refreshed shrinkwrap, and re-dispatch CI on +# the new commit. Both triggers are needed: Renovate defaults to prCreation "pending", so the +# branch often exists before its pull request does (push event), and later commits land on the +# already-opened PR (pull_request event). A push made with the GITHUB_TOKEN does not trigger +# either event by itself, so ci.yml must also allow workflow_dispatch. on: pull_request: @@ -14,24 +16,27 @@ on: - "rush.json" - "common/config/rush/pnpm-config.json" - "renovate.json" + push: + branches: + - "renovate/**" permissions: contents: write concurrency: - group: renovate-shrinkwrap-${{ github.event.pull_request.number }} + group: renovate-shrinkwrap-${{ github.head_ref || github.ref_name }} cancel-in-progress: true jobs: shrinkwrap: - if: startsWith(github.head_ref, 'renovate/') + if: startsWith(github.head_ref || github.ref_name, 'renovate/') name: shrinkwrap runs-on: ubuntu-latest timeout-minutes: 20 steps: - uses: actions/checkout@v7 with: - ref: ${{ github.head_ref }} + ref: ${{ github.head_ref || github.ref_name }} fetch-depth: 0 - uses: actions/setup-node@v7 with: @@ -49,7 +54,7 @@ jobs: - name: Push the refreshed shrinkwrap and re-dispatch CI env: GH_TOKEN: ${{ github.token }} - BRANCH: ${{ github.head_ref }} + BRANCH: ${{ github.head_ref || github.ref_name }} run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" diff --git a/renovate.json b/renovate.json index 7485f98..287058a 100644 --- a/renovate.json +++ b/renovate.json @@ -56,6 +56,17 @@ "matchUpdateTypes": ["major"], "enabled": false }, + { + // The runtime itself is pinned in lockstep across .node-version, rush.json + // nodeSupportedVersionRange and the workflows; bots move them together or not at all. + "matchManagers": ["npm"], + "matchDatasources": ["node-version"], + "enabled": false + }, + { + "matchDepTypes": ["engines", "devEngines.runtime"], + "enabled": false + }, { // lint-config is a git dependency whose upgrades land with their code fixes; Renovate misreads // its tags and proposes downgrades (v0.5.0 -> v0.3.2).