Skip to content

CI: Migrate release-drafter to v7 split#108

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

CI: Migrate release-drafter to v7 split#108
ModeSevenIndustrialSolutions merged 1 commit intolfreleng-actions:mainfrom
modeseven-lfreleng-actions:fix/release-drafter-v7-split

Conversation

@ModeSevenIndustrialSolutions
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates this repository’s GitHub Actions configuration for release-drafter from the v6 combined workflow to the v7 split architecture, separating release drafting (push-only) from PR autolabeling (PR-triggered, fork-safe).

Changes:

  • Split release-drafter into two workflows: push-only drafting and PR autolabeling.
  • Bump release-drafter to v7.1.0 and harden-runner to v2.16.0 (pinned SHAs).
  • Remove the repository-level .github/release-drafter.yml to rely on the org-level configuration.

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 Push-only release drafting workflow updated for v7 and runner hardening; permissions/concurrency adjusted.
.github/workflows/autolabeler.yaml New PR autolabeling workflow supporting forks via pull_request_target + fork-detection gating.
.github/release-drafter.yml Removes per-repo release-drafter configuration (org-level config expected).

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

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>
Copy link
Copy Markdown
Contributor

@tykeal tykeal left a comment

Choose a reason for hiding this comment

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

Auto-approved by dependamerge

@ModeSevenIndustrialSolutions ModeSevenIndustrialSolutions merged commit fbabb35 into lfreleng-actions:main Mar 19, 2026
5 of 6 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