Skip to content

fix: configure autolabeler and improve release-drafter workflow#110

Merged
j-d-ha merged 5 commits into
mainfrom
fix/update-release-drafter
Nov 9, 2025
Merged

fix: configure autolabeler and improve release-drafter workflow#110
j-d-ha merged 5 commits into
mainfrom
fix/update-release-drafter

Conversation

@j-d-ha

@j-d-ha j-d-ha commented Nov 9, 2025

Copy link
Copy Markdown
Collaborator

Summary

Fix Release Drafter autolabeler configuration and improve workflow to properly label PRs and generate changelogs.

Changes

Autolabeler Configuration

  • Added autolabeler section to .github/release-drafter.yml
  • Maps PR titles to labels using regex patterns matching conventional commits format
  • Patterns: feat:, fix:, docs:, refactor:, test:, chore:, ci:
  • Also detects BREAKING CHANGE: in PR body for breaking-change label
  • Improved regex patterns for reliability: /type(\([^)]*\))?:/i

Version Resolution

  • Added default: patch to version-resolver
  • Ensures PRs without specific labels still increment patch version
  • Prevents version resolution from failing

Workflow Configuration

  • Restored pull_request trigger for autolabeler to work on new PRs
  • Proper event types: opened, reopened, synchronize
  • Correct permissions: contents: write, pull-requests: write
  • Autolabeler enabled (disable-autolabeler: false)

How It Works Now

  1. When a new PR is opened, autolabeler checks the title against patterns
  2. If title matches conventional commits format, label is automatically applied
  3. On push to main, Release Drafter creates/updates draft release
  4. Labeled PRs are categorized and appear in correct changelog section
  5. Version is calculated based on labels with patch as fallback

Testing

After merge, the autolabeler will work on all new PRs. Existing merged PRs without labels will not appear in the changelog unless manually labeled.

Next Steps

After merge:

  1. Manually trigger bump-version workflow to create initial git tag
  2. This establishes the reference point for future releases
  3. Subsequent releases will automatically track changes since last tag

Checklist

  • Autolabeler configuration added with proper regex patterns
  • Version resolver has default fallback
  • Workflow triggers on push and pull_request events
  • Permissions correctly configured
  • Configuration follows official Release Drafter documentation

…eler

- Remove pull_request trigger that causes webhook warnings
- Disable autolabeler which was causing the warnings
- Keep core functionality: draft release creation on push to main
- Cleaner, simpler workflow without unnecessary features
- Add 'default: patch' to version-resolver
- Ensures PRs without specific labels still bump patch version
- Prevents version resolution from failing
- Remove ^ anchor which may not work in Release Drafter context
- Change (.+) to ([^)]*) for more specific scope matching
- Prevents greedy matching issues in optional scope group
- Patterns now reliably match: type: or type(scope):
@j-d-ha
j-d-ha force-pushed the fix/update-release-drafter branch from e934a23 to 542db91 Compare November 9, 2025 19:55
@github-actions github-actions Bot added type: fix Bug fix breaking-change Introduces a breaking change labels Nov 9, 2025
@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2025

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 9, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #110   +/-   ##
=======================================
  Coverage   50.12%   50.12%           
=======================================
  Files          52       52           
  Lines        1640     1640           
  Branches      204      204           
=======================================
  Hits          822      822           
  Misses        765      765           
  Partials       53       53           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b5020f...542db91. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@j-d-ha
j-d-ha merged commit a7827d3 into main Nov 9, 2025
8 checks passed
@j-d-ha
j-d-ha deleted the fix/update-release-drafter branch November 9, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Introduces a breaking change type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant