From d3145846c533d724d83bcbdde00ead9149285a00 Mon Sep 17 00:00:00 2001 From: Hilmar Falkenberg Date: Mon, 26 Aug 2024 12:40:39 +0200 Subject: [PATCH] chore: change release notes template, auto label PRs, ... (#893) #### What this PR does / why we need it #### Which issue(s) this PR fixes --- .github/config/pr-labeler.yml | 4 +++ .github/pull_request_template.md | 4 +++ .github/release-drafter.yml | 26 ++++++++++++++++++- .github/workflows/pr-labeler-kind.yaml | 26 +++++++++++++++++++ .../{labeler.yml => pr-labeler-size.yml} | 0 5 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .github/config/pr-labeler.yml create mode 100644 .github/workflows/pr-labeler-kind.yaml rename .github/workflows/{labeler.yml => pr-labeler-size.yml} (100%) diff --git a/.github/config/pr-labeler.yml b/.github/config/pr-labeler.yml new file mode 100644 index 0000000000..eee02c614e --- /dev/null +++ b/.github/config/pr-labeler.yml @@ -0,0 +1,4 @@ +feature: ['feature/*', 'feat/*'] +fix: fix/* +chore :hammer:: chore/* +dependencies: ['dependencies/*', 'dependabot/*'] diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d9fe330b63..a88b718453 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,3 +1,7 @@ +--- +labels: kind/skip-release-notes +--- + #### What this PR does / why we need it diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 4e20b2ebe2..61c15d5e1e 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -8,4 +8,28 @@ template: | $CHANGES exclude-labels: - - 'kind/skip-release-notes' \ No newline at end of file + - 'kind/skip-release-notes' + - 'wontfix' + - 'triage/wont-fix' + - 'triage/invalid' +categories: + - title: '🚀 Features' + labels: + - 'kind/enhancement' + - 'feature' + - 'enhancement' + - title: '🐛 Bug Fixes' + collapse-after: 5 + labels: + - 'kind/bug' + - 'fix' + - 'bugfix' + - 'bug' + - title: '🧰 Maintenance' + collapse-after: 3 + labels: + - 'chore' + - title: '⬆️ Dependencies' + collapse-after: 3 + labels: + - 'dependencies' diff --git a/.github/workflows/pr-labeler-kind.yaml b/.github/workflows/pr-labeler-kind.yaml new file mode 100644 index 0000000000..54b9c9af1e --- /dev/null +++ b/.github/workflows/pr-labeler-kind.yaml @@ -0,0 +1,26 @@ +name: PR Labeler +on: + pull_request: + types: [opened] + +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: + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.OCMBOT_APP_ID }} + private_key: ${{ secrets.OCMBOT_PRIV_KEY }} + - name: Label PR based on branch name + uses: TimonVS/pr-labeler-action@v5 + with: + repo-token: ${{ steps.generate_token.outputs.token }} + configuration-path: .github/config/pr-labeler.yml diff --git a/.github/workflows/labeler.yml b/.github/workflows/pr-labeler-size.yml similarity index 100% rename from .github/workflows/labeler.yml rename to .github/workflows/pr-labeler-size.yml