- May 21, 2016
-
-
Douwe Maan authored
-
- May 19, 2016
-
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
By moving various bits of shared logic into the base Parser class the reference parsers for labels, merge requests, and others become a lot more simpler.
-
Yorick Peterse authored
This removes the need for calling "Ability.abilities.allowed?(...)" directly in the various reference parser classes.
-
- May 18, 2016
-
-
Yorick Peterse authored
Since it doesn't really matter if "reference_type" is given a Symbol or a String we might as well just use "attr_accessor".
-
- May 12, 2016
-
-
Yorick Peterse authored
This ensures permissions are _always_ checked but without having to run a lot of SQL queries for every user to check.
-
Yorick Peterse authored
This method takes a list of users and a project and returns the users that can read the project, without having to run extra SQL queries for every user it has to check.
-
Yorick Peterse authored
-
- May 11, 2016
-
-
Yorick Peterse authored
The "participants" method no longer checks if a User can read a Project if the User is already in the Set of User objects. This helps when a certain user authored several notes but is also mentioned a bunch of times.
-
Yorick Peterse authored
This ensures the notes use the correct project instead of creating a new one.
-
Yorick Peterse authored
This ensures that getting the mentioned users of a commit includes the users mentioned in any notes.
-
Yorick Peterse authored
This ensures that the authors of notes are included in the list of participants without having to run grab the participants on a per Note basis.
-
Yorick Peterse authored
This adds specs for the "participants" method of Commit, Issue, MergeRequest, Note, and Snippet.
-
Yorick Peterse authored
Previously somehow the author/assignee of an Issuable would magically come first. By using an explicit order for attributes we can always guarantee the same order, instead of it working by accident. In particular this ensures that for an Issuable the author/assignee come before the mentioned users.
-
Yorick Peterse authored
The old code would check if every returned user could read the current project. In the new setup this is already done for the mentioned users and using the old approach would lead to the code running lots of useless SQL queries. To work around this (while still ensuring every user has the right permissions) we _only_ do an extra check for users returned directly by attributes, skipping users returned by a Proc. When grabbing the participants of an issue with 200 mentioned users this increases the query count from around 12 to 30 (around 48 when the issue/merge request has both an author and assignee). If we were to simply check permissions for every user the query count would be between 1000 and 1100.
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
This code is no longer in use nor needed as the reference parsing code takes care of loading data in batches instead of pushing this problem to a developer.
-
Yorick Peterse authored
This changes Commit#has_been_reverted? to use the new reference extraction setup for figuring out if a commit has been reverted. For a particular commit this would reduce the number of queries from around 850 to around 6 queries.
-
Yorick Peterse authored
This ensures that if the same object is referenced a 100 times we only pass a single ID to any SQL queries.
-
Yorick Peterse authored
This changes Issue#referenced_merge_requests to use the new reference parsing setup (as provided by Mentionable#all_references). For an issue mentioning 5 merge requests this cuts down the number of queries from around 1306 to around 10 queries.
-
Yorick Peterse authored
The output is now always cached (as it should be) so the `cache: true` option is no longer needed.
-
Yorick Peterse authored
-
Yorick Peterse authored
-
Yorick Peterse authored
This greatly cuts down the amount of queries executed when parsing user references.
-
Yorick Peterse authored
This ensures that queries (or other expensive method calls) that aren't always needed are not loaded until they are actually used.
-