Skip to content

Commit

Permalink
Declaratively define (and sync) labels
Browse files Browse the repository at this point in the history
This adds a GitHub Action workflow to sync the labels from a YAML file
in `.github/labels.yaml`.

Some of the labels have been changed for consistency, and an `aliases`
list has been defined to ensure they're renamed properly.

In terms of colors, I am still trying to figure out what looks best.
But this should be a good start to at least kick things off.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
  • Loading branch information
hiddeco committed Jun 30, 2023
1 parent c32e96a commit 6e95996
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
labels: ["area/build"]
labels: ["area/ci"]
schedule:
# by default this will be on a monday.
# By default, this will be on a monday.
interval: "weekly"
78 changes: 78 additions & 0 deletions .github/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Configuration file to declaratively configure labels
# Ref: https://github.com/EndBug/label-sync#Config-files

- name: area/bucket
description: Bucket related issues and PRs
color: '#169b4e'
- name: area/ci
description: Internal CI related issues and pull requests
color: '#fccb4c'
aliases: ['area/build']
- name: area/docs
description: Documentation related issues and PRs
color: '#007bc7'
- name: area/git
description: Git related issues and PRs
color: '#8762c7'
- name: area/helm
description: Helm related issues and PRs
color: '#3c1f81'
- name: area/oci
description: OCI related issues and PRs
color: '#d621a5'
- name: area/security
description: Security related issues and PRs
color: '#e64c15'
- name: area/storage
description: Storage related issues and PRs
color: '#707070'
- name: area/testing
description: (Unit) testing related issues and PRs
color: '#e8c612'
- name: backport:release/v1.0.x
description: To be backported to release/v1.0.x
color: '#ffa600'
- name: blocked/needs-validation
description: Requires wider review and validation
color: '#ffc985'
aliases: ['blocked-needs-validation']
- name: blocked/upstream
description: Blocked by an upstream dependency or issue
color: '#a86fbb'
aliases: ['blocked-upstream']
- name: bug
description: Something isn't working
color: '#e63946'
- name: dependencies
description: Pull requests that update a dependency file
color: '#186faf'
- name: duplicate
description: This issue or pull request already exists
color: '#c4c8cc'
- name: enhancement
description: New feature or request
color: '#68c6e8'
- name: experimental
description: Issues and PRs related to experimental features
color: '#e5437b'
- name: good first issue
description: Good for newcomers
color: '#6074ff'
- name: help wanted
description: Extra attention is needed
color: '#00a87b'
- name: hold
description: Issues and pull requests put on hold
color: '#e64c15'
- name: invalid
description: This doesn't seem right
color: '#ffffff'
- name: question
description: Further information is requested
color: '#e175e5'
- name: umbrella-issue
description: Umbrella issue for tracking progress of a larger effort
color: '#b162a9'
- name: wontfix
description: This will not be worked on
color: '#c4c8cc'
26 changes: 26 additions & 0 deletions .github/workflows/sync-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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: .github/labels.yaml
# Strictly declarative
delete-other-labels: true

0 comments on commit 6e95996

Please sign in to comment.