Skip to content

Fix autolabeler and update release-drafter#78

Merged
Moustachauve merged 1 commit intomainfrom
fix-release-drafter
Apr 3, 2026
Merged

Fix autolabeler and update release-drafter#78
Moustachauve merged 1 commit intomainfrom
fix-release-drafter

Conversation

@Moustachauve
Copy link
Copy Markdown
Owner

Add an autolabeler workflow and extend release-drafter configuration.

Changes:

  • switch name/tag templates to use RESOLVED_VERSION;
  • expand version-resolver labels (include feature/enhancement and bug);
  • embed an autolabeler config section (documentation, chore, refactor, bug, feature rules) in .github/release-drafter.yml;
  • add .github/workflows/autolabeler.yml to automatically label PRs;
  • and simplify .github/workflows/release-drafter.yml triggers/permissions (run on dev and main, add workflow_dispatch, adjust permissions and remove redundant steps/env).

These updates enable automatic PR labeling and align release drafting with resolved versions and more granular label rules.

Add an autolabeler workflow and extend release-drafter configuration. Changes: switch name/tag templates to use RESOLVED_VERSION; expand version-resolver labels (include feature/enhancement and bug); embed an autolabeler config section (documentation, chore, refactor, bug, feature rules) in .github/release-drafter.yml; add .github/workflows/autolabeler.yml to automatically label PRs; and simplify .github/workflows/release-drafter.yml triggers/permissions (run on dev and main, add workflow_dispatch, adjust permissions and remove redundant steps/env). These updates enable automatic PR labeling and align release drafting with resolved versions and more granular label rules.
@github-actions github-actions bot added bug Something isn't working chore For changes that are mostly maintenance work. labels Apr 3, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

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 updates the release-drafter configuration to use $RESOLVED_VERSION for templates and introduces an autolabeler with various category rules. Feedback focuses on correcting several regex patterns in the autolabeler where the optional quantifier was misplaced, potentially causing incorrect matches (e.g., 'chor:' instead of 'chore:'), and recommending a recursive glob pattern for documentation files to ensure they are correctly captured across subdirectories.

autolabeler:
- label: "documentation"
files:
- "*.md"
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

The glob pattern *.md only matches Markdown files in the root directory. Since the branch pattern for documentation includes subdirectories (e.g., docs/), it is recommended to use **/*.md to ensure all documentation changes are correctly labeled.

      - "**/*.md"

- '/chore(\/|-).+/'
- '/dependabot\/.+/'
title:
- '/^chore?:/i'
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

The regex /^chore?:/i matches chor:. The ? quantifier makes the preceding character optional. If you intended to match chore: or chores:, the ? should follow an s or be removed.

      - '/^chores?:/i'

branch:
- '/refactor(\/|-).+/'
title:
- '/^refactor?:/i'
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

The regex /^refactor?:/i matches refacto:. To correctly match refactor: or refactors:, please adjust the position of the ? quantifier.

      - '/^refactors?:/i'

Comment on lines +61 to +62
- '/fix/i'
- '/^bug?:/i'
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

The regex '/fix/i' is unanchored and will match any title containing the string "fix" (e.g., "Prefix support"), leading to incorrect labeling. Additionally, '/^bug?:/i' matches bu:. It is safer to anchor these to the start of the title and fix the quantifier typo.

      - '/^fix(es|ed)?:/i'\n      - '/^bugs?:/i'

- '/enhancement(\/|-).+/'
title:
- '/^feat(ure)?:/i'
- '/^enhancement?:/i'
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

The regex /^enhancement?:/i matches enhancemen:. To match enhancement: or enhancements:, move the ? to follow an s.

      - '/^enhancements?:/i'

@Moustachauve Moustachauve merged commit 04683f4 into main Apr 3, 2026
2 of 3 checks passed
@Moustachauve Moustachauve deleted the fix-release-drafter branch April 3, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working chore For changes that are mostly maintenance work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant