Let gitlab-bot approve dependency manifest changes
Related to: https://gitlab.com/gitlab-org/gitlab/-/work_items/622605
What does this MR do and why?
Makes @gitlab-bot a code owner of the dependency manifests, so that the MR approval flow's auto-approval of Renovate dependency bumps actually counts towards the code owner rules those merge requests match.
This mirrors what already exists for spec-only changes: @gitlab-bot owns /spec/, /ee/spec/, /spec/frontend/ and /ee/spec/frontend/ for exactly this reason, which is why the flow's gitlab-bot::category::specs verdict works today and gitlab-bot::category::deps does not.
Why it is needed
The MR approval flow classifies Renovate dependency bumps, applies gitlab-bot::auto-approve, and has gitlab-bot approve them. That approval lands only on the All Members any-approver rule, which requires zero approvals — it satisfies no code owner rule, because gitlab-bot is not an owner of any path a dependency bump touches.
Of the 14 merge requests carrying both gitlab-bot::category::deps and gitlab-bot::auto-approve opened in the five days to 2026-10-19, every one that matched a code owner rule had that rule satisfied by a human, never by the bot:
| Code owner rule | Owning group(s) | Merge requests |
|---|---|---|
package.json, yarn.lock |
@gitlab-org/maintainers/frontend |
!263193 (merged), !263138 (merged), !263125 (merged), !262832 (merged), !262530 (merged) |
/workhorse/ |
@gitlab-org/maintainers/gitlab-workhorse |
!263115 (merged), !262586 (merged) |
/qa/ |
@gitlab-org/maintainers/rails-backend, @gl-dx/maintainers |
!262437 (merged), !262260 (merged) |
Gemfile.lock, Gemfile.next.lock |
@gitlab-org/maintainers/rails-backend |
!262253 (closed), !262482 (closed) |
For example !263125 (merged) (a @sentry/browser patch bump) still reports approvals_left: 2 of 2 with gitlab-bot's approval already recorded.
How the grant is scoped
Two shapes, depending on what the existing rule covers.
package.json, yarn.lock and the four Gemfile* patterns already name the manifests exactly, so @gitlab-bot is appended to them.
/workhorse/ and /qa/ cover whole directories of code. Rather than let gitlab-bot approve any change under them, narrower entries cover only the manifests. The last matching pattern in a section wins, and no later pattern in [Maintainers] matches these paths, so these take effect without touching the parent rules:
/workhorse/go.mod @gitlab-org/maintainers/gitlab-workhorse @gitlab-bot
/workhorse/go.sum @gitlab-org/maintainers/gitlab-workhorse @gitlab-bot
/qa/Gemfile @gitlab-org/maintainers/rails-backend @gl-dx/maintainers @gitlab-bot
/qa/Gemfile.lock @gitlab-org/maintainers/rails-backend @gl-dx/maintainers @gitlab-botEvery other change under /workhorse/ and /qa/ still needs a maintainer from the owning group.
What gitlab-bot can and cannot approve
The grant is broader than the behaviour it enables. gitlab-bot only approves where the MR approval flow has applied the gitlab-bot::auto-approve verdict, which for dependency bumps requires maintenance::dependency, automation:bot-authored, and @gitlab-dependency-update-bot as author. A hand-opened merge request touching these files is out of scope and gets no bot approval.
Triage::VerifyBotApprovals is the backstop: any gitlab-bot approval in gitlab-org that the flow's labels do not explain is revoked automatically, with a warning posted on the merge request.
Reviewers
This needs sign-off from each owning group for its own paths:
@gitlab-org/maintainers/frontend—package.json,yarn.lock@gitlab-org/maintainers/gitlab-workhorse—/workhorse/go.mod,/workhorse/go.sum@gitlab-org/maintainers/rails-backend—Gemfile*,/qa/Gemfile*@gl-dx/maintainers—/qa/Gemfile*
One note for rails-backend: Gemfile and Gemfile.next are included alongside the lockfiles, although no merge request in the sample touched them — only the .lock files were changed. They are there because qa/Gemfile was touched, so Renovate does edit constraint files when a version range moves, and leaving them out would make the grant work only for some gem bumps. Happy to drop those two if you would rather keep it to the lockfiles.
MR acceptance checklist
- I have evaluated the MR acceptance checklist for this MR.