Control the code review policy for Git repositories
With versions of the TeamForge–Git integration 6.2 and later, you can control all
Gerrit Code Review features directly from TeamForge by specifying a code review policy as
part of the TeamForge Git repository's description field.
By default, the following code review policy options
are provided:
Default (no code review): All Gerrit review features are turned off and
read/write access is enforced.
Mandatory review: All code changes must be reviewed and read/write access is
enforced.
Optional review: The review feature is turned on but can be bypassed if
necessary; read/write access is enforced.
Custom: Access rights must be set manually in the Gerrit web interface; they
will not be overridden by TeamForge. This specification is intended for advanced
users who are familiar with Gerrit access rights and want to turn off “auto
pilot”.
User-defined review: You can add your own categories, if you have access to the
TeamForgeGerritMappings.xml file. For more information
on adding a user-defined repository category, see Create a User-defined Repository
Category.
If you have access to the TeamForgeGerritMappings.xml file,
you can add your own categories.
The following
animation illustrates the detailed mapping between SCM permissions, repository policies,
and Gerrit access rights.
Mandatory code reviews for Git repositories
When a mandatory review is specified, every change pushed to the repository must pass through a review process before it can get committed (merged) to the repository.
Optional code review for Git repositories
When an optional review is specified, every change submitted to the repository can be pushed for code review or directly pushed to the repository bypassing review. This depends on the TeamForge user having the appropriate permissions — source code Delete/View or Commit/View permission for the former, or Source Code Admin permission for the latter.
Default code review for Git repositories
In TeamForge 8.0, the default code review policy — no code review required — is selected unless you choose some other policy.
Custom code review for Git repositories
When a custom code review is specified, users with the TeamForge Source Code Admin permission can directly fine tune permissions (access rights) in gerrit’s web interface. Those changes will not be overridden by TeamForge.
Pull request reviews for Git repositories
Pull requests allow developers to collaborate with each other on a code change before merging it into another branch on a Git repository.Using a pull request, you notify others about a feature or fix change that needs attention.