From dffc3bdeb16bbb558f01d71091c7ccdb5a53be4c Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Fri, 8 Dec 2023 12:03:03 +0100 Subject: [PATCH] Fix: Github settings Signed-off-by: Nicolas Lamirault --- .github/labeler.yml | 61 +++----- .github/settings.yml | 187 +---------------------- .github/workflows/project-pr-labeler.yml | 48 ++++++ 3 files changed, 76 insertions(+), 220 deletions(-) create mode 100644 .github/workflows/project-pr-labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml index 2a5da3b..a151d5d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -16,49 +16,32 @@ # Labels for action/labeler -area/kubernetes: - - kubernetes/* - - kubernetes/**/* +###################################### +# Label area/xxx -cloud/gcp: - - iac/gcp/* - - iac/gcp/**/* - - kubernetes/overlays/gcp/**/* +area/krm: +- changed-files: + - any-glob-to-any-file: krm/** -cloud/aws: - - iac/aws/* - - iac/aws/**/* +area/github: +- changed-files: + - any-glob-to-any-file: .github/** -cloud/azure: - - iac/azure/* - - iac/azure/**/* +###################################### +# Label krm/xxx -cloud/alicloud: - - iac/alicloud/* - - iac/alicloud/**/* +krm/gcp-config-connector: +- changed-files: + - any-glob-to-any-file: krm/kcc/** -cloud/digitalocean: - - iac/digitalocean/* - - iac/digitalocean/**/* +krm/aws-controllers-k8s: +- changed-files: + - any-glob-to-any-file: krm/ack/** -cloud/exoscale: - - iac/exoscale/* - - iac/exoscale/**/* +krm/azure-service-operator: +- changed-files: + - any-glob-to-any-file: krm/aso/** -cloud/scaleway: - - iac/scaleway/* - - iac/scaleway/**/* - -cloud/homelab: - - iac/homelab/* - - iac/homelab/**/* - - kubernetes/overlays/k3s/homelab - -cloud/cicd: - - iac/cicd/* - - iac/cicd/**/* - - kubernetes/overlays/k3s/cicd/* - -kind/documentation: - - docs/* - - docs/**/* +krm/crossplane: +- changed-files: + - any-glob-to-any-file: krm/crossplane/** diff --git a/.github/settings.yml b/.github/settings.yml index 1e01525..535e4ae 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -80,192 +80,13 @@ labels: description: "Cloud Provider / Civo" color: "068082" -## NEEDS - -- name: "needs/triage" - description: "Indicates an issue or PR lacks a `triage/foo` label and requires one." - color: "D669BE" - -- name: "needs/priority" - description: "Indicates a PR lacks a `priority/foo` label and requires one." - color: "D669BE" - -- name: "needs/kind" - description: "Indicates a PR lacks a `kind/foo` label and requires one." - color: "D669BE" - -- name: "needs/lifecycle" - description: "Indicates a PR lacks a `lifecycle/foo` label and requires one." - color: "D669BE" - -- name: "needs/area" - description: "Indicates an issue or PR lacks a `area/foo` label and requires one." - color: "D669BE" - -- name: "needs/size" - description: "Indicates an issue or PR lacks a `size/foo` label and requires one." - color: "D669BE" - -- name: "needs/status" - description: "Indicates an issue or PR lacks a `status/foo` label and requires one." - color: "D669BE" - -- name: "needs/cloud" - description: "Indicates a PR lacks a `cloud/foo` label and requires one." - color: "D669BE" ## AREA -- name: "area/kubernetes" - description: "Kubernetes" - color: "cc317c" - -- name: "area/terraform" - description: "Terraform" - color: "cc317c" - -- name: "area/inspec" - description: "Inspec" - color: "cc317c" - -- name: "area/ansible" - description: "Ansible" +- name: "area/krm" + description: " Kubernetes Resources Model" color: "cc317c" -- name: "area/github" - description: "Github" - color: "cc317c" - -## DEPENDENCY - -- name: "dependency/terraform" - description: "Dependency Terraform" - color: "6fcb70" - -- name: "dependency/docker" - description: "Dependency Docker" - color: "6fcb70" - -- name: "dependency/helm" - description: "Dependency Helm" - color: "6fcb70" - -- name: "dependency/flux" - description: "Dependency Flux" - color: "6fcb70" - -- name: "dependency/argo" - description: "Dependency Argo" - color: "6fcb70" - -- name: "dependency/ansible" - description: "Dependency Ansible" - color: "6fcb70" - -- name: "dependency/github" - description: "Dependency Github Actions" - color: "6fcb70" - -- name: "dependency/krm" - description: "Dependency KRM" - color: "6fcb70" - -## SIZE - -- name: "size/xs" - description: "Size XS" - color: "ededed" - -- name: "size/s" - description: "Size S" - color: "ededed" - -- name: "size/m" - description: "Size M" - color: "ededed" - -- name: "size/l" - description: "Size L" - color: "ededed" - -- name: "size/xl" - description: "Size XL" - color: "ededed" - -## LIFECYCLE - -- name: "lifecycle/waiting" - description: "Indicates that an issue or PR is waiting a contributor." - color: "75CA20" - -- name: "lifecycle/active" - description: "Indicates that an issue or PR is actively being worked on by a contributor." - color: "75CA20" - -- name: "lifecycle/frozen" - description: "Indicates that an issue or PR should not be auto-closed due to staleness." - color: "10D3EE" - -- name: "lifecycle/stale" - description: "Denotes an issue or PR has remained open with no activity and has become stale." - color: "616F6C" - -- name: "lifecycle/rotten" - description: "Denotes an issue or PR that has aged beyond stale and will be auto-closed." - color: "212F3D" - -## STATUS - -- name: "status/abandoned" - description: "This issue or PR is no longer important" - color: "000000" - -- name: "status/available" - description: "No one has claimed responsibility for resolving this issue" - color: "c2e0c6" - -- name: "status/blocked" - description: "There is another issue or PR that needs to be resolved first" - color: "ee0701" - -- name: "status/in_progress" - description: "This issue or PR is being worked on, and has someone assigned" - color: "cccccc" - -- name: "status/on_hold" - description: "Similar to blocked, but is assigned to someone" - color: "e99695" - -- name: "status/proposal" - description: "A new propoal" - color: "d4c5f9" - -- name: "status/review_needed" - description: "The issue or PR needs to be reviewed" - color: "fbca04" - -## PRIORITY - -- name: "priority/critical" - description: "Highest priority. This should be dealt with ASAP" - color: "ee0701" - -- name: "priority/high" - description: "After critical issues are fixed, these should be dealt with before any further issues" - color: "d93f0b" - -- name: "priority/medium" - description: "This issue or PR may be useful, and needs some attention" - color: "fbca04" - -- name: "priority/low" - description: "This issue can probably be picked up by anyone looking to contribute to the project, as an entry fix" - color: "0e8a16" - -- name: "priority/backlog" - description: "Possibly useful, but not yet enough support to actually get it done" - color: "fbca04" - ## KRM - name: "krm/gcp-config-connector" @@ -279,3 +100,7 @@ labels: - name: "krm/azure-service-operator" description: "Azure Service Operator" color: "cc317c" + +- name: "krm/crossplane" + description: "Crossplane" + color: "cc317c" diff --git a/.github/workflows/project-pr-labeler.yml b/.github/workflows/project-pr-labeler.yml new file mode 100644 index 0000000..1535c06 --- /dev/null +++ b/.github/workflows/project-pr-labeler.yml @@ -0,0 +1,48 @@ +# Copyright (C) Nicolas Lamirault +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +# name: "Label PRs from globs" +# on: +# schedule: +# - cron: "0 * * * *" + +# jobs: +# execute: +# runs-on: ubuntu-latest +# steps: +# - uses: jpmcb/prow-github-actions@v1.1.1 +# with: +# jobs: 'pr-labeler' +# github-token: "${{ secrets.GITHUB_TOKEN }}" + +--- +name: Project / Pull Request Labeler + +on: # yamllint disable-line rule:truthy + pull_request: + types: [opened, reopened, edited] + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - name: Monitor Actions + uses: GitHubSecurityLab/actions-permissions/monitor@v1 + with: + config: ${{ vars.PERMISSIONS_CONFIG }} + - uses: actions/labeler@v5.0.0 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}"