mirror of
https://github.com/leanprover-community/mathlib4.git
synced 2026-03-07 02:46:33 +00:00
Page:
Migration to PRs from forks
Pages
Alternate names for `List.concat` and `List.append`
Computation models for polynomials and finitely supported functions
Home
Lean 4 survival guide for Lean 3 users
Mathlib3 Synchronisation
Metaprogramming for dummies
Metaprogramming gotchas
Migration to PRs from forks
Monad map
Porting wiki
Project setup: following stable releases
Project setup: globally shared mathlib installation
Project setup: using local development version of a dependency
RFC Exp function
RFC: drop `Nat.AtLeastTwo`
Setting up linting and testing for your Lean project
Tradeoffs of concrete types defined as subobjects
Using mathlib4 as a dependency
Working with dependent PRs
No results
1
Migration to PRs from forks
Johan Commelin edited this page 2025-06-18 06:26:22 +02:00
Table of Contents
In June 2025, Mathlib switched its contribution model. Instead of requesting PRs to be made from branches on the main repository, Mathlib now follows the "standard" model on Github: PRs must be made from forked repositories. (For more information on working with PRs from forks, please see our Git Guide for Mathlib4 Contributors.)
For the open PRs that existed before this transition, there are two options:
- If maintainers do not request changes to the PR, then it can be merged in its current state (as PR from a branch on the main repository).
- If the PR needs changes, then it should be migrated to a PR from a fork. The script
scripts/migrate_to_fork.pycan assist with this process.
What the script does
The script handles existing PRs: If you have an open PR from the main repo, it can:
- Setup a personal fork of the main repo for you
- Create a new PR from your fork with the same title, description, and labels
- Collate comments from the original PR in a comment on the new PR (*)
- Close the old PR with a migration notice
- Preserves draft status: If your original PR was a draft, the new one will be too
(*): unfortunately preserving authorship is practically impossible
How to run the script
For each PR that you want to migrate:
- Checkout your PR branch
- Merge a recent version of
masterinto your PR branch, if the script is not available atscripts/migrate_to_fork.py - Run the interactive script, answer the questions
- Post to Zulip in #mathlib4 > Feedback on scripts/migrate_to_fork.py if you run into problems