summaryrefslogtreecommitdiff
path: root/app/models/discussion.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-11-211-4/+0
|
* Change Note#to_ability_name to 'note'Dylan Griffith2019-10-231-0/+1
| | | | | | This is to be more consistent as there is already a :read_note policy in NotePolicy. To keep other behaviour the same we've introduced a Note#noteable_ability_name that is used anywhere this was expected.
* Add policy check if cross reference system notes are accessibleAlexandru Croitor2019-09-301-0/+1
|
* GraphQL support for Notes created in discussions62826-graphql-note-mutationsLuke Duncalfe2019-07-101-0/+11
| | | | | | | | | | | | A new `discussion_id` argument on the `createNote` mutation allows people to create a note within that discussion. The ability to lazy-load Discussions has been added, so GraphQL.object_from_id can treat Discussions the same as AR objects and batch load them. https://gitlab.com/gitlab-org/gitlab-ce/issues/62826 https://gitlab.com/gitlab-org/gitlab-ee/issues/9489
* Expose comments on Noteables in GraphQLBob Van Landuyt2019-06-141-1/+7
| | | | | | | | | This exposes `Note`s on Issues & MergeRequests using a `Types::Notes::NoteableType` in GraphQL. Exposing notes on a new type can be done by implementing the `NoteableType` interface on the type. The presented object should be a `Noteable`.
* Fix polling for transformed individual notes30299-fix-polling-for-transformed-notesHeinrich Lee Yu2019-02-131-2/+0
| | | | | Sets `updated_at` so that the transformed note is returned together with the new reply
* Add reply to notes to turn into discussionsHeinrich Lee Yu2019-02-061-0/+6
|
* Enable frozen string in app/models/*.rbrepo-forks/gitlab-ce-frozen-string-enable-app-modelsgfyoung2018-07-261-0/+2
| | | | Partially addresses #47424.
* Changes tab VUE refactoringFelipe Artur2018-06-211-0/+4
|
* Allow commenting on individual commits inside an MRDouwe Maan2017-12-071-0/+1
|
* Commenting on image diffsFelipe Artur2017-10-071-0/+4
|
* Add full JSON endpoints for issue notes and discussionsDouwe Maan2017-07-211-0/+4
|
* Fix replying to a commit discussion displayed in the context of an MRDouwe Maan2017-06-011-0/+6
|
* Move includes call to scopedm-discussions-n-plus-1Douwe Maan2017-05-311-1/+1
|
* Resolve N+1 query issue with discussionsDouwe Maan2017-05-291-1/+2
|
* Fix bug where commit comment would not show up in the right discussion on ↵Douwe Maan2017-04-071-9/+9
| | | | the MR page
* Refactor resolvability checks based on typeDouwe Maan2017-04-061-0/+6
|
* Add line breaks in long commentsDouwe Maan2017-04-051-2/+4
|
* Address review commentsDouwe Maan2017-04-051-27/+19
|
* Address review commentsDouwe Maan2017-04-051-0/+1
|
* Don't use original_discussion_idDouwe Maan2017-04-051-19/+4
|
* Extract commonalities between DiffDiscussion and LegacyDiffDiscussionDouwe Maan2017-04-051-75/+6
|
* Add specsDouwe Maan2017-04-051-9/+12
|
* Better notification emails for notes and (diff) discussionsDouwe Maan2017-04-051-0/+4
|
* Add option to start a new discussion on an MRDouwe Maan2017-04-051-81/+71
|
* Feature: delegate all open discussions to IssueBob Van Landuyt2016-12-051-0/+4
| | | | | | | | | | | | | 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.
* Tidy up text emailsSean McGivern2016-11-281-2/+5
|
* Add keyword arguments to truncated_diff methodhhoopes2016-11-251-3/+4
| | | | | * Added keyword arguments to truncated_diff_lines method to allow for using highlighting or not (html templates vs. text) * Tweaked templates for consistency and format appropriateness
* Change diff highlight/truncate for reusabilityhhoopes2016-11-251-5/+7
| | | | | | Previously the `truncated_diff_lines` method for outputting a discussion diff took in already highlighted lines, which meant it wasn't reuseable for truncating ANY lines. In the way it was used, it also meant that for any email truncation, the whole diff was being highlighted before being truncated, meaning wasted time highlighting lines that wouldn't even be used (granted, they were being memoized, so perhaps this wasn't that great of an issue). I refactored truncation away from highlighting, in order to truncate formatted diffs for text templates in email, using `>`s to designate each line, but otherwise retaining the parsing already done to create `diff_lines`. Additionally, while notes on merge requests or commits had already been tested, there was no existing test for notes on a diff on an MR or commit. Added mailer tests for such, and a unit test for truncating diff lines.
* Optimize discussion notes resolving and unresolving21109-discussion-resolve-runs-a-single-update-query-per-note-but-should-run-a-single-update-query-for-all-notes-insteadAlejandro Rodríguez2016-09-061-12/+27
| | | | | | | 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
* Fix bug where notes weren’t shown in discussion when the code had changed ↵Douwe Maan2016-08-191-0/+1
| | | | after creation
* Store discussion_id on Note for faster discussion lookup.Douwe Maan2016-08-171-2/+2
|
* Address review feedbackDouwe Maan2016-08-161-0/+2
|
* Add specs for Discussion and MergeRequest modelsDouwe Maan2016-08-121-3/+5
|
* Merge branch 'master' into diff-line-comment-vuejsDouwe Maan2016-08-031-3/+15
|\ | | | | | | | | | | # Conflicts: # app/models/discussion.rb # db/schema.rb
| * Speedup DiffNote#active? on discussions, preloading noteables and avoid ↵Paco Guzman2016-08-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Use correct user for 'Discussion resolved by...'Douwe Maan2016-07-281-1/+12
| |
* | Fixed close merge request not hidingPhil Hughes2016-07-271-1/+1
| |
* | Fix Discussion#resolved? to be false for commit discussionsDouwe Maan2016-07-261-1/+1
| |
* | Add resolved and last updated status to collapsed discussionsDouwe Maan2016-07-251-0/+8
| |
* | Collapse/hide resolved discussionsDouwe Maan2016-07-251-1/+13
| |
* | Add access checks for diff note and discussion resolutionDouwe Maan2016-07-251-0/+8
| |
* | Add methods to resolve diff notes and discussionsDouwe Maan2016-07-251-0/+12
| |
* | Add resolved methods on DiscussionDouwe Maan2016-07-251-1/+19
|/
* Add Discussion model to represent MR/diff discussiondiscussion-modelDouwe Maan2016-07-201-0/+91