Skip to content

internal: Replace release-drafter with path-based actions/labeler#4177

Merged
xerial merged 1 commit into
mainfrom
fix/20260503_161925-replace-release-drafter-with-path-labeler
May 3, 2026
Merged

internal: Replace release-drafter with path-based actions/labeler#4177
xerial merged 1 commit into
mainfrom
fix/20260503_161925-replace-release-drafter-with-path-labeler

Conversation

@xerial

@xerial xerial commented May 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Drop release-drafter (config + workflow). It was only used as an autolabeler here — release notes are produced by gh release create --generate-notes reading .github/release.yml (see .github/workflows/release-note.yml).
  • Add actions/labeler@v5 with .github/labeler.yml for path-based and head-branch labeling.

Motivation: release-drafter@v7 attempts to create a draft release on every pull_request event, which fails on Dependabot PRs because the workflow only grants pull-requests: write (see #4169). Since we don't actually use release-drafter for releases, swapping to actions/labeler is cleaner than working around the v7 behavior.

Closes #4169.

Label rules in the new config

Label Trigger
doc files: **/*.md, docs/**
internal files: .github/**, project/**, scripts/**, sbt, .scalafmt.conf, .scalafix.conf
feature branch: ^feature/, ^feat/
bug branch: ^fix/, ^bug/
deprecation branch: ^deprecate/

library-update / dependencies are already applied by scala-steward / dependabot.

Test plan

…/labeler

release-drafter@v7 fails on dependabot PRs (write-perm needed to draft a
release on every PR event). Releases here are produced by `gh release create
--generate-notes` reading `.github/release.yml`, so release-drafter was only
used as an autolabeler.

Switch PR labeling to actions/labeler@v5 with path-based and head-branch
rules, and drop release-drafter entirely.
@xerial xerial enabled auto-merge (squash) May 3, 2026 23:20
@xerial xerial merged commit 483244b into main May 3, 2026
21 of 22 checks passed
@xerial xerial deleted the fix/20260503_161925-replace-release-drafter-with-path-labeler branch May 3, 2026 23:20

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a new .github/labeler.yml configuration to automate PR labeling based on file paths and branch naming conventions, replacing an older configuration. The review feedback suggests improving the 'internal' label by explicitly including build.sbt and other .sbt files to better capture Scala build changes, and expanding the 'bug' label to recognize the ^bugfix/ branch prefix for better coverage.

Comment thread .github/labeler.yml
- '.github/**'
- 'project/**'
- 'scripts/**'
- 'sbt'

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.

high

In Scala projects, build.sbt and other root-level .sbt files (such as version.sbt) are the primary build configuration files. Since this labeler is now path-based for internal updates, these files should be explicitly included to ensure build-related changes are correctly categorized.

          - 'sbt'
          - 'build.sbt'
          - '*.sbt'

Comment thread .github/labeler.yml
Comment on lines +24 to +25
- '^fix/'
- '^bug/'

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.

medium

Adding the ^bugfix/ prefix to the bug label patterns provides better coverage, as it is a very common naming convention for bug-related branches alongside fix/ and bug/.

      - '^fix/'
      - '^bug/'
      - '^bugfix/'

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.

1 participant