feat: change the release and staging branching model by behnazh · Pull Request #900 · jenstroeger/python-package-template
Summary:
This pull request refactors the current branching model to improve development and address several challenges associated with using staging as the default base branch for pull requests. With this update, main will serve as the base branch for pull requests, containing active development changes, while releases will be triggered upon merging pull requests into the newly created release branch.
Requirement:
A new protected branch, named release, should be created if it doesn't already exist. This branch will be configured with security settings and essential checks to ensure the integrity and stability of the release process.
Reasons for the Change:
-
Security scanning tool compatibility: most security tools scan the default branch, which is
mainin this project. However, ifstagingis used as the base branch for pull requests andmainis reserved for releases, security reports would only apply after a release is made. This delay makes it harder to address security issues promptly. -
Development workflow efficiency: for changes like modifications to issue or pull request templates that need to be in effect immediately, using
mainas the default development branch allows those changes to take effect without waiting for a release. -
Contributor onboarding: it has been difficult to explain to new contributors that they should create a pull request against
staginginstead ofmain. By makingmainthe primary development branch, we aim to avoid this confusion in the future, ensuring a more intuitive workflow for new contributors. -
Simplify release workflows for multi-release projects: instead of going through multiple release branches in a waterfall manner, the new approach enables a streamlined release pipeline where
maincan be merged directly into all release branches. This makes hotfix releases faster and more efficient. -
Project activity visibility: if
maindoes not contain the latest development activities, the project may appear inactive or abandoned, even if work is happening instaging. This restructuring ensuresmainreflects ongoing work and activity, presenting the project as more active and up-to-date. -
Quick recognition for new contributors: contributors making their first submission often don't want to wait for a release to be listed as contributors in the project. By having
mainas the development branch, contributions are reflected immediately, providing quicker recognition for new contributors.