Commit graph

7 commits

Author SHA1 Message Date
Alejandro Rodríguez
ea155ccc3e Optimize discussion notes resolving and unresolving
Use `update_all` to only require one query per discussion to
update the notes resolved status. Some changes had to be made to
the discussion spec to accout for the fact that notes are not
individually updated now
2016-09-06 12:14:09 -03:00
Douwe Maan
4a13aa9f34 Store discussion_id on Note for faster discussion lookup. 2016-08-17 12:16:46 -05:00
Douwe Maan
41007f6d3c Address review feedback 2016-08-16 11:04:26 -05:00
Douwe Maan
c80f5e0a1c Add specs for new Note and DiffNote methods. 2016-08-12 00:16:38 -05:00
Paco Guzman
8716ff7f63 Speedup DiffNote#active? on discussions, preloading noteables and avoid touching git repository to return diff_refs when possible
- Preloading noteable we share the same noteable instance when more than one 
discussion refers to the same noteable.
- Any other call to that object that is cached in that object will be for any 
discussion.
- In those cases where merge_request_diff has all the sha stored to build a diff_refs get that 
diff_refs using directly those sha instead accessing to the git repository to first get the 
commits and later the sha.
2016-08-02 16:04:15 +02:00
Douwe Maan
6dd71888b3 Make DiffNote#update_position private 2016-07-07 16:13:55 -04:00
Douwe Maan
3dff2867b7 Add tests for DiffNote 2016-07-06 18:51:01 -04:00