Currently, there are two primary tracking branches in the ngafid2.0 repository: stable
and main
.
stable
is, unsurprisingly, the stable version of the website that is in production. main
is the in-development
branch and may contain bugs, as well as incomplete or broken functionality.
The stable
branch is reserved for more mature changes and critical bug fixes.
Feature branches should generally be based off of main
. Once merged and tested enough to be considered mature, the
changes can be pulled into stable (this should be done by merging with main up until a certain commit).
Some bugs may exist in both stable
and main
-- your patch may be applicable to both branches with a simple rebase,
but if not you may need to implement the fix twice.
The workflow is relatively simple:
- Pick the parent branch your branch will be based upon, either
main
orstable
. - Create a new branch in the following format:
<parent-branch>/<your-name>/<feature-identifier>
. So for example, if I (Josh) wanted to add acool-feature
to themain
branch I would create a branched namedmain/josh/cool-feature
and base it onmain
. - Implement and test your changes. Ensure your code is (1) linted and (2) formatted (see below).
- Create a pull request. After review your changes will be merged.
- At some point in time these changes will be considered "mature", at which point they may be merged into
stable
and eventually deployed. Deployment on the main server should generally require no additional steps outside of recompilation of the java source and react modules, or creation of new tables via liquibase.
A tool called spotbug works with maven to automatically identify and enumerate code that contains problems of various kinds. You can run it with:
mvn spotbugs:check
These concerns should be properly addressed before requesting a review
Our codebase will (eventually) be automatically formatted using a tool called spotless
.
mvn spotless:check # To search for formatting issues
mvn spotless:apply # To automatically search for and fix formatting issues.