Skip to content

Commit

Permalink
build(labeler): add
Browse files Browse the repository at this point in the history
  • Loading branch information
JacekZubielik committed Aug 11, 2024
1 parent be1c9c4 commit 68cd20e
Show file tree
Hide file tree
Showing 6 changed files with 266 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
area/github:
- changed-files:
- any-glob-to-any-file: ".github/**/*"
area/bootstrap:
- changed-files:
- any-glob-to-any-file: "bootstrap/**/*"
area/project:
- changed-files:
- any-glob-to-any-file: "project/*"
chart/apps/iot:
- changed-files:
- any-glob-to-any-file: "charts/binance-proxy/**/*"
chart/apps/monitoring:
- changed-files:
- any-glob-to-any-file: "charts/esphome/**/*"
chart/apps/storage:
- changed-files:
- any-glob-to-any-file: "charts/external-dns/**/*"
chart/apps/system:
- changed-files:
- any-glob-to-any-file: "charts/home-assistant/**/*"
chart/apps/user:
- changed-files:
- any-glob-to-any-file: "charts/lms/**/*"
chart/apps/trade:
- changed-files:
- any-glob-to-any-file: "charts/mktxp-exporter/**/*"
chart/apps/user:
- changed-files:
- any-glob-to-any-file: "charts/mosquitto/**/*"
chart/apps/user:
- changed-files:
- any-glob-to-any-file: "charts/syncthing/**/*"
chart/apps/user:
- changed-files:
- any-glob-to-any-file: "charts/uptime-kuma/**/*"
chart/apps/user:
- changed-files:
- any-glob-to-any-file: "charts/zigbee2mqtt/**/*"
138 changes: 138 additions & 0 deletions .github/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
---
# Area
- name: area/github
color: "72ccf3"
description: >-
Changes made in the github directory
- name: area/bootstrap
color: "ee0000"
description: >-
Changes made in the bootstrap directory
- name: area/project
color: "72ccf3"
description: >-
Changes made in the project directory
- name: area/apps/iot
color: "009900"
description: >-
Changes made in the apps directory
- name: area/apps/monitoring
color: "ee5500"
description: >-
Changes made in the dev directory
- name: area/apps/storage
color: "72ccf3"
description: >-
Changes made in the storage directory
- name: area/apps/system
color: "ee0000"
description: >-
Changes made in the system directory
- name: area/apps/trade
color: "84b6eb"
description: >-
Changes made in the monitoring directory
- name: area/apps/user
color: "72ccf3"
description: >-
Changes made in the monitoring directory
# # Renovate
# - name: renovate/container
# color: "ffc300"
# - name: renovate/github-action
# color: "ffc300"
# - name: renovate/github-release
# color: "ffc300"
# - name: renovate/helm
# color: "ffc300"
# Semantic Type
- name: dep/patch
color: "FFEC19"
- name: dep/minor
color: "FF9800"
- name: dep/major
color: "F6412D"
# Size
- name: size/XS
color: "009900"
description: >-
Denotes a PR that changes 0-9 lines, ignoring generated files.
- name: size/S
color: "77bb00"
description: >-
Denotes a PR that changes 10-29 lines, ignoring generated files.
- name: size/M
color: "eebb00"
description: >-
Denotes a PR that changes 30-99 lines, ignoring generated files.
- name: size/L
color: "ee9900"
description: >-
Denotes a PR that changes 100-499 lines, ignoring generated files.
- name: size/XL
color: "ee5500"
description: >-
Denotes a PR that changes 500-999 lines, ignoring generated files.
- name: size/XXL
color: "ee0000"
description: >-
Denotes a PR that changes 1000+ lines, ignoring generated files.
# Uncategorized
- name: do-not-merge
color: "ee0701"
- name: docs
color: "F4D1B7"
- name: enhancement
color: "84b6eb"
- name: link-checker
color: "7B55D7"
- name: question
color: "cc317c"
# Issue categories
- name: documentation
color: "0075ca"
- name: bug
color: "B60205"
- name: enhancement
color: "a2eeef"
- name: "help wanted"
color: "008672"
- name: wontfix
color: "ffffff"
- name: "support"
color: ffffff
- name: "incomplete-template"
color: ffffff
# CI Status
- name: "precommit:ok"
color: "0E8A16"
description: >-
CI status: pre-commit validation successful
- name: "precommit:failed"
color: "D93F0B"
description: >-
CI status: pre-commit validation failed
- name: "changelog:ok"
color: "0E8A16"
description: >-
CI status: changelog validation successful
- name: "changelog:failed"
color: "D93F0B"
description: >-
CI status: changelog validation failed
- name: "lint:ok"
color: "0E8A16"
description: >-
CI status: linting successful
- name: "lint:failed"
color: "D93F0B"
description: >-
CI status: linting failed
- name: "install:ok"
color: "0E8A16"
description: >-
CI status: install successful
- name: "install:failed"
color: "D93F0B"
description: >-
CI status: install failed
17 changes: 17 additions & 0 deletions .github/workflows/meta-enforce-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Meta - Enforce PR labels

on:
pull_request:
types: [labeled, unlabeled, opened, edited, synchronize]

jobs:
enforce-label:
name: Enforce PR labels
runs-on: [ubuntu-latest]
steps:
- uses: yogevbd/enforce-label-action@a3c219da6b8fa73f6ba62b68ff09c469b3a1c024 # 2.2.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
BANNED_LABELS: "do-not-merge"
27 changes: 27 additions & 0 deletions .github/workflows/meta-label-size.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "Meta: Label Size"

on:
pull_request:
branches:
- main

jobs:
label-size:
name: Label Size
runs-on: [ubuntu-latest]
steps:
- name: Label Size
uses: pascalgn/size-label-action@bbbaa0d5ccce8e2e76254560df5c64b82dac2e12 # v0.5.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
sizes: >
{
"0": "XS",
"20": "S",
"50": "M",
"200": "L",
"800": "XL",
"2000": "XXL"
}
18 changes: 18 additions & 0 deletions .github/workflows/meta-labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: "Meta: Labeler"

on:
pull_request:
branches:
- main

jobs:
labeler:
name: Labeler
runs-on: [ubuntu-latest]
steps:
- name: Labeler
uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5
with:
configuration-path: .github/labeler.yaml
repo-token: ${{ secrets.GITHUB_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/meta-sync-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: "Meta: Sync labels"

on:
workflow_dispatch:
push:
branches:
- main
paths:
- ".github/labels.yaml"

jobs:
labels:
name: Sync Labels
runs-on: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- name: Sync Labels
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2
with:
config-file: .github/labels.yaml
token: ${{ secrets.GITHUB_TOKEN }}
delete-other-labels: true

0 comments on commit 68cd20e

Please sign in to comment.