Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use pr labeller for supporting conventional commits #8

Merged
merged 2 commits into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
feature: ['feature/*', 'feat/*']
fix: ['fix/*','bug/*','hotfix/*','bugfix/*']
chore: chore/*
19 changes: 2 additions & 17 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ template: |
## What's changed

$CHANGES
autolabeler:
autolabeler: # assign labels to pr according to files having changed
- label: 'python'
files:
- '*.py'
Expand All @@ -47,20 +47,5 @@ autolabeler:
files:
- '*.lock'
- 'pyproject.toml'
- label: 'chore'
branch:
- '/chore\/.+/'
- label: 'bug'
branch:
- '/bug\/.+/'
- '/bugfix\/.+/'
- '/hotfix\/.+/'
- '/fix\/.+/'
- label: 'feature'
branch:
- '/feature\/.+/'
- '/feat\/.+/'



# other labels: github_actions , python + support conv commits: feat: , build:, chore:, ci:, docs:, style:, refactor:, perf:, test:
# other labels: github_actions
16 changes: 14 additions & 2 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ permissions:
contents: read

jobs:
pr-labeler:
permissions:
contents: read # for TimonVS/pr-labeler-action to read config file
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
runs-on: ubuntu-latest
steps:
- uses: TimonVS/pr-labeler-action@v5
# configs is in pr-labeler.yml
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

update_release_draft:
permissions:
# write permission is required to create a github release
Expand All @@ -23,9 +34,10 @@ jobs:
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v6
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# config is in release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Loading