From 2a9f83ccb294c8b2427aeb734fa51a63baa81cca Mon Sep 17 00:00:00 2001 From: bbedward Date: Thu, 29 Oct 2026 10:13:42 -0400 Subject: [PATCH] ci: fix pr labeling --- .github/workflows/pr-labels.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 4d7c82a93..d565f6682 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -8,6 +8,7 @@ on: permissions: contents: read + issues: write pull-requests: write concurrency: @@ -46,7 +47,9 @@ jobs: const paths = files.map(f => f.filename); const pathRules = [ ["packaging", p => p.startsWith("distro/") || p === "flake.nix" || p === "flake.lock"], - ["i18n", p => p.startsWith("quickshell/translations/")], + ["i18n", p => p.startsWith("quickshell/translations/poexports/")], + ["core", p => p.startsWith("core/")], + ["ui", p => p.startsWith("quickshell/") && !p.startsWith("quickshell/translations/")], ]; for (const [label, matches] of pathRules) { if (paths.some(matches)) labels.add(label); @@ -56,6 +59,20 @@ jobs: const missing = [...labels].filter(l => !existing.has(l)); if (missing.length === 0) return core.info("nothing to add"); + const areaLabels = { + core: ["Go daemon and CLI under core/", "1d76db"], + ui: ["Quickshell UI under quickshell/", "c5def5"], + }; + for (const name of missing.filter(l => l in areaLabels)) { + const [description, color] = areaLabels[name]; + try { + await github.rest.issues.getLabel({ ...context.repo, name }); + } catch (error) { + if (error.status !== 404) throw error; + await github.rest.issues.createLabel({ ...context.repo, name, description, color }); + } + } + await github.rest.issues.addLabels({ ...context.repo, issue_number: pr.number,