Skip to content

Commit

Permalink
Merge pull request #335 from epinio/richard-cox-patch-1
Browse files Browse the repository at this point in the history
Exclude anything but categorised labels, add autolabeler
  • Loading branch information
richard-cox authored Sep 4, 2023
2 parents 39aee3b + 64d32fc commit 211cd4b
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 11 deletions.
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 }}

0 comments on commit 211cd4b

Please sign in to comment.