internal: Replace release-drafter with path-based actions/labeler#4177
Conversation
…/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.
There was a problem hiding this comment.
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.
| - '.github/**' | ||
| - 'project/**' | ||
| - 'scripts/**' | ||
| - 'sbt' |
There was a problem hiding this comment.
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'| - '^fix/' | ||
| - '^bug/' |
Summary
release-drafter(config + workflow). It was only used as an autolabeler here — release notes are produced bygh release create --generate-notesreading.github/release.yml(see.github/workflows/release-note.yml).actions/labeler@v5with.github/labeler.ymlfor path-based and head-branch labeling.Motivation: release-drafter@v7 attempts to create a draft release on every
pull_requestevent, which fails on Dependabot PRs because the workflow only grantspull-requests: write(see #4169). Since we don't actually use release-drafter for releases, swapping toactions/labeleris cleaner than working around the v7 behavior.Closes #4169.
Label rules in the new config
doc**/*.md,docs/**internal.github/**,project/**,scripts/**,sbt,.scalafmt.conf,.scalafix.conffeature^feature/,^feat/bug^fix/,^bug/deprecation^deprecate/library-update/dependenciesare already applied by scala-steward / dependabot.Test plan
docfix/branch PR gets labeledbug