1. 13 Jul, 2016 4 commits
    • Robert Speicher's avatar
      Revert "Merge branch '18193-developers-can-merge' into 'master' · 530f5158
      Robert Speicher authored
      This reverts commit 9ca633eb, reversing
      changes made to fb229bbf.
    • Timothy Andrew's avatar
      Don't ask the user to "merge this request manually". · af7e7516
      Timothy Andrew authored
      1. If they are a developer with "Developers can Merge" switched on.
    • Timothy Andrew's avatar
      Refactor `Gitlab::GitAccess` · 60245bbe
      Timothy Andrew authored
      1. Don't use case statements for dispatch anymore. This leads to a lot
         of duplication, and makes the logic harder to follow.
      2. Remove duplicated logic.
          - For example, the `can_push_to_branch?` exists, but we also have a
            different way of checking the same condition within `change_access_check`.
          - This kind of duplication is removed, and the `can_push_to_branch?`
            method is used in both places.
      3. Move checks returning true/false to `UserAccess`.
          - All public methods in `GitAccess` now return an instance of
            `GitAccessStatus`. Previously, some methods would return
            true/false as well, which was confusing.
          - It makes sense for these kinds of checks to be at the level of a
            user, so the `UserAccess` class was repurposed for this. The prior
            `UserAccess.allowed?` classmethod is converted into an instance
          - All external uses of these checks have been migrated to use the
            `UserAccess` class
      4. Move the "change_access_check" into a separate class.
          - Create the `GitAccess::ChangeAccessCheck` class to run these
            checks, which are quite substantial.
          - `ChangeAccessCheck` returns an instance of `GitAccessStatus` as
      5. Break out the boolean logic in `ChangeAccessCheck` into `if/else`
         chains - this seems more readable.
      6. I can understand that this might look like overkill for !4892, but I
         think this is a good opportunity to clean it up.
          - http://martinfowler.com/bliki/OpportunisticRefactoring.html
    • Mathias Vestergaard's avatar
      Added "developers can merge" setting to protected branches · f0577d83
      Mathias Vestergaard authored
      - Cherry-picked from `mvestergaard:branch-protection-dev-merge`
      - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4220
  2. 08 Jul, 2016 2 commits
  3. 07 Jul, 2016 7 commits
  4. 05 Jul, 2016 3 commits
  5. 04 Jul, 2016 1 commit
  6. 01 Jul, 2016 1 commit
  7. 29 Jun, 2016 1 commit
  8. 28 Jun, 2016 1 commit
  9. 24 Jun, 2016 1 commit
    • Rémy Coutable's avatar
      Fix a wrong MR status when merge_when_build_succeeds &... · e3d464d8
      Rémy Coutable authored
      Fix a wrong MR status when merge_when_build_succeeds & project.only_allow_merge_if_build_succeeds are true
      The issue was that `MergeRequest#mergeable?` returns false when the CI
      state is not success and project.only_allow_merge_if_build_succeeds is
      true. In this case `Projects::MergeRequestsController#merge` would
      return the `:failed` status when enabling `merge_when_build_succeeds`,
      thus leading to a weird state and the MR never automatically merged.
      The fix is to disable the CI state check in the controller safeguard
      that early return the `:failed` status.
      Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
  10. 23 Jun, 2016 2 commits
    • Paco Guzman's avatar
    • Z.J. van de Weg's avatar
      Eager load award emoji on notes · e7a27946
      Z.J. van de Weg authored
      This commit eager loads the award emoji on both the issues and the MRs.
      When loading an issue with 108 comments this reduces the query count by
      327 queries. On a merge request with the same amount of comments this
      saves 148 queries. The large difference is not clear to me at this
      point and the total query count is still huge with 387 and 1034
      respectively. The biggest problem however, remains the calculation of
  11. 18 Jun, 2016 1 commit
  12. 10 Jun, 2016 5 commits
  13. 03 Jun, 2016 3 commits
  14. 02 Jun, 2016 1 commit
  15. 01 Jun, 2016 1 commit
  16. 20 May, 2016 1 commit
  17. 14 May, 2016 1 commit
  18. 10 May, 2016 1 commit
  19. 09 May, 2016 1 commit
  20. 08 May, 2016 1 commit
    • Connor Shea's avatar
      Enable the Rubocop DeprecatedClassMethods cop · 9cc0937b
      Connor Shea authored
      This reports uses of `File.exists?` and `Dir.exists?`, which were both
      deprecated in Ruby and will eventually be removed in favor of
      `.exist?`. Also fixes all existing uses of the deprecated methods.
  21. 06 May, 2016 1 commit