mirror of
https://github.com/suitenumerique/docs.git
synced 2026-10-14 12:15:27 +02:00
Contributors often have to rebase their branch on main by hand, even when nothing conflicts. Add a "Rebase" checkbox to the pull request template: ticking it triggers a workflow that rebases the branch on its base branch through the update-branch API. The workflow unticks the box first so the edit cannot trigger it again, then comments the outcome. When the branch conflicts with its base, it says the rebase is not possible and has to be done manually. It uses pull_request_target so it works on pull requests from forks, which is safe because the pull request code is never checked out or run.