From 51751a832c1500acd0b45a417a3d167922ceedfa Mon Sep 17 00:00:00 2001 From: Hilmar Falkenberg Date: Wed, 27 Nov 2024 16:57:16 +0100 Subject: [PATCH] chore: adjust labels to new configuration (#1115) When we migrate our labels and use [only the central managed ones](https://github.com/open-component-model/.github/blob/main/.github/settings.yml#L62), we'll need to change them at several places. --- .github/CODEOWNERS | 4 ++ .github/ISSUE_TEMPLATE/enhancement_request.md | 2 +- .github/ISSUE_TEMPLATE/user_story.md | 2 +- .github/config/labeler.yml | 24 +++++++++-- .github/config/release.yml | 42 +++++++++---------- .github/dependabot.yml | 8 ++++ .github/workflows/flake_vendorhash.yaml | 2 +- .github/workflows/pull-request.yaml | 20 ++++----- 8 files changed, 65 insertions(+), 39 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ce831abcda..1b1d6f773c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,6 +3,10 @@ # will be requested for review when someone opens a pull request. * @open-component-model/Maintainers +# Changes on repository settings require admin permissions +/.github/settings.yml @open-component-model/admins +/.github/CODEOWNERS @open-component-model/admins + # Owners for specific directories #/docs/ @/ #/src/ @/ diff --git a/.github/ISSUE_TEMPLATE/enhancement_request.md b/.github/ISSUE_TEMPLATE/enhancement_request.md index 84a7d6c8f0..4bbaa79c0b 100644 --- a/.github/ISSUE_TEMPLATE/enhancement_request.md +++ b/.github/ISSUE_TEMPLATE/enhancement_request.md @@ -1,7 +1,7 @@ --- name: Enhancement Request about: Suggest an enhancement -labels: kind/enhancement +labels: kind/feature --- diff --git a/.github/ISSUE_TEMPLATE/user_story.md b/.github/ISSUE_TEMPLATE/user_story.md index 645631eefa..7778433c9d 100644 --- a/.github/ISSUE_TEMPLATE/user_story.md +++ b/.github/ISSUE_TEMPLATE/user_story.md @@ -1,7 +1,7 @@ --- name: User Story about: User Story -labels: +labels: kind/feature title: - Title --- diff --git a/.github/config/labeler.yml b/.github/config/labeler.yml index 2efa435e4a..a1177b0253 100644 --- a/.github/config/labeler.yml +++ b/.github/config/labeler.yml @@ -1,9 +1,27 @@ # see https://github.com/actions/labeler?tab=readme-ov-file#match-object to configure correctly -dependencies: +kind/dependency: - any: - head-branch: 'dependencies/*' - head-branch: 'dependabot/*' -github-actions: + - changed-files: + - any-glob-to-any-file: ['go.mod', 'go.sum'] +component/github-actions: +- any: + - changed-files: + - any-glob-to-any-file: ['.github/**'] +area/documentation: +- any: + - changed-files: + - any-glob-to-any-file: ['docs/**', 'examples/**'] +component/ocm-cli: +- any: + - changed-files: + - any-glob-to-any-file: ['components/ocmcli/**', 'cmds/ocm/**'] +component/ocm-spec: +- any: + - changed-files: + - any-glob-to-any-file: ['resources/**'] +kind/skip-release-notes: - any: - changed-files: - - any-glob-to-any-file: ['.github/**'] \ No newline at end of file + - any-glob-to-any-file: ['flake.lock', 'flake.nix'] diff --git a/.github/config/release.yml b/.github/config/release.yml index cf08521604..dcbcbc531f 100644 --- a/.github/config/release.yml +++ b/.github/config/release.yml @@ -1,28 +1,24 @@ changelog: + # ../workflows/pull_request.yaml#verify-labels one_of: kind/chore,kind/bugfix,kind/feature,kind/dependency,kind/refactor exclude: labels: - 'kind/skip-release-notes' - - 'wontfix' - - 'triage/wont-fix' - - 'triage/invalid' + - 'dev/wont-fix' + - 'dev/cant-reproduce' categories: - - title: '‼️ Breaking Changes' - labels: - - 'breaking-change' - - title: '🚀 Features' - labels: - - 'kind/enhancement' - - 'feature' - - 'enhancement' - - title: '🐛 Bug Fixes' - labels: - - 'kind/bug' - - 'fix' - - 'bugfix' - - 'bug' - - title: '🧰 Maintenance' - labels: - - 'chore' - - title: '⬆️ Dependencies' - labels: - - 'dependencies' \ No newline at end of file + - title: '‼️ Breaking Changes' + labels: + - '!BREAKING-CHANGE!' + - title: '🚀 Features' + labels: + - 'kind/feature' + - title: '🐛 Bug Fixes' + labels: + - 'kind/bugfix' + - title: '🧰 Maintenance' + labels: + - 'kind/chore' + - 'kind/refactor' + - title: '⬆️ Dependencies' + labels: + - 'kind/dependency' diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f689040921..073b795316 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,6 +11,11 @@ updates: schedule: interval: "weekly" day: "sunday" + labels: + - kind/dependency + - kind/chore + - kind/skip-release-notes + - component/github-actions - package-ecosystem: "gomod" directory: "/" groups: @@ -19,3 +24,6 @@ updates: schedule: interval: "weekly" day: "sunday" + labels: + - kind/dependency + - kind/chore diff --git a/.github/workflows/flake_vendorhash.yaml b/.github/workflows/flake_vendorhash.yaml index 4e4c390cb8..b1d20d21ee 100644 --- a/.github/workflows/flake_vendorhash.yaml +++ b/.github/workflows/flake_vendorhash.yaml @@ -59,6 +59,6 @@ jobs: sign-commits: true labels: | kind/skip-release-notes - chore + kind/chore body: | Update OCM CLI vendor hash (see: .github/workflows/flake_vendorhash.yaml) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 06785945db..cc2ad2bf8d 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -24,18 +24,18 @@ jobs: env: TYPE_TO_LABEL: | { - "feat":"kind/enhancement", - "fix":"fix", - "chore":"chore", - "docs":"kind/documentation", - "test":"kind/test", - "perf":"kind/performance" + "feat":"kind/feature", + "fix":"kind/bugfix", + "chore":"kind/chore", + "docs":"area/documentation", + "test":"area/testing", + "perf":"area/performance" } SCOPE_TO_LABEL: | { - "deps":"dependencies" + "deps":"kind/dependency" } - BREAKING_CHANGE_LABEL: "breaking" + BREAKING_CHANGE_LABEL: "!BREAKING-CHANGE!" with: script: | console.log("Verify that the PR title follows the Conventional Commit format"); @@ -158,5 +158,5 @@ jobs: - name: PRs should have at least one qualifying label uses: docker://agilepathway/pull-request-label-checker:latest with: - one_of: chore,fix,bugfix,bug,kind/bug,feature,enhancement,kind/enhancement,dependencies - repo_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + one_of: kind/chore,kind/bugfix,kind/feature,kind/dependency,kind/refactor + repo_token: ${{ secrets.GITHUB_TOKEN }}