Loading
Initial MR flow
Related to #622605.
What does this MR do?
Introduces a low-risk test flow that determines the required approval path for small, documentation-only merge requests. The flow only applies labels: it does not approve or merge merge requests.
To avoid noise, the flow runs only when its service account is explicitly:
- Mentioned in a comment.
- Assigned as a merge request reviewer.
The flow then:
- Extracts the target MR IID from the trigger context.
- Fetches the MR metadata and diff.
- Verifies eligibility using deterministic rules:
- The MR is open, not a draft, and has the
docs-onlylabel. - It does not have the
Community contributionlabel. - All changes are Markdown files under
doc/development/ordoc-locale/. - The diff contains 1–10 files, fewer than 10 changed lines, and less than 10 KB of diff text.
- The returned diff contains fewer than 20 files, and every file is measurable.
- Paths associated with sensitive legal, pricing, or release subjects are excluded.
- The MR is open, not a draft, and has the
- Sends eligible diffs to an agent that classifies their impact as
low,medium,high, orsevere. - Applies one of these label combinations:
gitlab-bot::auto-approveanddocs-impact::lowwhen the agent classifies the change aslow.gitlab-bot::manual-approveanddocs-impact::mediumwhen the agent classifies the change asmedium.gitlab-bot::manual-approveanddocs-impact::highwhen the agent classifies the change ashigh.gitlab-bot::manual-approveanddocs-impact::severewhen the agent classifies the change assevereor returns an invalid result.
- Removes labels previously applied by the flow when the MR becomes ineligible or processing fails.
- Leaves unrelated MR labels unchanged.
This MR also adds regression tests for the deterministic rules, a live end-to-end test harness, local workflow tooling, and usage documentation.
Edited by Paulo Martins