HN
Today

Maiao: Gerrit-style code review workflow for GitHub, GitLab, Gitea, others

Maiao is a command-line utility that brings the Gerrit-style 'stacked pull request' workflow to various Git hosting platforms, including GitHub and GitLab. It automates the creation and management of dependent PRs, allowing developers to break down large features into smaller, independently reviewable commits. This tool is gaining traction as a solution for achieving cleaner commit histories and more granular code reviews in modern development environments.

16
Score
0
Comments
#6
Highest Rank
6h
on Front Page
First Seen
Aug 26, 12:00 AM
Last Seen
Aug 26, 5:00 AM
Rank Over Time
689769

The Lowdown

Maiao is a community-forked command-line tool designed to significantly enhance the code review process by implementing a 'stacked pull requests' workflow, similar to Gerrit. It provides a git review command that automates the creation and management of chained pull requests across multiple Git hosting providers.

  • Automated PR/MR Creation: Maiao generates a separate pull request or merge request for each commit within a branch, automatically stacking them with correct parent-child dependencies.
  • Multi-Platform Compatibility: It supports a wide range of platforms including GitHub, GitLab, Gitea, Forgejo, Bitbucket Cloud, and Cursor Origin, with auto-detection based on the remote URL.
  • Native Stack Integration: The tool intelligently leverages native stacked PR features on platforms like GitHub (via its Stacks API) and GitLab's auto-detected stacks when available, treating them as progressive enhancements.
  • Workflow Simplification: It streamlines common Git operations by managing fixups using git commit --fixup, tracking commits via Change-IDs, and automatically rebasing the stack when upstream PRs are merged.
  • Key Benefits: Developers gain granular review opportunities for each change, maintain a clean and logical git history, and benefit from automated dependency management, reducing manual overhead in complex development workflows.

By offering an intuitive and automated approach to stacked diffs, Maiao empowers teams to adopt more efficient code review practices, fostering better collaboration and higher code quality through smaller, focused changes.