From 3ba54e15909d1acbb979e1e848ed1126b9340b68 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Fri, 30 Jun 2023 16:57:02 +0300 Subject: [PATCH] Declaratively define (and sync) labels Signed-off-by: Stefan Prodan --- .github/dependabot.yml | 4 +-- .github/labels.yaml | 49 ++++++++++++++++++++++++++++++ .github/workflows/sync-labels.yaml | 28 +++++++++++++++++ 3 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 .github/labels.yaml create mode 100644 .github/workflows/sync-labels.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6e4be73944..9e16176ac3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,7 +3,7 @@ version: 2 updates: - package-ecosystem: "github-actions" directory: "/" - labels: ["area/build"] + labels: ["area/ci", "dependencies"] schedule: - # by default this will be on a monday. + # By default, this will be on a monday. interval: "weekly" diff --git a/.github/labels.yaml b/.github/labels.yaml new file mode 100644 index 0000000000..6b61a9b851 --- /dev/null +++ b/.github/labels.yaml @@ -0,0 +1,49 @@ +# Configuration file to declaratively configure labels +# Ref: https://github.com/EndBug/label-sync#Config-files + +- name: area/bootstrap + description: Bootstrap related issues and pull requests + color: '#86efc9' +- name: area/install + description: Install and uninstall related issues and pull requests + color: '#86efc9' +- name: area/diff + description: Diff related issues and pull requests + color: '#BA4192' +- name: area/bucket + description: Bucket related issues and pull requests + color: '#00b140' +- name: area/git + description: Git related issues and pull requests + color: '#863faf' +- name: area/oci + description: OCI related issues and pull requests + color: '#c739ff' +- name: area/kustomization + description: Kustomization related issues and pull requests + color: '#00e54d' +- name: area/helm + description: Helm related issues and pull requests + color: '#1673b6' +- name: area/image-automation + description: Automated image updates related issues and pull requests + color: '#c5def5' +- name: area/monitoring + description: Monitoring related issues and pull requests + color: '#dd75ae' +- name: area/multi-tenancy + description: Multi-tenancy related issues and pull requests + color: '#72CDBD' +- name: area/notification + description: Notification API related issues and pull requests + color: '#434ec1' +- name: area/source + description: Source API related issues and pull requests + color: '#863faf' +- name: area/rfc + description: Feature request proposals in the RFC format + color: '#D621C3' + aliases: ['area/RFC'] +- name: backport:release/v1.0.x + description: To be backported to release/v1.0.x + color: '#ffd700' diff --git a/.github/workflows/sync-labels.yaml b/.github/workflows/sync-labels.yaml new file mode 100644 index 0000000000..f0688a426c --- /dev/null +++ b/.github/workflows/sync-labels.yaml @@ -0,0 +1,28 @@ +name: sync-labels +on: + workflow_dispatch: + push: + branches: + - main + paths: + - .github/labels.yaml + +permissions: + contents: read + +jobs: + labels: + name: Run sync + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: EndBug/label-sync@da00f2c11fdb78e4fae44adac2fdd713778ea3e8 # v2.3.2 + with: + # Configuration file + config-file: | + https://raw.githubusercontent.com/fluxcd/community/main/.github/standard-labels.yaml + .github/labels.yaml + # Strictly declarative + delete-other-labels: true