chore(ci): replace Dosu stale and size labeling with native workflows - #2504
Conversation
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>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request modernizes the repository's automation infrastructure by transitioning from the Dosu SaaS platform to native GitHub Actions. The changes establish new workflows for stale issue management and automated PR size labeling, while simultaneously standardizing the label naming convention to align with the repository's existing taxonomy. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRenames PR size labels from Changes
Sequence DiagramsequenceDiagram
participant GitHub as GitHub
participant Runner as Workflow Runner
participant API as GitHub API
GitHub->>Runner: PR opened/synchronized/reopened
Runner->>API: List PR files (paginated)
loop per page
API-->>Runner: File batch (path, additions, deletions)
end
Runner->>Runner: Filter ignored paths (vendored, generated, *.pb.go, charts, lockfiles, go.sum)
Runner->>Runner: Sum additions+deletions → totalLines
Runner->>Runner: Map totalLines → sizeBucket (XS/S/M/L/XL/XXL)
Runner->>API: Get PR labels
API-->>Runner: Current labels
Runner->>Runner: Determine labels to remove (legacy/current non-target)
alt target label not sole size label
Runner->>API: Remove non-target size labels
Runner->>API: Add `size/{bucket}` label
else
Runner->>Runner: No label change
end
Runner-->>GitHub: Label updated or unchanged
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~18 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Build job hit an OCI registry race on the ubuntu-container-disk:latest
manifest push ("Conflicted with another upload of the same manifest").
Empty commit to re-trigger.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/pr-size.yaml (1)
32-39: Optional: extend lockfile/ignore patterns for non-Go ecosystems.
path.endsWith('.lock')coversyarn.lock,Cargo.lock,Pipfile.lock,Gemfile.lock,poetry.lock, etc., and.lockbcovers Bun — but the two most commonly auto-generated lockfiles in JS tooling,package-lock.jsonandpnpm-lock.yaml, won't match and will count toward the size bucket. Low priority for a Go-dominated repo, but cheap to add now.♻️ Proposed extension
path === 'go.sum' || path.endsWith('/go.sum') || - path.endsWith('.lock') || path.endsWith('.lockb'); + path.endsWith('.lock') || path.endsWith('.lockb') || + path === 'package-lock.json' || path.endsWith('/package-lock.json') || + path === 'pnpm-lock.yaml' || path.endsWith('/pnpm-lock.yaml');🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pr-size.yaml around lines 32 - 39, The isIgnored predicate currently ignores generic .lock and .lockb files but misses common JS lockfiles; update the isIgnored function to also return true for 'package-lock.json', 'pnpm-lock.yaml' and 'yarn.lock' (and optionally 'npm-shrinkwrap.json') so these auto-generated lockfiles don't count toward PR size buckets—locate the isIgnored arrow function in the diff and add path-based checks (e.g., path === 'package-lock.json' or path.endsWith('pnpm-lock.yaml')) alongside the existing .lock/.lockb checks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/stale.yaml:
- Around line 32-37: The exempt-issue-labels list currently omits the
priority/important-longterm label so long-term important issues get auto-staled;
update the exempt-issue-labels value to include priority/important-longterm
alongside priority/critical-urgent and priority/important-soon (i.e., add
"priority/important-longterm" to the comma-separated list under
exempt-issue-labels) so those issues are protected from the stale workflow.
---
Nitpick comments:
In @.github/workflows/pr-size.yaml:
- Around line 32-39: The isIgnored predicate currently ignores generic .lock and
.lockb files but misses common JS lockfiles; update the isIgnored function to
also return true for 'package-lock.json', 'pnpm-lock.yaml' and 'yarn.lock' (and
optionally 'npm-shrinkwrap.json') so these auto-generated lockfiles don't count
toward PR size buckets—locate the isIgnored arrow function in the diff and add
path-based checks (e.g., path === 'package-lock.json' or
path.endsWith('pnpm-lock.yaml')) alongside the existing .lock/.lockb checks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d26fc0c8-e541-41df-9602-909c16aca492
📒 Files selected for processing (3)
.github/labels.yml.github/workflows/pr-size.yaml.github/workflows/stale.yaml
There was a problem hiding this comment.
Code Review
This pull request renames the PR size labels in .github/labels.yml from the size: prefix to size/ and updates the label descriptions to reference the new .github/workflows/pr-size.yaml workflow. Additionally, it adds aliases for the old label names to maintain backward compatibility. I have no feedback to provide.
Address review feedback from coderabbitai on .github/workflows/stale.yaml:37: add priority/important-longterm to exempt-issue-labels. The label is documented in labels.yml as "Important over the long term, but may not be staffed and/or may need multiple releases to complete" — such issues sit idle for 60+ days by design and must not be auto-staled. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
What this PR does
Replace Dosu's stale-management and PR-size labeling with native GitHub Actions ahead of disabling the Dosu app on this repo, and migrate the six
size:*labels to the canonicalsize/*namespace while we're rewriting the sizing path.Background: Dosu (the SaaS) currently writes
lifecycle/stalelifecycle andsize:*labels via its bot. Audit of.github/workflows/(full grep) confirmed zero hard dependencies on Dosu's outputs —backport*is human-applied,releaseis auto-applied bytags.yamlitself, and nothing else consumes Dosu-applied labels in any workflow..github/workflows/stale.yaml(new)Daily cron at 04:37 UTC plus manual dispatch. Uses
actions/stale@v10:lifecycle/stale.lifecycle/rotten.remove-stale-when-updated: true— activity un-stales automatically.Issue and 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(new)Triggers on
opened,synchronize,reopened(pull_request_target). Inlineactions/github-script@v7— no third-party labeler dependency. Diff-line count with thresholds matching the descriptions in.github/labels.yml:size/XSsize/Ssize/Msize/Lsize/XLsize/XXLInline ignore patterns skip:
vendor/**)zz_generated.{deepcopy,conversion,defaults,openapi}.go)generated/, plus*.pb.gopackages/system/*/charts/**)go.sum,*.lock,*.lockb)Concurrency group keyed on PR number with
cancel-in-progress: true(latest push wins).removeLabelis wrapped intry/catchtolerating 404 for races between event payload and execution.size:→size/namespace migrationThe legacy
size:X(colon) form was an artefact of the previous sizing bot; with that bot being replaced and every other label namespace in the repo using slashes (kind/,area/,priority/,triage/,lifecycle/,do-not-merge/,security/),size/is the consistent form. Migration via aliases inlabels.yml— IDs preserved, every existing labelled PR follows the rename automatically.The new
pr-size.yamlemitssize/*from day 1 and accepts both prefixes when looking up the previous size label, to handle the brief window between merge and the next labels-sync run.Out of scope (intentional)
lgtmreplacement — deferred. 33/33 oflgtmevents in the last 100 PRs come from Dosu; humans never apply it manually. Whether reviewers actually rely on it is unclear — observe for 7 days post-Dosu-disable before adding apull_request_review-on-approve workflow.kind/bug/kind/featureon inbound issues) — accepted loss; manual triage replaces.wontfix/invalidinlabels.yml— separate cleanup PR.Release note
Summary by CodeRabbit
New Features
Chores