GitLab Bot
9bf40d9fdc
Add latest changes from gitlab-org/gitlab@master
2022-09-29 12:08:49 +00:00
GitLab Bot
9c1df7bcf1
Add latest changes from gitlab-org/gitlab@master
2022-06-21 03:08:34 +00:00
GitLab Bot
0c51dc19cb
Add latest changes from gitlab-org/gitlab@master
2021-08-20 06:11:03 +00:00
GitLab Bot
4bf395cded
Add latest changes from gitlab-org/gitlab@master
2021-08-03 21:09:39 +00:00
GitLab Bot
f304336f5e
Add latest changes from gitlab-org/gitlab@master
2021-05-19 12:10:33 +00:00
GitLab Bot
5c2568f176
Add latest changes from gitlab-org/gitlab@master
2020-11-23 21:09:19 +00:00
GitLab Bot
8132e39e1b
Add latest changes from gitlab-org/gitlab@master
2020-11-23 09:09:13 +00:00
GitLab Bot
6724a6ee6b
Add latest changes from gitlab-org/gitlab@master
2020-09-04 12:08:27 +00:00
GitLab Bot
c59765a50a
Add latest changes from gitlab-org/gitlab@master
2020-06-24 18:09:03 +00:00
GitLab Bot
908a54b624
Add latest changes from gitlab-org/gitlab@master
2020-06-05 21:08:27 +00:00
GitLab Bot
2fa68d3a97
Add latest changes from gitlab-org/gitlab@master
2020-05-04 06:10:10 +00:00
GitLab Bot
4aeb8a02c5
Add latest changes from gitlab-org/gitlab@master
2019-12-23 12:08:18 +00:00
GitLab Bot
79d62647bc
Add latest changes from gitlab-org/gitlab@master
2019-12-18 12:07:48 +00:00
GitLab Bot
0282449e6e
Add latest changes from gitlab-org/gitlab@master
2019-11-20 06:06:16 +00:00
Patrick Bajao
70626f324b
Make diff_refs_match_commit validation reusable
...
Move it to DiffPositionableNote concern which will be re-used
in EE in DraftNote model.
2019-08-01 16:00:36 -05:00
Oswaldo Ferreira
5a89bcc4da
Avoid 500's when commit is not reachable
2019-06-05 08:38:09 -03:00
Thong Kuah
a2cfc150ce
Add # frozen_string_literal to spec/models
...
Adds `# frozen_string_literal: true` to spec/models ruby files
2019-04-01 14:37:54 +13:00
Oswaldo Ferreira
53a5960496
Implement multi-line suggestions filtering
...
Implements the filtering logic for
`suggestion:-x+y` syntax.
2019-03-20 11:30:24 -03:00
Douwe Maan
f6dd6e566a
Add image_diff_note_on_merge_request factory
2018-12-20 15:22:58 +01:00
Oswaldo Ferreira
ed3034bbb7
Allow suggesting single line changes in diffs
2018-12-13 19:17:19 +00:00
Oswaldo Ferreira
bb8f2520b4
Persist truncated note diffs on a new table
...
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.
2018-05-24 15:34:43 -03:00
Oswaldo Ferreira
be8a320bd8
Use persisted diff data instead fetching Git on discussions
...
Today, when fetching diffs of a note, we always go to Gitaly in order to diff between commits and return the diff of each discussion note. With this change we avoid doing that for notes on the "current version" of the MR.
2018-04-30 20:07:21 -03:00
Douwe Maan
771bf9527f
Improve performance of DiffDiscussion#truncated_diff_lines and DiffNote#diff_line by removing expensive diff position calculation and comparison
2017-12-22 18:07:15 +01:00
micael.bergeron
360b94ceba
adding view and feature specs
2017-12-07 09:06:59 -05:00
Felipe Artur
aefefbf117
Prevents position update for image diff notes
2017-11-13 16:40:54 -02:00
Alejandro Rodríguez
9fdde3693b
Move line code generation into Gitlab::Git
...
Having a distinct class just for that was a bit overkill
2017-10-12 22:13:05 -03:00
Alejandro Rodríguez
faa9bd402d
Create a Gitlab::Git submodule for conlict-related files
...
Rename classes to (hopefully) clearer names while we're doing that.
2017-10-12 22:03:15 -03:00
Alejandro Rodríguez
f72598b659
Move Gitlab::Diff::LineCode to module Gitlab::Git
2017-10-12 21:45:16 -03:00
Felipe Artur
b54203f0ad
Commenting on image diffs
2017-10-07 04:25:17 +00:00
Rémy Coutable
ddccd24c13
Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Douwe Maan
09838ac626
Update diff discussion position per discussion instead of per note
2017-05-31 14:34:56 -05:00
Douwe Maan
7c479d88a9
Pass fallback_diff_refs to Diff::File instead of using view helpers
2017-05-23 15:37:05 -05:00
Douwe Maan
f8fabfcc6f
Allow commenting on older versions of the diff and comparisons between diff versions
2017-05-03 14:47:21 -05:00
Douwe Maan
4f8c36c03c
Add specs
2017-04-10 15:17:52 -05:00
Douwe Maan
bb8cc94668
Don't use original_discussion_id
2017-04-05 17:44:14 +01:00
Douwe Maan
79889a6aa3
Add specs
2017-04-05 17:44:14 +01:00
Douwe Maan
08bbb9fce6
Add option to start a new discussion on an MR
2017-04-05 17:44:14 +01:00
Robert Speicher
fcb37542e7
Use `:empty_project` where possible in model specs
2017-01-26 17:44:59 -05:00
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