build: change the release and staging branching model #1042
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This pull request refactors the current branching model to improve development and address several challenges associated with using
stagingas the default base branch for pull requests. With this update,mainwill serve as the base branch for pull requests, containing active development changes, while releases will be triggered upon merging pull requests into the newly createdreleasebranch.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.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.