Consider not depending on updated_from_web? check for CODEOWNERS
In https://gitlab.com/gitlab-org/gitlab/blob/c89a6b4548e42ed446099c992c5359bfe34d1de2/ee/lib/ee/gitlab/checks/diff_check.rb#L23, we check whether the query parameter protocol
is web
to determine whether we should validate CODEOWNERS.
I think the goal there is to allow merge requests bypass CODEOWNERS
checks, but prevent direct pushes.
If that's the case, we already attempt to detect whether the push is coming from a merge request via MatchingMergeRequest
in https://gitlab.com/gitlab-org/gitlab/blob/28439ca4b1dd14f22a5a6ad14530f6bf1046f8bc/lib/gitlab/checks/branch_check.rb#L102. Maybe we should be using that instead of this magic query parameter value?
Or maybe we should be more explicit and instead of the obscure protocol=web
field use the query parameter merge_request=true
.