Skip to content

Commit

Permalink
Fix: Github settings
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
  • Loading branch information
nlamirault committed Dec 8, 2023
1 parent a3b82c5 commit 538c0ee
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 191 deletions.
59 changes: 59 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright (C) Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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

# Labels for action/labeler

######################################
# Label area/xxx

area/cel:
- changed-files:
- any-glob-to-any-file: cel/**

area/kubewarden:
- changed-files:
- any-glob-to-any-file: kubewarden/**

area/kyverno:
- changed-files:
- any-glob-to-any-file: kyverno/**

area/opa:
- changed-files:
- any-glob-to-any-file: opa/**

area/github:
- changed-files:
- any-glob-to-any-file: .github/**

######################################
# Label krm/xxx

krm/gcp-config-connector:
- changed-files:
- any-glob-to-any-file: krm/kcc/**

krm/aws-controllers-k8s:
- changed-files:
- any-glob-to-any-file: krm/ack/**

krm/azure-service-operator:
- changed-files:
- any-glob-to-any-file: krm/aso/**

krm/crossplane:
- changed-files:
- any-glob-to-any-file: krm/crossplane/**
193 changes: 2 additions & 191 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,60 +80,10 @@ 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"
color: "cc317c"

- name: "area/github"
description: "Github"
- name: "area/cel"
description: "CEL"
color: "cc317c"

- name: "area/opa"
Expand All @@ -147,142 +97,3 @@ labels:
- name: "area/kubewarden"
description: "Kubewarden"
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/opa"
description: "Dependency Open Policy Agent"
color: "6fcb70"

- name: "dependency/kyverno"
description: "Dependency Kyverno"
color: "6fcb70"

- name: "dependency/kubewarden"
description: "Dependency Kubewarden"
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"
48 changes: 48 additions & 0 deletions .github/workflows/project-pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright (C) Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# 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 }}"

0 comments on commit 538c0ee

Please sign in to comment.