diff --git a/.github/labeler.yml b/.github/labeler.yml index 81c591b..db87212 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,20 +1,50 @@ -"type:docs": +# Labels are applied based on PR title prefix (Conventional Commits) first, +# then fall back to changed-file globs. The title-based rules take precedence +# because they are listed first and actions/labeler applies the first match. + +"type:feature": + - head-branch: + - "/^feat/" + - title: + - "/^feat(\\(.+\\))?:/i" - changed-files: - any-glob-to-any-file: - - "**/*.md" - - "LICENSE*" - - "CHANGELOG*" + - "src/**" + +"type:bug": + - head-branch: + - "/^fix/" + - title: + - "/^fix(\\(.+\\))?:/i" "type:chore": + - head-branch: + - "/^chore/" + - "/^ci/" + - "/^test/" + - "/^refactor/" + - "/^build/" + - title: + - "/^chore(\\(.+\\))?:/i" + - "/^ci(\\(.+\\))?:/i" + - "/^test(\\(.+\\))?:/i" + - "/^refactor(\\(.+\\))?:/i" + - "/^build(\\(.+\\))?:/i" - changed-files: - any-glob-to-any-file: - - ".github/**" - "build.zig" - "build.zig.zon" - ".gitignore" - ".editorconfig" -"type:feature": +"type:docs": + - head-branch: + - "/^docs/" + - title: + - "/^docs(\\(.+\\))?:/i" - changed-files: - any-glob-to-any-file: - - "src/**" + - "**/*.md" + - "docs/**" + - "LICENSE*" + - "CHANGELOG*" diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 33e75c3..237d955 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -6,25 +6,66 @@ template: | $CHANGES **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION + +autolabeler: + - label: "type:feature" + title: + - "/^feat(\\(.+\\))?:/i" + - label: "type:bug" + title: + - "/^fix(\\(.+\\))?:/i" + - label: "type:chore" + title: + - "/^chore(\\(.+\\))?:/i" + - "/^ci(\\(.+\\))?:/i" + - "/^test(\\(.+\\))?:/i" + - "/^refactor(\\(.+\\))?:/i" + - "/^build(\\(.+\\))?:/i" + - label: "type:docs" + title: + - "/^docs(\\(.+\\))?:/i" + categories: - title: "🚀 Features" labels: - "type:feature" + exclude-labels: + - "type:bug" + - "type:chore" + - "type:docs" + - "type:spike" - title: "🐛 Bug Fixes" labels: - "type:bug" + exclude-labels: + - "type:feature" + - "type:chore" + - "type:docs" + - "type:spike" - title: "🧰 Maintenance" labels: - "type:chore" - "tech-debt" + exclude-labels: + - "type:feature" + - "type:bug" + - "type:docs" + - "type:spike" - title: "📝 Documentation" labels: - "type:docs" + exclude-labels: + - "type:feature" + - "type:bug" + - "type:chore" + - "type:spike" - title: "🔬 Spikes & Research" labels: - "type:spike" + change-template: "- $TITLE (#$NUMBER) @$AUTHOR" change-title-escapes: '\<*_&' + version-resolver: major: labels: