From 62fa36b83647e587086ec9d7db2ffa0be5454842 Mon Sep 17 00:00:00 2001 From: Diego OJ Date: Sun, 15 Nov 2026 12:55:09 -0300 Subject: [PATCH 1/2] Chore | GitHub Actions on Node 24, release-drafter v7 - checkout v7, setup-python v7, upload-artifact v7, download-artifact v8 (also in the install-leverage composite action, which Dependabot did not scan: added to dependabot.yml), act10ns/slack v2 - release-drafter v6.1.0 -> v7.10.0: v7 dropped disable-autolabeler and disable-releaser and moved the autolabeler to its own action. The draft job uses the drafter with no inputs; the autolabel job uses release-drafter/autolabeler, which never touches the drafts. With the v6 inputs, the autolabel job would have run the whole drafter on every PR - .github/release-drafter.yml in the v7 format: categories with `when`, version-resolver labels as `type: version-resolver` categories, autolabeler rules with `labels` Closes #364 Co-Authored-By: Claude Opus 5.5 --- .github/actions/install-leverage/action.yml | 2 +- .github/dependabot.yml | 3 +- .github/release-drafter.yml | 82 ++++++++++--------- .../workflows/release-management-github.yml | 17 ++-- .../release-pypi-build-push-package.yml | 12 +-- .../release-pypi-build-push-test-package.yml | 4 +- .github/workflows/test-lint-black.yaml | 2 +- .github/workflows/tests-integration.yaml | 8 +- .github/workflows/tests-unit.yml | 4 +- 9 files changed, 67 insertions(+), 67 deletions(-) diff --git a/.github/actions/install-leverage/action.yml b/.github/actions/install-leverage/action.yml index b8b45d8c..cf27d191 100644 --- a/.github/actions/install-leverage/action.yml +++ b/.github/actions/install-leverage/action.yml @@ -18,7 +18,7 @@ runs: steps: - name: Download distributables if: inputs.dist-artifact != '' - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: ${{ inputs.dist-artifact }} path: dist diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3a060ddf..040bd5b2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -20,7 +20,8 @@ updates: update-types: [minor, patch] - package-ecosystem: github-actions - directory: / + # The workflows, plus the composite actions under .github/actions + directories: ["/", "/.github/actions/*"] schedule: interval: weekly groups: diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 3eded0d9..510d1d20 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -2,60 +2,66 @@ name-template: 'v$RESOLVED_VERSION 🌈' tag-template: 'v$RESOLVED_VERSION' categories: - title: '🚀 Features' - labels: - - 'feature' - - 'enhancement' + when: + labels: + - 'feature' + - 'enhancement' - title: '💣 Breaking Change' - labels: - - 'breakingchange' - - 'breaking' + when: + labels: + - 'breakingchange' + - 'breaking' - title: '🐛 Bug Fixes' - labels: - - 'fix' - - 'bugfix' - - 'bug' + when: + labels: + - 'fix' + - 'bugfix' + - 'bug' - title: '📝 Documentation' - labels: - - 'doc' - - 'documentation' + when: + labels: + - 'doc' + - 'documentation' - title: '🔨 Maintenance' - labels: - - 'chore' - - 'maintenance' + when: + labels: + - 'chore' + - 'maintenance' + # The next version is the highest bump among the merged PRs' labels: major, minor or patch. + # The autolabeler below sets a default from the PR title; change the label on the PR to override it. + - type: 'version-resolver' + semver-increment: 'major' + when: + labels: + - 'major' + - 'breaking' + - 'breakingchange' + - type: 'version-resolver' + semver-increment: 'minor' + when: + label: 'minor' + - type: 'version-resolver' + semver-increment: 'patch' + when: + label: 'patch' # Labels PRs from their title, e.g. "Fix | ...", "fix: ...", "Enhancement | ...", "feat(cli): ...". -# Runs on pull_request events (see release-management-github.yml); it only adds labels. +# Runs on pull_request events, with the autolabeler action (see release-management-github.yml); it only adds labels. autolabeler: - - label: 'fix' + - labels: ['fix', 'patch'] title: - '/^\s*(fix|bug|bugfix|hotfix)\b/i' - - label: 'enhancement' + - labels: ['enhancement', 'minor'] title: - '/^\s*(feat|feature|enhancement)\b/i' - - label: 'documentation' + - labels: ['documentation', 'patch'] title: - '/^\s*docs?\b/i' - - label: 'minor' + - labels: ['patch'] title: - - '/^\s*(feat|feature|enhancement)\b/i' - - label: 'patch' - title: - - '/^\s*(fix|bug|bugfix|hotfix|docs?|chore)\b/i' + - '/^\s*chore\b/i' change-template: '- $TITLE @$AUTHOR (#$NUMBER)' change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. -# The next version is the highest bump among the merged PRs' labels: major, minor or patch. -# The autolabeler above sets a default from the PR title; change the label on the PR to override it. version-resolver: - major: - labels: - - 'major' - - 'breaking' - - 'breakingchange' - minor: - labels: - - 'minor' - patch: - labels: - - 'patch' default: patch footer: | --- diff --git a/.github/workflows/release-management-github.yml b/.github/workflows/release-management-github.yml index baa71402..5abd3f60 100644 --- a/.github/workflows/release-management-github.yml +++ b/.github/workflows/release-management-github.yml @@ -27,14 +27,11 @@ jobs: pull-requests: read runs-on: ubuntu-latest steps: - - uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - disable-autolabeler: true + - uses: release-drafter/release-drafter@978bb0b30c5ee8cdd332ced253758157150d43f0 # v7.10.0 - # Labels the PR from its title (see autolabeler in .github/release-drafter.yml). It must not - # touch the drafts: concurrent PR events created duplicate drafts targeting the PR branch. + # Labels the PR from its title (see autolabeler in .github/release-drafter.yml). Since v7 the + # autolabeler is its own action and never touches the drafts (concurrent PR events used to create + # duplicate drafts targeting the PR branch). autolabel: if: github.event_name == 'pull_request' # Only the latest event of a PR matters @@ -47,8 +44,4 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - disable-releaser: true + - uses: release-drafter/release-drafter/autolabeler@978bb0b30c5ee8cdd332ced253758157150d43f0 # v7.10.0 diff --git a/.github/workflows/release-pypi-build-push-package.yml b/.github/workflows/release-pypi-build-push-package.yml index 3c5081ef..a6f0dd3c 100644 --- a/.github/workflows/release-pypi-build-push-package.yml +++ b/.github/workflows/release-pypi-build-push-package.yml @@ -21,9 +21,9 @@ jobs: version: ${{ steps.version.outputs.version }} steps: # On a release event this checks out the released tag, not whatever master points to now - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v7 with: python-version: '3.13' @@ -61,7 +61,7 @@ jobs: run: | make check - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: dist path: dist/ @@ -92,12 +92,12 @@ jobs: needs: [build, unit_tests, integration_tests] runs-on: ubuntu-latest steps: - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v7 with: python-version: '3.13' # The very same distributables that were tested, not a rebuild - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: name: dist path: dist @@ -116,7 +116,7 @@ jobs: if: always() runs-on: ubuntu-latest steps: - - uses: act10ns/slack@v1 + - uses: act10ns/slack@v2 with: # The publication is reported as failed if anything before it failed or was skipped status: ${{ needs.publish.result == 'success' && 'success' || 'failure' }} diff --git a/.github/workflows/release-pypi-build-push-test-package.yml b/.github/workflows/release-pypi-build-push-test-package.yml index 3e4ad71a..19cb51d4 100644 --- a/.github/workflows/release-pypi-build-push-test-package.yml +++ b/.github/workflows/release-pypi-build-push-test-package.yml @@ -14,9 +14,9 @@ jobs: build_push: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v7 with: python-version: '3.13' diff --git a/.github/workflows/test-lint-black.yaml b/.github/workflows/test-lint-black.yaml index 0e8136c2..cc5de6dd 100644 --- a/.github/workflows/test-lint-black.yaml +++ b/.github/workflows/test-lint-black.yaml @@ -10,7 +10,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: persist-credentials: false diff --git a/.github/workflows/tests-integration.yaml b/.github/workflows/tests-integration.yaml index 1f5d492a..6c1917bd 100644 --- a/.github/workflows/tests-integration.yaml +++ b/.github/workflows/tests-integration.yaml @@ -61,11 +61,11 @@ jobs: OPENTOFU_VERSION: ${{ matrix.opentofu }} BATS_LIB_PATH: /usr/local/lib/bats steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: persist-credentials: false - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v7 with: python-version: '3.13' @@ -182,11 +182,11 @@ jobs: # The oldest and newest supported versions; the unit tests cover every one of them python-version: ['3.11', '3.15'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: persist-credentials: false - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml index c8960a2e..155e55be 100644 --- a/.github/workflows/tests-unit.yml +++ b/.github/workflows/tests-unit.yml @@ -16,10 +16,10 @@ jobs: matrix: python-version: ['3.11', '3.12', '3.13', '3.14', '3.15'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} From 11546322721b1f7a90ef285af5bd32a02c90b8f8 Mon Sep 17 00:00:00 2001 From: Diego OJ Date: Sun, 15 Nov 2026 13:07:03 -0300 Subject: [PATCH 2/2] Chore | Autolabeler: sync its labels with the title, skip label events Addresses the CodeRabbit review on #373: - sync-labels: true, so a PR retitled from "feat" to "fix" loses 'minor' and 'enhancement' instead of keeping a stale minor bump. Only the autolabeler's own labels are removed - The workflow no longer runs on labeled/unlabeled: label changes can't change what the title matches, and rerunning there fought manual edits - The config comment says how to override the version now: change the title, or add 'major'/'breaking' Co-Authored-By: Claude Opus 5.5 --- .github/release-drafter.yml | 8 ++++++-- .github/workflows/release-management-github.yml | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 510d1d20..4487327d 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -28,7 +28,8 @@ categories: - 'chore' - 'maintenance' # The next version is the highest bump among the merged PRs' labels: major, minor or patch. - # The autolabeler below sets a default from the PR title; change the label on the PR to override it. + # The autolabeler below sets minor or patch from the PR title. To override it, change the title, or + # add 'major'/'breaking', which the autolabeler doesn't manage (it removes its own labels, see below). - type: 'version-resolver' semver-increment: 'major' when: @@ -45,7 +46,10 @@ categories: when: label: 'patch' # Labels PRs from their title, e.g. "Fix | ...", "fix: ...", "Enhancement | ...", "feat(cli): ...". -# Runs on pull_request events, with the autolabeler action (see release-management-github.yml); it only adds labels. +# Runs on pull_request events, with the autolabeler action (see release-management-github.yml). +# sync-labels: the labels below follow the title, so a PR retitled from "feat" to "fix" loses 'minor' +# and 'enhancement'. Only these labels are removed; any other (bug, test, major, ...) is left alone. +sync-labels: true autolabeler: - labels: ['fix', 'patch'] title: diff --git a/.github/workflows/release-management-github.yml b/.github/workflows/release-management-github.yml index 5abd3f60..d7305ebb 100644 --- a/.github/workflows/release-management-github.yml +++ b/.github/workflows/release-management-github.yml @@ -6,8 +6,9 @@ on: - master # Only for the autolabeler pull_request: - # edited: so a title change relabels the PR - types: [opened, reopened, synchronize, edited, labeled, unlabeled] + # edited: so a title change relabels the PR. Not on labeled/unlabeled: label changes can't change + # what the title matches, and rerunning there would only fight the maintainer's edits. + types: [opened, reopened, synchronize, edited] permissions: contents: read