Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,763
    • Issues 44,763
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,329
    • Merge requests 1,329
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #35097
Closed
Open
Issue created Oct 28, 2019 by boomshadow@boomshadowContributor

"Allowed to push" to supersede "Code owner approval"

With the release of 12.4, Code Owner Approvals was moved to "per protected branch": https://about.gitlab.com/blog/2019/10/22/gitlab-12-4-released/#code-owner-approvals-for-protected-branches

With this change, our CI bots can no longer push to master, even though the bot user is on the list of users "Allowed to push". See screenshot:

Screen_Shot_2019-10-28_at_12.45.30_PM

We want users to have to do Merge Requests with Code Owners, but we want our bot to be able to directly push bypassing this MR process. That is the point of the "Allowed to push" list.

This worked prior to this 12.4 release. The 12.4 change broke our pipeline and code owners doesn't honor the "Allowed to push" rule.

Proposal

Basically, Code owner approval should not apply to users in Allowed to push.

Allowing a user who is "Allowed to push" to override pushing directly to a protected branch (and a file matching a CODEOWNERS file pattern) is more flexible than the alternative (Code Owners overriding branch protection settings). In the event a project maintainer doesn't want to allow direct pushes to master, they can simply configure “no one” under allowed to push, whereas Code Owners taking precedence does not allow for flexibility.

Additionally, to clarify the intersection between the Allowed to… fields and the Code Owner approval toggle, it would be helpful to add an explanation to the UI.

image

Does not apply to users allowed to push.

Edited Oct 19, 2020 by Daniel Gruesso
Assignee
Assign to
Time tracking