feat: auto-assign reviewer based on squad × domain matrix#6
Merged
Conversation
…trix Adds a reusable workflow that auto-requests a reviewer when a PR is opened in lisk-backend, lisk-web, lisk-infra, lisk-mobile, or lisk-contracts. The reviewer is resolved via a squad × domain matrix in review-map.yml using a 3-step cascade: 1. own-squad domain specialists (round-robin via PR# % N) 2. squad-wide fallback for designated domains (e.g. infra) 3. sibling-squad cascade The workflow is best-effort: any resolution failure soft-fails with a PR comment, never blocks merges. Idempotency check skips re-requests on the same reviewer. pull_request_target supports forks since the workflow only calls the GitHub API. Adds: - review-map.yml — single source of truth for routing - .github/workflows/auto-assign-reviewer.yml — reusable workflow - .github/workflows/validate-review-map.yml — CI lint that verifies structure and that every login is a LiskHQ org member - examples/workflows/auto-assign-reviewer-caller.yml — caller stub - docs/auto-reviewer.md — cascade and operating notes
The default GITHUB_TOKEN cannot see private org membership via
/orgs/{org}/members/{user} — that endpoint requires a PAT with
read:org scope. Real LiskHQ members were being flagged as errors.
Switch to /users/{login} which is public. This still catches typos
(the main goal of the lint). Org-membership enforcement isn't
strictly necessary: if a non-collaborator is listed, the auto-assign
workflow soft-fails with a PR comment at reviewer-request time.
When an org engineer opens a mobile PR, route to org's web specialists instead of cascading to money. Same in reverse for money → web. Web and mobile are interchangeable review skills within a squad. Cascade now has a Step 2 that walks domain_equivalence[D] and tries own-squad specialists for each equivalent domain before falling back to the sibling cascade. Equivalence is intra-squad only; cross-squad cascade still uses the actual domain. Examples (verified): ikem-legend (org) + mobile → org.web specialists (mvuco00 / mislavtomic / mmarinovic) oskarleonard (money)+ web → money.mobile specialists (Balanced02 / eniolam1000752 / 5heri) matjazv (org) + mobile → org.web rotation Nazgolze (platform) + web → still cascades to org (platform has no web or mobile) Validates that domain_equivalence keys/values are real domains.
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
lisk-backend,lisk-web,lisk-infra,lisk-mobile,lisk-contractsreview-map.yml(squad × domain matrix); single source of truth, edited via PRPR# % Nvalidate-review-map.yml) verifies structure and that every login is a LiskHQ org memberFiles
review-map.yml— routing data.github/workflows/auto-assign-reviewer.yml— reusable workflow.github/workflows/validate-review-map.yml— map lint CIexamples/workflows/auto-assign-reviewer-caller.yml— caller stub for product reposdocs/auto-reviewer.md— cascade & operating notesREADME.md— added row for new workflowResolved walkthrough (verified locally)
Rollout
examples/.enabled_repos: [lisk-backend]. Watch a few PRs.enabled_reposonce stable.Kill switches
enabled: falseinreview-map.ymlenabled_reposbot_authorsTest plan
lisk-backendafter caller stub is added therevalidate-review-map.ymlflags a typo'd login when introduced via PRpull_request_targetworks on a fork PR (e.g., bmijac on lisk-web — should be skipped viabot_authors)Out of scope (v1)