Proposal: Add an allowlist of files/patterns that do not trigger "Prevent MR approvals"
Issue
When using the Prevent approvals by users who add commits feature, it should be possible to define a list of files and regex patterns of files that should not block approval.
For example, there is no security concern when applying a change to a markdown file, so simply adding *.md
to the allowlist would ensure that technical writers could apply typo fixes without removing their own ability to approve the MR.
When this feature was recently enabled in the gitlab
project, it impacted the technical writing team immediately as we rely on the ability to push commits / apply suggestions before merging, for extremely minor changes that do not need to be sent back to the author for review. This includes missing punctuation, typo fixes, capitalization fixes, small markdown teaks to fix linting errors. We also sometimes help community contributors by fixing commit messages, or rebasing, and so on. If the only changes in all these commits are to *.md
files, there is no reason to prevent the TW from approving.
This feature also goes counter to our own code review policy: https://docs.gitlab.com/ee/development/code_review.html#merging-a-merge-request
If a merge request is fundamentally ready, but needs only trivial fixes (such as typos), consider demonstrating a bias for action by making those changes directly without going back to the author. You can do this by using the suggest changes feature to apply your own suggestions to the merge request.
With the feature enabled, this is no longer possible.
Proposal
Add an allowlist to the https://docs.gitlab.com/ee/user/project/merge_requests/approvals/settings.html#prevent-approvals-by-users-who-add-commits feature.
This allowlist should allow a list of files and regex patterns such as /*.md/
, similar to the CODEOWNERS
file. Commits with only changes to files on this list do not prevent approvals by the users that added the commits.