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.

Creating tasks

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:

Mark comment as a task

You can also turn existing comments into tasks or remove their task status.

Discussing tasks

You can discuss tasks by replying to them, just like with regular comments.

Resolving tasks

The Mark as resolved/unresolved button indicates the current task status:

Resolve button

Resolving indicates that the task is complete and does not require additional attention.

Resolve permissions

TeamHub handles resolve permissions as follows:

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.

A blocked merge button

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:

Code review creation

In the Settings form for the code review:

Code review settings

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:

Repository settings

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.

Tasks tab

Reviewing the code review status

The label on the Tasks tab indicates the amount of resolved tasks and the total number of tasks.

Tasks tab label

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:

Tasks status in the sidebar

Updated on: 19 December 2017