Skip to content

CI: Migrate release-drafter to v7 split - #71

Merged
tykeal merged 1 commit into
lfreleng-actions:mainfrom
modeseven-lfreleng-actions:fix/release-drafter-v7-split
Mar 19, 2026
Merged

tykeal merged 1 commit into
lfreleng-actions:mainfrom
modeseven-lfreleng-actions:fix/release-drafter-v7-split

Conversation

@ModeSevenIndustrialSolutions

Copy link
Copy Markdown
Member

Summary

Migrates release-drafter from v6 (combined workflow) to v7 (split architecture).

Release-drafter v7 removed the disable-releaser and disable-autolabeler inputs, replacing them with dedicated sub-actions. These inputs were left as dead code in action.yml — accepted without warning but never acted upon (upstream bug report).

Changes

  • Splits the combined release-drafter.yaml workflow into two:
    • release-drafter.yaml — push-only trigger, uses root drafter action, contents: write
    • autolabeler.yaml — PR trigger (both pull_request and pull_request_target for fork support), uses dedicated /autolabeler sub-action, pull-requests: write + contents: read
  • Updates to release-drafter v7.1.0 and harden-runner v2.16.0
  • Removes the per-repo .github/release-drafter.yml config (falls back to the org-level .github repo config)
  • Removes deprecated env: GITHUB_TOKEN usage (v7 defaults to ${{ github.token }} via token input)
  • Removes debug concurrency group step (no longer needed with clean workflow split)

Context

This is part of an org-wide migration. The same change is being applied to all lfreleng-actions repositories that have release-drafter configured. The canonical fix was first applied in lfreleng-actions/github2gerrit-action#172.

Security

The pull_request_target trigger in the autolabeler workflow is safe because:

  1. The workflow does NOT checkout any code from the PR
  2. The workflow code runs from the base branch (not the fork)
  3. release-drafter only makes GitHub API calls (no code execution)
  4. Fork detection logic prevents duplicate runs for same-repo PRs

Copilot AI review requested due to automatic review settings March 19, 2026 13:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the repository’s Release Drafter automation from the v6 combined workflow to the v7 split architecture, separating release drafting (push-triggered) from PR autolabeling (PR-triggered, including fork support).

Changes:

  • Split the former combined Release Drafter workflow into release-drafter.yaml (push-only) and a new autolabeler.yaml (PR + PR-target with fork handling).
  • Bump pinned action SHAs to release-drafter@v7.1.0 and step-security/harden-runner@v2.16.0, and remove legacy token/env usage and the debug concurrency step.
  • Remove the repo-local .github/release-drafter.yml configuration file.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/release-drafter.yaml Updates to v7 action usage, push-only trigger, simplified concurrency/permissions.
.github/workflows/autolabeler.yaml New workflow to run the v7 /autolabeler sub-action on PR events (including forks) with scoped permissions.
.github/release-drafter.yml Deletes the repo-local Release Drafter/autolabeler configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release-drafter.yaml Resolved
Comment thread .github/workflows/autolabeler.yaml Resolved
Release-drafter v7 removed the disable-releaser
and disable-autolabeler inputs, replacing them
with dedicated sub-actions. This commit:

- Splits the combined workflow into two files:
  release-drafter.yaml (push-only, drafter)
  and autolabeler.yaml (PR events, autolabeler)
- Updates to release-drafter v7.1.0
- Updates harden-runner to v2.16.0
- Removes the per-repo release-drafter config
  (falls back to org-level .github repo config)
- Removes deprecated env GITHUB_TOKEN usage
- Removes debug concurrency group step

Co-authored-by: Claude <claude@anthropic.com>
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>

@tykeal tykeal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved by dependamerge

@tykeal
tykeal merged commit 1e4762a into lfreleng-actions:main Mar 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants