Skip to content

Allow direct push to default branch if code owners section is optional

In #232995 (closed) we've allowed designating code owners sections as optional. When a section is marked with ^:

[Documentation]
*.md @root

[Ruby]
*.rb @root

^[Go]
*.go @root

It's considered optional: MR widget

However, when a user pushes with changes to a file protected by code owners, the push won't be allowed. Marking a section as optional doesn't affect pushing.

Proposal

Consider respecting optional code owners rules, when a user pushes to a file

Edited by Daniel Gruesso