summaryrefslogtreecommitdiff
path: root/app/models/note.rb
Commit message (Collapse)AuthorAgeFilesLines
* Changes tab VUE refactoringFelipe Artur2018-06-211-0/+1
|
* Fix an N+1 in avatar URLsSean McGivern2018-06-051-0/+4
| | | | | | | | | | | | | | | | This is tricky: the query was being run in `ObjectStorage::Extension::RecordsUploads#retrieve_from_store!`, but we can't just add batch loading there, because the `#upload=` method there would use the result immediately, making the batch only have one item. Instead, we can pre-emptively add an item to the batch whenever an avatarable object is initialized, and then reuse that batch item in `#retrieve_from_store!`. However, this also has problems: 1. There is a lot of logic in `Avatarable#retrieve_upload_from_batch`. 2. Some of that logic constructs a 'fake' model for the batch key. This should be fine, because of ActiveRecord's override of `#==`, but it relies on that staying the same.
* Persist truncated note diffs on a new table45190-create-notes-diff-filesOswaldo Ferreira2018-05-241-1/+3
| | | | | 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.
* Backport 5480-epic-notifications from EEMario de la Ossa2018-05-071-4/+0
|
* Merge branch 'jprovazn-comment-refs' into 'master'Sean McGivern2018-04-051-0/+4
|\ | | | | | | | | Better group support in notes-related code See merge request gitlab-org/gitlab-ce!18150
| * Better group support notes-related codeJan Provaznik2018-04-051-0/+4
| | | | | | | | | | | | | | Updates notes-related services and rendering so this code can be easily used for group-scoped resources (specifically Epics). Related to gitlab-ee!5205
* | Merge branch 'jej/mattermost-notification-confidentiality-10-6' into ↵Douwe Maan2018-04-051-0/+4
|/ | | | | | | | | | 'security-10-6' [10.6] Prevent notes on confidential issues from being sent to chat See merge request gitlab/gitlabhq!2366 # Conflicts: # app/helpers/services_helper.rb
* Refactor discussions/notes codeJan Provaznik2018-04-031-2/+5
|
* Add discussion APIjprovazn-apiJan Provaznik2018-03-071-2/+7
| | | | | * adds basic discussions API for issues and snippets * reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)
* Render MR Notes with Vue with behind a cookieFatih Acet2018-02-281-0/+1
|
* Add foreign keys to todos table.Andreas Brandl2018-02-051-1/+1
| | | | Fixes #32282.
* use Gitlab::UserSettings directly as a singleton instead of ↵Mario de la Ossa2018-02-021-2/+1
| | | | including/extending it
* port of 594e6a0a625^..f74c90f68c6Micaël Bergeron2018-02-011-0/+1
|
* Make discussion mail References all notes in the discussiontc-correct-email-in-reply-toToon Claes2017-12-131-4/+5
| | | | | | | | | When a note is part of a discussion, the email sent out will be `In-Reply-To` the previous note in that discussion. It also `References` all the previous notes in that discussion, and the original issue. Closes gitlab-org/gitlab-ce#36054.
* Make mail notifications of discussion notes In-Reply-To of each otherToon Claes2017-12-131-0/+9
| | | | | | | When a note is part of a discussion, the email sent out should be `In-Reply-To` the previous note in that discussion. Closes gitlab-org/gitlab-ce#36054
* Return the noteable in Note#touch_noteablenoteable-touch-return-objectYorick Peterse2017-12-121-0/+3
| | | | | This allows EE to re-use the object, making it easier to trigger indexing of the noteable.
* cache the Note#commit methodmicael.bergeron2017-12-071-8/+6
|
* add support for commit (in mr) to reference filtermicael.bergeron2017-12-071-0/+4
|
* Allow commenting on individual commits inside an MRDouwe Maan2017-12-071-1/+5
|
* Throttle the number of UPDATEs triggered by touchYorick Peterse2017-12-061-1/+35
| | | | | | | This throttles the number of UPDATE queries that can be triggered by calling "touch" on a Note, Issue, or MergeRequest. For Note objects we also take care of updating the associated "noteable" relation in a smarter way than Rails does by default.
* Use fuzzy search with minimum length of 3 characters where appropriatedm-search-patternDouwe Maan2017-11-271-1/+1
|
* Use Gitlab::SQL::Pattern where appropriateDouwe Maan2017-11-241-0/+5
|
* add `#with_metadata` scope to remove a N+1 from the notes' APImicael.bergeron2017-11-211-0/+1
|
* reverting to the simpler approachmicael.bergeron2017-11-161-1/+13
|
* CE port of code changed for epicsjk-epic-changes-ce-portJarka Kadlecova2017-11-021-2/+6
|
* Merge branch 'security-10-1' into '10-1-stable'Jen-Shin Lin2017-10-171-1/+1
| | | | | Security fixes for 10.1 RC See merge request gitlab/gitlabhq!2209
* Commenting on image diffsFelipe Artur2017-10-071-4/+12
|
* add controller specmicael.bergeron2017-09-061-7/+4
| | | | also fix some code styling issues
* rework the contributor badgemicael.bergeron2017-09-061-0/+5
| | | | | - only show in merge-requests - show as a little glyph
* round of fixes after code reviewmicael.bergeron2017-09-061-3/+11
|
* WIP: refactor the first-contributor to Issuablemicael.bergeron2017-09-061-1/+24
| | | | | | | this will remove the need make N queries (per-note) at the cost of having to mark notes with an attribute this opens up the possibility for other special roles for notes
* Fix specsDouwe Maan2017-08-301-1/+1
|
* Prefer polymorphism over `is_a?`Douwe Maan2017-08-171-3/+3
|
* Merge branch 'master' into issue-discussions-refactorFilipa Lacerda2017-08-101-10/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (42 commits) alternative route for download archive Add missing command to compile GetText files Prevent user from changing username with container registry tags Rename RPC 'Exists' to 'RepositoryExists' Fix the sticky changes bar on commits page Fix ee_compat_check when EE branch uses a prefix Removed display styles when hiding the fly out navigation Explain why we use select all for project_url_constrainer.rb Fix pikaday being undefined Add a helper to stub storage settings with defaults Enable the Layout/SpaceBeforeBlockBraces cop update Install from Source instructions Translations can be picked without asking for exceptions Ask for exceptions in advance Don't require stackprof in Gemfile Synchronous Korean translation in zanata Use full path of user's avatar in webhooks Update icon color on hover Align all nav items in sidebar Fix height of collapsed sidebar items ...
| * Enable the Layout/SpaceBeforeBlockBraces coprc/enable-the-Layout/SpaceBeforeBlockBraces-copRémy Coutable2017-08-091-10/+10
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Expire ETag cache on note when award emoji changesSean McGivern2017-07-211-11/+11
|/
* Cache Note#notable for commits and fix testsrequest-store-wrapLin Jen-Shin2017-07-181-1/+1
|
* Added Cop to blacklist the use of `dependent:`Yorick Peterse2017-07-061-2/+2
| | | | | | | | This is allowed for existing instances so we don't end up 76 offenses right away, but for new code one should _only_ use this if they _have_ to remove non database data. Even then it's usually better to do this in a service class as this gives you more control over how to remove the data (e.g. in bulk).
* Create and use project path helpers that only need a project, no namespaceDouwe Maan2017-07-051-2/+1
|
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-3/+3
|
* Rename "Slash commands" to "Quick actions"Eric Eastwood2017-06-151-1/+1
| | | | | | | | | | | | | Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/27070 Deprecate "chat commands" in favor of "slash commands" We looked for things like: - `slash commmand` - `slash_command` - `slash-command` - `SlashCommand`
* Added Cop to blacklist polymorphic associationsYorick Peterse2017-06-071-1/+1
| | | | | | | | One should really use a separate table instead of using polymorphic associations. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11168 for more information.
* Merge remote-tracking branch 'origin/master' into ↵Luke "Jared" Bennett2017-06-021-1/+1
|\ | | | | | | fix-realtime-edited-text-for-issues-9-3
| * Move includes call to scopedm-discussions-n-plus-1Douwe Maan2017-05-311-1/+1
| |
* | Port fix-realtime-edited-text-for-issues 9-2-stable fix to master.Luke "Jared" Bennett2017-05-311-0/+1
|/
* Address reviewDouwe Maan2017-05-241-6/+1
|
* Fix specsdm-outdated-system-noteDouwe Maan2017-05-231-2/+5
|
* Add system note with link to diff comparison when MR discussion becomes outdatedDouwe Maan2017-05-231-8/+9
|
* Add comment to notes aliasesblackst0ne2017-05-041-0/+2
|
* Add alias_attributes for notesblackst0ne2017-05-041-0/+3
|