1. 10 Aug, 2016 2 commits
  2. 09 Aug, 2016 1 commit
  3. 04 Aug, 2016 2 commits
  4. 02 Aug, 2016 1 commit
  5. 01 Aug, 2016 1 commit
  6. 29 Jul, 2016 1 commit
    • Timothy Andrew's avatar
      Fix all specs related to changes in !5081. · d7366dd20b80
      Timothy Andrew authored
      1. Remove `Project#developers_can_push_to_protected_branch?` since it
         isn't used anymore.
      
      2. Remove `Project#developers_can_merge_to_protected_branch?` since it
         isn't used anymore.
      d7366dd20b80
  7. 28 Jul, 2016 1 commit
  8. 27 Jul, 2016 1 commit
  9. 26 Jul, 2016 1 commit
  10. 23 Jul, 2016 1 commit
  11. 21 Jul, 2016 1 commit
  12. 20 Jul, 2016 8 commits
  13. 19 Jul, 2016 4 commits
  14. 18 Jul, 2016 3 commits
  15. 15 Jul, 2016 1 commit
  16. 13 Jul, 2016 5 commits
  17. 12 Jul, 2016 1 commit
  18. 07 Jul, 2016 2 commits
  19. 05 Jul, 2016 2 commits
    • Robert Speicher's avatar
      Dumb-down avatar presence check in `avatar_url` methods · 59fcef9168d7
      Robert Speicher authored
      `avatar.present?` goes through CarrierWave, and checks that the file
      exists on disk and checks its filesize. Because we're hitting the disk,
      this adds extra overhead to something where the worst-case scenario is
      rendering a broken image.
      
      Instead, we now just check that the _database attribute_ is present,
      which is good enough for our purposes.
      
      See https://gitlab.com/gitlab-org/gitlab-ce/issues/19273
      59fcef9168d7
    • Timothy Andrew's avatar
      Support wildcard matches for protected branches at the model level. · 4fea0f8e3d8b
      Timothy Andrew authored
      1. The main implementation is in the `ProtectedBranch` model. The
         wildcard is converted to a Regex and compared. This has been tested
         thoroughly.
      
          - While `Project#protected_branch?` is the main entry point,
            `project#open_branches` and
            `project#developers_can_push_to_protected_branch?`
            have also been modified to work with wildcard protected branches.
      
          - The regex is memoized (within the `ProtectedBranch` instance)
      
      2. Improve the performance of `Project#protected_branch?`
      
          -  This method is called from `Project#open_branches` once _per branch_
             in the project, to check if that branch is protected or not.
      
          -  Before, `#protected_branch?` was making a database call every
             time it was invoked (in the above case, that amounts to once
             per branch), which is expensive.
      
          -  This commit caches the list of protected branches in memory, which
             reduces the number of database calls down to 1.
      
          -  A downside to this approach is that `#protected_branch?` _could_
             return a stale value (due to the caching), but this is
             an acceptable tradeoff.
      
      3. Remove the (now) unused `Project#protected_branch_names` method.
      
          - This was previously used to check for protected branch status.
      4fea0f8e3d8b
  20. 01 Jul, 2016 1 commit