Autolabel pre-commit PRs with 'changelog: skip'

This commit is contained in:
Hugo van Kemenade 2023-01-05 18:42:43 +02:00
parent 28403386a8
commit e63ecc7bea
2 changed files with 21 additions and 0 deletions

View file

@ -22,6 +22,11 @@ categories:
exclude-labels: exclude-labels:
- "changelog: skip" - "changelog: skip"
autolabeler:
- label: "changelog: skip"
branch:
- "/pre-commit-ci-update-config/"
template: | template: |
$CHANGES $CHANGES

View file

@ -5,11 +5,27 @@ on:
# branches to consider in the event; optional, defaults to all # branches to consider in the event; optional, defaults to all
branches: branches:
- main - 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]
workflow_dispatch: workflow_dispatch:
permissions:
contents: read
jobs: jobs:
update_release_draft: update_release_draft:
if: github.repository_owner == 'pylast' if: github.repository_owner == 'pylast'
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-latest runs-on: ubuntu-latest
steps: steps:
# Drafts your next release notes as pull requests are merged into "main" # Drafts your next release notes as pull requests are merged into "main"