Decide whether you want code review for your project's Git repository to be mandatory
or optional and then follow this general process.
This feature is available with version 7.0.0 (and later) of the TeamForge
Git integration.
-
To enforce code reviews, do the following:
-
As the project administrator, select the TeamForge Git repository for which you
want to enforce code review.
-
For Repository Category, select the Mandatory review option and save it.
-
Set up the following roles:
- Create a "developer" role. This user can access source code in read only mode
and send code for review. This role has View only
permissions for the Git repository.
- Create a "reviewer" role. This user can access source code, review code, approve
or reject changes, and decide whether to submit a change to the central Git
repository in TeamForge. This role has project-level
Delete/View and Commit/View source
code permissions.
With these changes in place, a user with the "developer" role can check out
code, change code and send it for review. A user with the "reviewer" role can review a
change and ultimately decide whether to submit the change to the central Git repository.
-
To keep code reviews optional, do the following:
-
As the project administrator, select the TeamForge Git repository for which you
want to set up the code review policy.
-
For Repository Category, select the Optional review option and save it.
-
Set up the following roles:
- Create a "developer" role. This user can access source code in read only mode
and send code for review. This role has View/Commit
permissions for the Git repository.
- Create a "reviewer" role. This user can access source code, review code, approve
or reject changes, and decide whether to submit a change to the central Git
repository in TeamForge. This role has project-level
Delete/View and Commit/View source
code permissions.
With these changes in place, a user with the "developer" role can check out
code, change code and (optionally) send it for review. A user with the "reviewer" role can
review a change and ultimately decide whether to submit the change to the central Git
repository. Alternatively, since the review process is optional, the "developer" user can
push changes to the central Git repository.