From 301a2645ab919dcbac07d1de770c7c64968329a2 Mon Sep 17 00:00:00 2001 From: xavidop Date: Thu, 12 Nov 2026 13:01:30 +0100 Subject: [PATCH] ci: scope release permissions to jobs and split major dependency updates The actions scan rejects write permissions granted at the workflow level, which blocks every pull request that touches release.yml. Give each release job only what it needs. The grouped Maven update is held back whenever it contains a breaking major upgrade, so group minor and patch updates only and let a major update open its own pull request. Also fix the commit prefix, which produced "chore(deps)(deps):". --- .github/dependabot.yml | 14 +++++++++++--- .github/workflows/release.yml | 16 ++++++++++++---- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 19ce61f30..7927fd701 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,15 +15,23 @@ updates: - "maven" assignees: - "xavidop" + # "include: scope" appends "(deps)" itself, so the prefix is the bare type; + # "chore(deps)" produced "chore(deps)(deps):", which is not a valid + # conventional commit and which Release Please cannot parse. commit-message: - prefix: "chore(deps)" + prefix: "chore" include: "scope" - # One pull request for the whole weekly update instead of one per - # dependency, each of which ran every workflow on its own. + # One pull request for the weekly minor and patch updates instead of one + # per dependency, each of which ran every workflow on its own. A major + # update gets its own pull request, so a breaking upgrade cannot hold the + # routine ones back. groups: maven-dependencies: patterns: - "*" + update-types: + - "minor" + - "patch" # Enable version updates for GitHub Actions - package-ecosystem: "github-actions" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 340635c13..e0145c422 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,14 +33,16 @@ on: - minor - major -permissions: - contents: write - packages: write - pull-requests: write +# Each job asks for exactly what it needs. +permissions: {} jobs: release: runs-on: ubuntu-latest + # Release Please pushes the release branch, tags and opens the release PR. + permissions: + contents: write + pull-requests: write outputs: release_created: ${{ steps.release.outputs.release_created }} version: ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} @@ -64,6 +66,9 @@ jobs: needs: release if: ${{ needs.release.outputs.release_created == 'true' }} runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - name: Checkout Repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 @@ -102,6 +107,9 @@ jobs: publish-snapshot: if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - name: Checkout Repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7