ManualStart here
How GitHub pull requests fit in
How a GitHub pull request relates to a Berrit change, and why you might see a second pull request when it’s time to land.
With the Berrit GitHub App, your code stays on GitHub and your teammates can keep reviewing pull requests there. Berrit gives the work its own change number and keeps track of the review and the branch it should land on.
Start from either tool
Section titled “Start from either tool”- Already have a GitHub pull request open? In Berrit, choose Changes → New change. Pick the pull request, check the target branch and choose One change → Create. That gives you one Berrit review for all the edits on your branch. Keep pushing to the same branch and the change will update. The picker only lists branches in the connected repository, so pull requests from forks won’t appear there.
- If you send a change to Berrit first, Berrit opens a pull request for it by default. We call this a mirror because it shows the revision that’s up for review in Berrit. The pull request description links back to the change. When you send a new revision, Berrit updates the mirror.
Count a review written on GitHub
Section titled “Count a review written on GitHub”How does Berrit know it was you who approved a pull request? Open Account in Berrit and connect the GitHub account you review with. With the default [github] setting reviews_as_votes = true, your approval on the current revision can count in Berrit if you’re an eligible organisation member. Requesting changes on GitHub can block landing too. The Reviewers panel shows you whose approval counts.
You can keep pull requests around for discussion and take approval votes in Berrit. In that case leave mirror_prs = true and set reviews_as_votes = false under [github] in the target branch’s berrit.toml. If you do count GitHub votes, check whether GitHub dismisses approvals after every new commit. Those dismissals carry over to Berrit, even when your Berrit policy keeps approvals after edits.
Recognise the train’s test pull request
Section titled “Recognise the train’s test pull request”You might also see a pull request titled Train: #…. Berrit opens this temporary pull request when it needs a GitHub job to test the candidate, the reviewed code combined with what’s ahead of it on the way to the target branch. If Berrit starts all the GitHub App’s train workflows itself, it uses a test branch without opening a test pull request.
When you’re ready to land, open the change in Berrit and ask to land there. Berrit advances the target branch when the train passes and takes care of the pull requests. GitHub’s Merge button would bypass that process. If you want to keep people from merging a tracked pull request on GitHub, require the App’s berrit status check in the target branch’s ruleset and allow the App to bypass it for its own writes. This check stays in progress while the change is open and succeeds once it lands. How the merge train works