TeamForge Git integration: Gerrit Code Review policies FAQ TeamForge Git integration: Gerrit Code Review policies FAQ
Questions on using Gerrit Code Review for Git repositories in TeamForge.
- What is Gerrit Code Review? What does it have to do with the TeamForge Git integration?
- Gerrit Code Review is an open source project for code review and verification for the Git version control system. It also has capabilities for administering Git repositories and controlling access to source code. The TeamForge Git integration provides TeamForge's role-based access control feature to Gerrit and thus to Git repositories hosted by TeamForge.
- Is possible to use Gerrit Code Review when my TeamForge project has Git repositories?
- Yes, you can turn on the Gerrit Code Review feature for Git repositories in your TeamForge project. By default, this feature is switched off when you create a Git repository. You can turn it on or off for individual repositories from your TeamForge project configuration.
- In what ways can I use the code review process in my TeamForge project's Git repository?
- There are several possibilities. You can -
- Choose to not the use code review feature
- Enforce code review for every commit made to a TeamForge Git repository and control the review process (such as who can review, who can vote for a code review and so on) from TeamForge
- Use code review but have the possibility to bypass it, and also control the review process from TeamForge
- Control the review process entirely from Gerrit (not TeamForge)
- Can I enforce code review for a TeamForge Git repository but handle the review control process in Gerrit?
- Yes. You can enforce code review and have the have review process control defined in Gerrit witoput using TeamForge's role-based acces contriol for source code. In the TeamForge Git repository's description field, include the string [RepoCategory:custom]. When you do that, TeamForge source code permissions for that project will no longer apply. You can define your own internal group in Gerrit and give it appropriate permissions for the Gerrit project corresponding to the Git repository in TeamForge. For more information, see Manage Gerrit access rights outside TeamForge.
- Can I enable Gerrit code review for individual Git repositories in TeamForge?
- Yes. By default, Gerrit code review is disabled when you create a new Git repository in your TeamForge project. To enable code review, you modify the description field of the repository suitably.
- I just changed the repository description to impose a code review policy for my Git repository. Why is the Review button not enabled when I click on a review request in the Gerrit web interface?
- If you changed the repository description as a user with the Source Code Admin permission, the change will not get reflected in Gerrit immediately. In case you want this change in effect almost immediately, soon after you change the repository description, the TeamForge project administrator needs to remove any user Source Code Admin permission temporarily, and add then that user back. This action will trigger an immediate sync which will enable the code review feature. You will then see the Review button enabled for any review in the Gerrit web interface. If you don't do this, the code review policy will apply after a periodical sync.