An error occurred fetching the project authors.
  1. 29 Nov, 2018 1 commit
  2. 12 Nov, 2018 1 commit
    • Yorick Peterse's avatar
      Move EE prepend/include calls to the end of models · 34836b9e
      Yorick Peterse authored
      This moves all instances of `prepend EE::Something` and `include
      EE::Something` in models to the last line of the corresponding model.
      This pushes EE specific code further down the files, reducing the
      likelihood of developers running into merge conflicts.
      34836b9e
  3. 05 Nov, 2018 2 commits
  4. 31 Oct, 2018 1 commit
  5. 29 Oct, 2018 1 commit
    • Jan Provaznik's avatar
      Redact unsubscribe links in issuable texts · 207a4ae9
      Jan Provaznik authored
      It's possible that user pastes accidentally also unsubscribe link
      which is included in footer of notification emails. This unsubscribe
      link contains personal token which attacker then use to act as the
      original user (e.g. for sending comments under his/her identity).
      207a4ae9
  6. 23 Oct, 2018 3 commits
  7. 06 Oct, 2018 2 commits
  8. 02 Oct, 2018 2 commits
  9. 17 Sep, 2018 2 commits
    • Yorick Peterse's avatar
      Added FromUnion to easily select from a UNION · d86e25db
      Yorick Peterse authored
      This commit adds the module `FromUnion`, which provides the class method
      `from_union`. This simplifies the process of selecting data from the
      result of a UNION, and reduces the likelihood of making mistakes. As a
      result, instead of this:
      
          union = Gitlab::SQL::Union.new([foo, bar])
      
          Foo.from("(#{union.to_sql}) #{Foo.table_name}")
      
      We can now write this instead:
      
          Foo.from_union([foo, bar])
      
      This commit also includes some changes to make this new setup work
      properly. For example, a bug in Rails 4
      (https://github.com/rails/rails/issues/24193) would break the use of
      `from("sub-query-here").includes(:relation)` in certain cases. There was
      also a CI query which appeared to repeat a lot of conditions from an
      outer query on an inner query, which isn't necessary.
      
      Finally, we include a RuboCop cop to ensure developers use this new
      module, instead of using Gitlab::SQL::Union directly.
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
      d86e25db
    • Yorick Peterse's avatar
      Added FromUnion to easily select from a UNION · 8a72f5c4
      Yorick Peterse authored
      This commit adds the module `FromUnion`, which provides the class method
      `from_union`. This simplifies the process of selecting data from the
      result of a UNION, and reduces the likelihood of making mistakes. As a
      result, instead of this:
      
          union = Gitlab::SQL::Union.new([foo, bar])
      
          Foo.from("(#{union.to_sql}) #{Foo.table_name}")
      
      We can now write this instead:
      
          Foo.from_union([foo, bar])
      
      This commit also includes some changes to make this new setup work
      properly. For example, a bug in Rails 4
      (https://github.com/rails/rails/issues/24193) would break the use of
      `from("sub-query-here").includes(:relation)` in certain cases. There was
      also a CI query which appeared to repeat a lot of conditions from an
      outer query on an inner query, which isn't necessary.
      
      Finally, we include a RuboCop cop to ensure developers use this new
      module, instead of using Gitlab::SQL::Union directly.
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
      8a72f5c4
  10. 13 Sep, 2018 1 commit
  11. 11 Sep, 2018 2 commits
  12. 07 Sep, 2018 2 commits
  13. 02 Aug, 2018 2 commits
  14. 01 Aug, 2018 1 commit
  15. 30 Jul, 2018 1 commit
    • Bob Van Landuyt's avatar
      Show the status of a user in interactions · f1d3ea63
      Bob Van Landuyt authored
      The status is shown for
      - The author of a commit when viewing a commit
      - Notes on a commit (regular/diff)
      - The user that triggered a pipeline when viewing a pipeline
      - The author of a merge request when viewing a merge request
      - The author of notes on a merge request (regular/diff)
      - The author of an issue when viewing an issue
      - The author of notes on an issue
      - The author of a snippet when viewing a snippet
      - The author of notes on a snippet
      - A user's profile page
      - The list of members of a group/user
      f1d3ea63
  16. 26 Jul, 2018 1 commit
  17. 11 Jul, 2018 2 commits
  18. 03 Jul, 2018 4 commits
  19. 21 Jun, 2018 2 commits
  20. 20 Jun, 2018 2 commits
  21. 05 Jun, 2018 2 commits
    • Sean McGivern's avatar
      Fix an N+1 in avatar URLs · 6ecf819f
      Sean McGivern authored
      This is tricky: the query was being run in
      `ObjectStorage::Extension::RecordsUploads#retrieve_from_store!`, but we can't
      just add batch loading there, because the `#upload=` method there would use the
      result immediately, making the batch only have one item.
      
      Instead, we can pre-emptively add an item to the batch whenever an avatarable
      object is initialized, and then reuse that batch item in
      `#retrieve_from_store!`. However, this also has problems:
      
      1. There is a lot of logic in `Avatarable#retrieve_upload_from_batch`.
      2. Some of that logic constructs a 'fake' model for the batch key. This should
         be fine, because of ActiveRecord's override of `#==`, but it relies on that
         staying the same.
      6ecf819f
    • Sean McGivern's avatar
      Fix an N+1 in avatar URLs · 90bca8ea
      Sean McGivern authored
      This is tricky: the query was being run in
      `ObjectStorage::Extension::RecordsUploads#retrieve_from_store!`, but we can't
      just add batch loading there, because the `#upload=` method there would use the
      result immediately, making the batch only have one item.
      
      Instead, we can pre-emptively add an item to the batch whenever an avatarable
      object is initialized, and then reuse that batch item in
      `#retrieve_from_store!`. However, this also has problems:
      
      1. There is a lot of logic in `Avatarable#retrieve_upload_from_batch`.
      2. Some of that logic constructs a 'fake' model for the batch key. This should
         be fine, because of ActiveRecord's override of `#==`, but it relies on that
         staying the same.
      90bca8ea
  22. 24 May, 2018 2 commits
    • Oswaldo Ferreira's avatar
      Persist truncated note diffs on a new table · 84481a6b
      Oswaldo Ferreira authored
      We request Gitaly in a N+1 manner to build discussion diffs. Once the diffs are from different revisions, it's hard to make a single request to the service in order to build the whole response.
      With this change we solve this problem and simplify a lot fetching this piece of info.
      84481a6b
    • Oswaldo Ferreira's avatar
      Persist truncated note diffs on a new table · bb8f2520
      Oswaldo Ferreira authored
      We request Gitaly in a N+1 manner to build discussion diffs. Once the diffs are from different revisions, it's hard to make a single request to the service in order to build the whole response.
      With this change we solve this problem and simplify a lot fetching this piece of info.
      bb8f2520
  23. 07 May, 2018 1 commit