Code Review tasks
You can turn any comment into a task, and vice versa. Code review tasks let reviewers request changes that are required before the code review is considered ready for merge. You can configure a code review to disallow merging until all tasks have been resolved.
When all changes are done, you can mark the respective tasks as resolved.
A task is simply a comment marked as such. You create a new task by creating a new comment and selecting the Mark comment as a task check box:
You can also turn existing comments into tasks or remove their task status.
You can discuss tasks by replying to them, just like with regular comments.
The Mark as resolved/unresolved button indicates the current task status:
Resolving indicates that the task is complete and does not require additional attention.
TeamHub handles resolve permissions as follows:
- Comment authors are able to resolve their own tasks.
- Company admins can resolve any task.
Users with the manage code reviews permission can resolve tasks within the respective CRs. This permission is granted to:
- Project members with admin, master, or developer role if repository authorization is disabled.
- Repository members with admin, master, or developer role if repository authorization is enabled.
See Roles for more info.
Blocking the merge
It is possible to configure a code review to prevent merging until all tasks are resolved. This helps ensure that low-quality code does not make it into the base branch.
You can enable merge blocking by selecting the Require all tasks to be resolved check box in the New code review form or in the Settings form for the code review..
When creating a code review:
In the Settings form for the code review:
In addition, you can configure the default behavior for unresolved tasks in the Repository settings form by enabling or disabling Require all tasks to be resolved:
Reviewing the list of tasks
The Tasks tab lets you quickly review all tasks in a code review. It lists each task along with its state and number of replies. Click a task to proceed to its discussion.
Reviewing the code review status
The label on the Tasks tab indicates the amount of resolved tasks and the total number of tasks.
The same information is available in the sidebar on the right. The color of the icon next to the number of tasks indicates whether all tasks have been resolved, as follows:
- Gray: One or more tasks are unresolved.
- Green: No task comments are available, or all comments have been resolved.