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

Exclude anything but categorised labels, add autolabeler #335

Merged
merged 3 commits into from
Sep 4, 2023
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
53 changes: 42 additions & 11 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,45 @@ categories:
- 'kind/dependencies'
- 'kind/project'

# Needs to contain all labels from above
include-labels:
- 'kind/enhancement'
- 'kind/bug'
- 'kind/chore'
- 'kind/dependencies'
- 'kind/project'

change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
tag-template: 'v$RESOLVED_VERSION'
name-template: 'v$RESOLVED_VERSION 🌈'
version-template: '$MAJOR.$MINOR'
autolabeler:
- label: 'kind/chore'
branch:
- '/chore\/.+/'
title:
- '/\[chore\]/i'
- label: 'kind/dependencies'
branch:
- '/dependencies\/.+/'
title:
- '/\[dependencies\]/i'
- label: 'kind/project'
branch:
- '/project\/.+/'
title:
- '/\[project\]/i'
- label: 'kind/bug'
branch:
- '/fix\/.+/'
title:
- '/\[fix\]/i'
- label: 'kind/enhancement'
branch:
- '/feature\/.+/'
title:
- '/\[feature\]/i'
template: |

# What's Changed
Expand All @@ -28,19 +63,15 @@ template: |
version-resolver:
major:
labels:
- 'major'
- 'breaking'
- 'disabled'
minor:
labels:
- 'minor'
- 'feature'
- 'status/enhancement'
- 'dependencies'
- 'kind/enhancement'
- 'kind/bug'
- 'kind/chore'
- 'kind/dependencies'
- 'kind/project'
patch:
labels:
- 'patch'
- 'fix'
- 'bugfix'
- 'status/bug'
- 'chore'
- 'disabled'
default: patch
17 changes: 17 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,30 @@ on:
# branches to consider in the event; optional, defaults to all
branches:
- main
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
# pull_request_target event is required for autolabeler to support PRs from forks
pull_request_target:
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-20.04
steps:
- uses: release-drafter/release-drafter@v5
with:
commitish: main
config-name: release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}