1. 01 8月, 2016 3 次提交
  2. 30 7月, 2016 1 次提交
  3. 29 7月, 2016 7 次提交
    • G
      a42cce1b
    • Z
      Incorporate feedback · 76e9b684
      Z.J. van de Weg 提交于
      76e9b684
    • Z
      Add API support for environments · 84cd2120
      Z.J. van de Weg 提交于
      84cd2120
    • Y
      Method for returning issues readable by a user · 002ad215
      Yorick Peterse 提交于
      The method Ability.issues_readable_by_user takes a list of users and an
      optional user and returns an Array of issues readable by said user. This
      method in turn is used by
      Banzai::ReferenceParser::IssueParser#nodes_visible_to_user so this
      method no longer needs to get all the available abilities just to check
      if a user has the "read_issue" ability.
      
      To test this I benchmarked an issue with 222 comments on my development
      environment. Using these changes the time spent in nodes_visible_to_user
      was reduced from around 120 ms to around 40 ms.
      002ad215
    • T
      Use `Gitlab::Access` to protected branch access levels. · 0a8aeb46
      Timothy Andrew 提交于
      1. It makes sense to reuse these constants since we had them duplicated
         in the previous enum implementation. This also simplifies our
         `check_access` implementation, because we can use
         `project.team.max_member_access` directly.
      
      2. Use `accepts_nested_attributes_for` to create push/merge access
         levels. This was a bit fiddly to set up, but this simplifies our code
         by quite a large amount. We can even get rid of
         `ProtectedBranches::BaseService`.
      
      3. Move API handling back into the API (previously in
         `ProtectedBranches::BaseService#translate_api_params`.
      
      4. The protected branch services now return a `ProtectedBranch` rather
         than `true/false`.
      
      5. Run `load_protected_branches` on-demand in the `create` action, to
         prevent it being called unneccessarily.
      
      6. "Masters" is pre-selected as the default option for "Allowed to Push"
         and "Allowed to Merge".
      
      7. These changes were based on a review from @rymai in !5081.
      0a8aeb46
    • T
      Have the `branches` API work with the new protected branches data model. · 01d190a8
      Timothy Andrew 提交于
      1. The new data model moves from `developers_can_{push,merge}` to
         `allowed_to_{push,merge}`.
      
      2. The API interface has not been changed. It still accepts
         `developers_can_push` and `developers_can_merge` as options. These
         attributes are inferred from the new data model.
      
      3. Modify the protected branch create/update services to translate from
         the API interface to our current data model.
      01d190a8
    • T
      Enforce "No One Can Push" during git operations. · 828f6eb6
      Timothy Andrew 提交于
      1. The crux of this change is in `UserAccess`, which looks through all
         the access levels, asking each if the user has access to push/merge
         for the current project.
      
      2. Update the `protected_branches` factory to create access levels as
         necessary.
      
      3. Fix and augment `user_access` and `git_access` specs.
      828f6eb6
  4. 28 7月, 2016 3 次提交
    • J
      fix repo hooks missing on import · 32d8aa6d
      James Lopez 提交于
       fix spec and added changelog
      32d8aa6d
    • Y
      Reduce instrumentation overhead · 905f8d76
      Yorick Peterse 提交于
      This reduces the overhead of the method instrumentation code primarily
      by reducing the number of method calls. There are also some other small
      optimisations such as not casting timing values to Floats (there's no
      particular need for this), using Symbols for method call metric names,
      and reducing the number of Hash lookups for instrumented methods.
      
      The exact impact depends on the code being executed. For example, for a
      method that's only called once the difference won't be very noticeable.
      However, for methods that are called many times the difference can be
      more significant.
      
      For example, the loading time of a large commit
      (nrclark/dummy_project@81ebdea5df2fb42e59257cb3eaad671a5c53ca36)
      was reduced from around 19 seconds to around 15 seconds using these
      changes.
      905f8d76
    • D
      Add commit stats to commit api response · a4bb9993
      dixpac 提交于
      a4bb9993
  5. 27 7月, 2016 7 次提交
  6. 26 7月, 2016 3 次提交
  7. 25 7月, 2016 2 次提交
  8. 23 7月, 2016 2 次提交
  9. 22 7月, 2016 1 次提交
  10. 21 7月, 2016 7 次提交
  11. 20 7月, 2016 4 次提交