1. 24 Sep, 2018 1 commit
    • Michael Kozono's avatar
      Use `Gitlab::SafeRequestStore` in more places · 6f63147d8133
      Michael Kozono authored
      Even if it doesn’t save lines of code, since people will tend to use
      code they’ve seen. And `SafeRequestStore` is safer since you
      don’t have to remember to check `RequestStore.active?`.
      6f63147d8133
  2. 11 Sep, 2018 2 commits
  3. 08 Sep, 2018 1 commit
  4. 07 Sep, 2018 1 commit
  5. 05 Sep, 2018 1 commit
  6. 04 Sep, 2018 1 commit
  7. 21 Aug, 2018 1 commit
  8. 10 Aug, 2018 1 commit
  9. 30 Jul, 2018 1 commit
  10. 24 Jul, 2018 1 commit
    • Stan Hu's avatar
      Fix slow Markdown rendering · 66b25e076c25
      Stan Hu authored
      The sanitize transformers were being duplicated each time the Markdown
      renderer was called, leading to expontential growth in rendering times.
      
      The problem was that although HTML::Pipeline::SanitizationFilter.WHITELIST
      is a frozen hash, the `:transformers` array can be modified. We need
      to do deep copy of this to avoid adding duplicates.
      
      Closes #49409
      66b25e076c25
  11. 23 Jul, 2018 1 commit
  12. 11 Jul, 2018 1 commit
  13. 06 Jul, 2018 1 commit
  14. 04 Jul, 2018 2 commits
  15. 03 Jul, 2018 1 commit
  16. 02 Jul, 2018 2 commits
  17. 30 Jun, 2018 2 commits
  18. 29 Jun, 2018 1 commit
  19. 27 Jun, 2018 1 commit
  20. 20 Jun, 2018 1 commit
  21. 18 Jun, 2018 3 commits
  22. 16 Jun, 2018 1 commit
  23. 14 Jun, 2018 2 commits
  24. 12 Jun, 2018 1 commit
  25. 18 May, 2018 1 commit
  26. 25 Apr, 2018 1 commit
  27. 20 Apr, 2018 1 commit
  28. 17 Apr, 2018 1 commit
  29. 12 Apr, 2018 1 commit
    • Jan Provaznik's avatar
      Fix reference filters in group context · 2152d5efc880
      Jan Provaznik authored
      Since !18150 abstract reference filter supports also `group`
      as a resource parent (not only `project`). Some reference filters,
      which inherit from abstract filter, depend on parent being `project`
      when checking a reference.
      
      This patch adds explicit check of parent class to the given filters.
      2152d5efc880
  30. 11 Apr, 2018 1 commit
    • Yorick Peterse's avatar
      Support Markdown rendering using multiple projects · 6279781f85f9
      Yorick Peterse authored
      This refactors the Markdown pipeline so it supports the rendering of
      multiple documents that may belong to different projects. An example of
      where this happens is when displaying the event feed of a group. In this
      case we retrieve events for all projects in the group. Previously we
      would group events per project and render these chunks separately, but
      this would result in many SQL queries being executed. By extending the
      Markdown pipeline to support this out of the box we can drastically
      reduce the number of SQL queries.
      
      To achieve this we introduce a new object to the pipeline:
      Banzai::RenderContext. This object simply wraps two other objects: an
      optional Project instance, and an optional User instance. On its own
      this wouldn't be very helpful, but a RenderContext can also be used to
      associate HTML documents with specific Project instances. This work is
      done in Banzai::ObjectRenderer and allows us to reuse as many queries
      (and results) as possible.
      6279781f85f9
  31. 06 Apr, 2018 1 commit
  32. 05 Apr, 2018 2 commits
    • Sean McGivern's avatar
      Fix N+1 in MergeRequestParser · 583739e2decc
      Sean McGivern authored
      read_project can be prevented by a very expensive condition, which we want to
      avoid, while still not writing manual SQL queries. read_project_for_iids is used
      by read_issue_iid and read_merge_request_iid to satisfy both of those
      constraints, and allow the declarative policy runner to use its normal caching
      strategy.
      583739e2decc
    • Jan Provaznik's avatar
      Better group support notes-related code · 59387501afe3
      Jan Provaznik authored
      Updates notes-related services and rendering so this code can be
      easily used for group-scoped resources (specifically Epics).
      
      Related to gitlab-ee!5205
      59387501afe3