B1: mr-categorize step — HIGH / ACTIVE / SEEN enrichment#47
Merged
Conversation
WHAT: Add a `mr-categorize` step that buckets a user's authored (or
reviewer) merge requests into:
- HIGH — your MR with new activity from others (act on it)
- ACTIVE — needs attention / uncategorized
- SEEN — you reacted (eyes) or commented and nothing changed since
It lists MRs via `glab mr list {--author|--reviewer}={user} -R {project}`,
parses the `!IID\tPROJECT!IID\tTITLE` lines, then enriches each MR via three
`glab api` GETs — merge_requests detail, award_emoji, and notes — and
applies the rules. Params: `role` (author default | reviewer), `seen_emoji`
(default eyes). data_schema {high, active, seen} of
{project, iid, title, author, web_url, category, reason}; golden pinned.
All spawns go through ExecGate. Timestamps are parsed only to ORDER
activity (display math), never as a coordination primitive. All-auth-failed
soft-skips with the `glab auth login` hint, matching the other forge steps.
WHY: closes a gila-morning parity gap — the plain `gitlab-mr-*` steps pass
glab text through; this turns the review queue into an actionable triage.
Disclosure tier: step. Registered + documented + data-contract + golden.
FIXTURE-SYNC: the glab-api JSON shapes mirror the GitLab REST API; the glab
presence/auth belief is exercised by tests/live_contract.rs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First of the two morning-parity-gap PRs (Part B; independent of the board stack). Adds a
mr-categorizestep that turns a flat MR list into an actionable triage.Buckets the user's authored (or reviewer) MRs:
Lists via
glab mr list {--author|--reviewer}={user} -R {project}, parses the!IID⇥PROJECT!IID⇥TITLElines, enriches each MR via threeglab apiGETs (merge_requests detail,award_emoji,notes?sort=desc&per_page=20), and applies the rules. Params:role(authordefault |reviewer),seen_emoji(defaulteyes).data_schema{high, active, seen}of{project, iid, title, author, web_url, category, reason}— golden pinned.ExecGate. Timestamps parsed only to order activity (display math), never coordination.glab auth loginhint (parity with the other forge steps).Disclosure tier: step.
Test plan
just checkgreen (fmt + clippy -D warnings + all tests incl. golden + data-contract; EXIT=0).parse_mr_lines_extracts_project_iid_title,categorize_high_active_seen_rules(all three rules),mr_categorize_buckets_high_end_to_end(mock list → detail → emoji → notes, asserts endpoints),mr_categorize_all_auth_failures_soft_skip.🤖 Generated with Claude Code