Commit Graph
3 Commits
Author SHA1 Message Date
Aleksei Sviridkin bc6d147b85 chore(ci): replace Dosu stale and size labeling with native workflows
Add two GitHub-native workflows ahead of disabling the Dosu app and
migrate size labels to canonical k8s namespacing.

- .github/workflows/stale.yaml uses actions/stale@v10 to manage the
  lifecycle/stale and lifecycle/rotten lifecycle. Daily cron, 60d
  before stale, 14d before close. Issue/PR exempt lists differ on
  purpose: an accepted issue (triage/accepted) is a known long-tail
  task, not stale; a held PR (do-not-merge/hold) is paused
  intentionally. Priority/security/regression labels protect issues
  someone explicitly decided to keep visible.

- .github/workflows/pr-size.yaml uses actions/github-script@v7 to
  apply size/* labels based on diff line count. Thresholds match the
  descriptions in .github/labels.yml. Inline ignore patterns skip
  vendored deps, kubebuilder/openapi inline generated files
  (zz_generated.{deepcopy,conversion,defaults,openapi}.go), whole
  code-generated trees (any path under generated/ or *.pb.go),
  vendored Helm charts, and lockfiles. Concurrency group keyed on PR
  number with cancel-in-progress: true. removeLabel is wrapped in
  try/catch tolerating 404 for races between event payload and
  execution.

- Migrate the six size labels from legacy 'size:X' (colon) to
  canonical 'size/X' (slash) via aliases in .github/labels.yml. The
  colon form was an artefact of the previous sizing bot's output;
  with the bot replaced and namespacing already used everywhere else
  (kind/, area/, priority/, triage/, lifecycle/, do-not-merge/,
  security/), the slash form aligns with the rest of the scheme. The
  alias migration preserves IDs and keeps every existing labelled PR
  pointing at the renamed entry.

  pr-size.yaml emits the new 'size/' form from day 1 and accepts
  either prefix when looking up the previous size label, to handle
  the brief window between PR merge and the labels-sync run.

Verification of zero hard dependencies on Dosu in workflows: only
backport.yaml (consumes backport*, applied by humans only) and
pull-requests*.yaml + tags.yaml (consume release, applied by tags
workflow itself) — none of those labels come from Dosu.

The lgtm label (33/33 in last 100 PRs from Dosu, none from humans)
is intentionally not replaced in this PR — observe reviewer
behaviour for 7 days after Dosu is disabled and decide whether a
pull_request_review-on-approve workflow is needed.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-04-27 18:00:01 +03:00
Aleksei Sviridkin 91188702a6 chore(ci): normalize hex color case in labels.yml
Address review feedback from gemini-code-assist on .github/labels.yml:242:
all hex color values use lowercase characters for consistency.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-04-27 03:30:09 +03:00
Aleksei Sviridkin c8ed1c652c chore(ci): adopt CNCF/k8s label conventions
Add .github/labels.yml as the canonical label set, synced into the
repository by .github/workflows/labels.yaml using EndBug/label-sync.

Conventions follow the Kubernetes scheme:
https://github.com/kubernetes/test-infra/blob/master/label_sync/labels.md

Six namespaced groups: kind/, priority/, triage/, lifecycle/, area/,
do-not-merge/. Cozystack-specific labels preserved (epic, community,
security/*, size:*).

Migration via aliases keeps references on existing issues and PRs:
- bug           -> kind/bug
- enhancement   -> kind/feature
- documentation -> kind/documentation
- question      -> kind/support
- frozen        -> lifecycle/frozen
- stale         -> lifecycle/stale
- do-not-merge  -> do-not-merge/work-in-progress

delete-other-labels is false on the initial rollout; redundant labels
("do not merge", duplicate, invalid, wontfix) stay until a follow-up
PR removes them after stabilisation.

The labels workflow has a validate job (python3 schema check) that
runs on PR. Sync runs only on push to main, weekly cron, and manual
dispatch. Schema invariants:
- description <= 100 chars (GitHub REST API limit)
- color is 6-char hex without leading #
- unique top-level names
- aliases do not collide with top-level names

PR auto-labeling (.github/workflows/pr-labeler.yaml):
- Parses PR title as Conventional Commits header (type, scope, !).
- type -> kind/* (feat -> kind/feature, fix -> kind/bug, docs ->
  kind/documentation, chore/refactor -> kind/cleanup; style, perf,
  test, build, ci, revert -> no kind label).
- scope -> area/* via embedded mapping; composite scopes split on
  comma. Bracket-style fallback ([scope] description) maps area/*
  but cannot infer kind/*.
- '[Backport release-1.x]' prefix is stripped; area/release and
  backport labels are added.
- '!' after type or 'BREAKING CHANGE:' footer in body adds
  kind/breaking-change.
- Unmapped scope or non-conventional title adds area/uncategorized
  to flag for human review.
- Additive only — never removes existing labels.

Hardcoded label references updated:
- .github/ISSUE_TEMPLATE/bug_report.md (bug -> kind/bug)
- .github/workflows/tags.yaml (documentation -> kind/documentation)

AGENTS.md gains an Activation entry pointing agents to labels.yml
as the source of truth and to contributing.md for the title
auto-labeling table.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-04-27 03:15:09 +03:00