Skip to content

Link to the Code Owners documentation from CODEOWNERS file itself

Problem

This an actionable insight from the Code Review FY21-Q2 Category Maturity Scorecard research (insight).

See epic: Help users better understand CODEOWNERS (&4498 - closed)

Currently we only link to the documentation if the CODEOWNERS file itself has Code Owners.

The goal of this issue is to link to the user documentation when the CODEOWNERS file is out of scope of the CODEOWNERS file itself. See this example: https://gitlab.com/pedroms/public-project/-/blob/master/CODEOWNERS

image

There's no explanation of the purpose of this file when viewing it. Compare that to a CONTRIBUTING file:

image

Proposal

When the user clicks on the label Codeowners, they are taken to the corresponding CODEOWNERS file. It's at this file that it is relevant to link to docs because the file is context of how the file is structured for file checks.

Scenario: No CODEOWNERS for CODEOWNERS file

When there is no CODEOWNERS entry for the CODEOWNERS file we will display the following text:

image

Scenario: CODEOWNERS defined for file

Display a icon button with popover that links to the documentation.

To be displayed for all states except for when it is not defined for file/directory.

State Mockup
Default (idle) image
Hover image

Links

Edited by Michael Le