Skip to content
Snippets Groups Projects
Select Git revision
  • ag-test
  • rs-test
  • master default protected
  • test-me-pa
  • mksionek-master-patch-52381
  • new-branch-10
  • test-conflicts
  • test-suggestions
  • alejandro-test
  • patch-25
  • winh-test-image-doscussion
  • stg-lfs-image-test-2
  • stg-lfs-image-test
  • test42016
  • issue_42016
  • issue-32709
  • add-codeowners
  • ClemMakesApps-master-patch-62759
  • bvl-staging-test
  • bvl-merge-base-api
  • v9.2.0-rc6 protected
  • v9.2.0-rc5 protected
  • v9.2.0-rc4 protected
  • v9.2.0-rc3 protected
  • v9.1.4 protected
  • v9.2.0-rc2 protected
  • v9.2.0-rc1 protected
  • v9.1.3 protected
  • v8.17.6 protected
  • v9.0.7 protected
  • v9.1.2 protected
  • v9.1.1 protected
  • v9.2.0.pre protected
  • v9.1.0 protected
  • v9.1.0-rc7 protected
  • v9.1.0-rc6 protected
  • v9.0.6 protected
  • v9.1.0-rc5 protected
  • v9.1.0-rc4 protected
  • v9.1.0-rc3 protected
40 results

protected_branches_controller.rb

  • Timothy Andrew's avatar
    e805a647
    Backport changes from gitlab-org/gitlab-ee!581 to CE. · e805a647
    Timothy Andrew authored
    !581 has a lot of changes that would cause merge conflicts if not
    properly backported to CE. This commit/MR serves as a better
    foundation for gitlab-org/gitlab-ee!581.
    
    = Changes =
    
    1. Move from `has_one {merge,push}_access_level` to `has_many`, with the
       `length` of the association limited to `1`. This is _effectively_ a
       `has_one` association, but should cause less conflicts with EE, which
       is set to `has_many`. This has a number of related changes in the
       views, specs, and factories.
    
    2. Make `gon` variable loading more consistent (with EE!581) in the
       `ProtectedBranchesController`. Also use `::` to prefix the
       `ProtectedBranches` services, because this is required in EE.
    
    3. Extract a `ProtectedBranchAccess` concern from the two access level
       models. This concern only has a single `humanize` method here, but
       will have more methods in EE.
    
    4. Add `form_errors` to the protected branches creation form. This is
       not strictly required for EE compatibility, but was an oversight
       nonetheless.
    e805a647
    History
    Backport changes from gitlab-org/gitlab-ee!581 to CE.
    Timothy Andrew authored
    !581 has a lot of changes that would cause merge conflicts if not
    properly backported to CE. This commit/MR serves as a better
    foundation for gitlab-org/gitlab-ee!581.
    
    = Changes =
    
    1. Move from `has_one {merge,push}_access_level` to `has_many`, with the
       `length` of the association limited to `1`. This is _effectively_ a
       `has_one` association, but should cause less conflicts with EE, which
       is set to `has_many`. This has a number of related changes in the
       views, specs, and factories.
    
    2. Make `gon` variable loading more consistent (with EE!581) in the
       `ProtectedBranchesController`. Also use `::` to prefix the
       `ProtectedBranches` services, because this is required in EE.
    
    3. Extract a `ProtectedBranchAccess` concern from the two access level
       models. This concern only has a single `humanize` method here, but
       will have more methods in EE.
    
    4. Add `form_errors` to the protected branches creation form. This is
       not strictly required for EE compatibility, but was an oversight
       nonetheless.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.