summaryrefslogtreecommitdiff
path: root/app/models/note.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add comment to notes aliasesblackst0ne2017-05-041-0/+2
|
* Add alias_attributes for notesblackst0ne2017-05-041-0/+3
|
* Add last_edited_at and last_edited_by attributesblackst0ne2017-05-041-0/+1
|
* Allow commenting on older versions of the diff and comparisons between diff ↵dm-link-discussion-to-outdated-diffDouwe Maan2017-05-031-9/+13
| | | | versions
* Display issuable state only in notes and issuable descriptionAdam Niedzielski2017-04-191-1/+1
| | | | Closes #30964
* Merge branch '30457-expire-note-destroy' into 'master'Sean McGivern2017-04-121-0/+1
|\ | | | | | | | | | | | | Fix issue's note cache expiration after delete Closes #30457 See merge request !10461
| * Fix issue's note cache expiration after deletemhasbini2017-04-111-0/+1
| |
* | Link to outdated diff in older MR version from outdated diff discussionDouwe Maan2017-04-081-2/+6
|/
* Fix bug where commit comment would not show up in the right discussion on ↵Douwe Maan2017-04-071-2/+2
| | | | the MR page
* Refactor resolvability checks based on typeDouwe Maan2017-04-061-5/+4
|
* Customize Start discussion message according to if the noteable can be ↵Alfredo Sumaran2017-04-051-0/+4
| | | | resolvable
* Remove and ignore notes.original_discussion_id columnDouwe Maan2017-04-051-0/+3
|
* Address review commentsDouwe Maan2017-04-051-1/+3
|
* Address review commentsDouwe Maan2017-04-051-7/+10
|
* Correctly display multiple separate discussions on the same diff lineDouwe Maan2017-04-051-3/+2
|
* Don't use original_discussion_idDouwe Maan2017-04-051-24/+3
|
* Extract commonalities between DiffDiscussion and LegacyDiffDiscussionDouwe Maan2017-04-051-8/+1
|
* Add specsDouwe Maan2017-04-051-5/+22
|
* Better notification emails for notes and (diff) discussionsDouwe Maan2017-04-051-1/+1
|
* Add option to start a new discussion on an MRDouwe Maan2017-04-051-38/+74
|
* Create metadata when creating system notesJarka Kadlecova2017-03-281-1/+1
|
* Add system_note_metadata modelJarka Kadlecova2017-03-281-1/+4
|
* Invalidate ETag cache when note changesAdam Niedzielski2017-03-011-0/+13
|
* add /award slash commandmhasbini2017-02-281-4/+0
| | | | add /award slash command; Allow posting of just an emoji in comment
* Revert "Prefer leading style for Style/DotPosition"Douwe Maan2017-02-231-5/+5
| | | | This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
* Enable Style/WordArrayDouwe Maan2017-02-231-1/+1
|
* Prefer leading style for Style/DotPositionDouwe Maan2017-02-231-5/+5
|
* Gather issuable metadata to avoid n+ queries on index viewissue_25900_2Felipe Artur2017-02-091-0/+6
|
* address commentsJarka Kadlecova2017-01-251-1/+9
|
* Support notes without projectJarka Kadlecova2017-01-181-3/+8
|
* Merge branch 'jej-note-search-uses-finder' into 'security' Douwe Maan2016-12-151-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix missing Note access checks in by moving Note#search to updated NoteFinder Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867 ## Which fixes are in this MR? :warning: - Potentially untested :bomb: - No test coverage :traffic_light: - Test coverage of some sort exists (a test failed when error raised) :vertical_traffic_light: - Test coverage of return value (a test failed when nil used) :white_check_mark: - Permissions check tested ### Note lookup without access check - [x] :white_check_mark: app/finders/notes_finder.rb:13 :download_code check - [x] :white_check_mark: app/finders/notes_finder.rb:19 `SnippetsFinder` - [x] :white_check_mark: app/models/note.rb:121 [`Issue#visible_to_user`] - [x] :white_check_mark: lib/gitlab/project_search_results.rb:113 - This is the only use of `app/models/note.rb:121` above, but importantly has no access checks at all. This means it leaks MR comments and snippets when those features are `team-only` in addition to the issue comments which would be fixed by `app/models/note.rb:121`. - It is only called from SearchController where `can?(current_user, :download_code, @project)` is checked, so commit comments are not leaked. ### Previous discussions - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_13_13 `: download_code` check on commit - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_19_19 `SnippetsFinder` should be used - `SnippetsFinder` should check if the snippets feature is enabled -> https://gitlab.com/gitlab-org/gitlab-ce/issues/25223 ### Acceptance criteria met? - [x] Tests added for new code - [x] TODO comments removed - [x] Squashed and removed skipped tests - [x] Changelog entry - [ ] State Gitlab versions affected and issue severity in description - [ ] Create technical debt issue for NotesFinder. - Either split into `NotesFinder::ForTarget` and `NotesFinder::Search` or consider object per notable type such as `NotesFinder::OnIssue`. For the first option could create `NotesFinder::Base` which is either inherited from or which can be included in the other two. - Avoid case statement anti-pattern in this finder with use of `NotesFinder::OnCommit` etc. Consider something on the finder for this? `Model.finder(user, project)` - Move `inc_author` to the controller, and implement `related_notes` to replace `non_diff_notes`/`mr_and_commit_notes` See merge request !2035
* Feature: delegate all open discussions to IssueBob Van Landuyt2016-12-051-1/+1
| | | | | | | | | | | | | When a merge request can only be merged when all discussions are resolved. This feature allows to easily delegate those discussions to a new issue, while marking them as resolved in the merge request. The user is presented with a new issue, prepared with mentions of all unresolved discussions, including the first unresolved note of the discussion, time and link to the note. When the issue is created, the discussions in the merge request will get a system note directing the user to the newly created issue.
* Merge branch 'events-cache-invalidation' into 'master' Douwe Maan2016-11-281-13/+0
|\ | | | | | | | | | | | | Remove caching of events data This MR removes the caching of events data as this was deemed unnecessary while increasing load on the database. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6578#note_18864037 and 5371da341e9d7768ebab8e159b3e2cc8fad1d827 for more information. See merge request !6578
| * Remove event caching codeYorick Peterse2016-11-231-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flushing the events cache worked by updating a recent number of rows in the "events" table. This has the result that on PostgreSQL a lot of dead tuples are produced on a regular basis. This in turn means that PostgreSQL will spend considerable amounts of time vacuuming this table. This in turn can lead to an increase of database load. For GitLab.com we measured the impact of not using events caching and found no measurable increase in response timings. Meanwhile not flushing the events cache lead to the "events" table having no more dead tuples as now rows are only inserted into this table. As a result of this we are hereby removing events caching as it does not appear to help and only increases database load. For more information see the following comment: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6578#note_18864037
* | Backport Note#commands_changes from EEbackport-commands-paramsDouwe Maan2016-11-241-0/+3
|/
* Does not raise error when Note not found when processing NewNoteWorkerOswaldo Ferreira2016-11-111-0/+1
| | | | - Also remove unnecessary param
* Use CacheMarkdownField for notesNick Thomas2016-10-071-1/+4
|
* Start Frontend work, fix routing problemZ.J. van de Weg2016-09-191-4/+0
|
* prevent authored awardable thumbs votesbarthc2016-08-281-0/+4
| | | | | | prevent authored awardable thumbs votes prevent authored awardable thumbs votes
* Fix Error 500 resulting when loading network graphfix-network-graph-error-500Stan Hu2016-08-201-0/+2
| | | | | | | | `discussion_id` may not be present when the SELECT call for notes does not include this attribute. Don't attempt to set the discussion ID unless the model contains the attribute. Closes #21119, #21128
* Improve performance of MR show pageDouwe Maan2016-08-181-1/+4
|
* Fix MR note discussion IDDouwe Maan2016-08-181-1/+3
|
* Fix class method definitionDouwe Maan2016-08-171-1/+1
|
* Store discussion_id on Note for faster discussion lookup.Douwe Maan2016-08-171-9/+26
|
* Merge branch 'master' into diff-line-comment-vuejsDouwe Maan2016-08-121-0/+1
|\
| * Added concern for a faster "cache_key" methodfaster-cache-keysYorick Peterse2016-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This concern provides an optimized/simplified version of the "cache_key" method. This method is about 9 times faster than the default "cache_key" method. The produced cache keys _are_ different from the previous ones but this is worth the performance improvement. To showcase this I set up a benchmark (using benchmark-ips) that compares FasterCacheKeys#cache_key with the regular cache_key. The output of this benchmark was: Calculating ------------------------------------- cache_key 4.825k i/100ms cache_key_fast 21.723k i/100ms ------------------------------------------------- cache_key 59.422k (± 7.2%) i/s - 299.150k cache_key_fast 543.243k (± 9.2%) i/s - 2.694M Comparison: cache_key_fast: 543243.4 i/s cache_key: 59422.0 i/s - 9.14x slower To see the impact on real code I applied these changes and benchmarked Issue#referenced_merge_requests. For an issue referencing 10 merge requests these changes shaved off between 40 and 60 milliseconds.
* | Show existing discussion when adding new comment on line with a hidden ↵Douwe Maan2016-07-281-1/+0
| | | | | | | | resolved discussion
* | Use sha1 of discussion ID.Douwe Maan2016-07-251-2/+2
| |
* | Collapse/hide resolved discussionsDouwe Maan2016-07-251-2/+4
| |
* | Add resolved_at and resolved_by_id to DiffNoteDouwe Maan2016-07-251-0/+12
|/