summaryrefslogtreecommitdiff
path: root/app/controllers/projects/notes_controller.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2023-02-091-1/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2022-10-251-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2022-05-131-0/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-12-011-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-11-111-0/+8
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-10-271-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-03-251-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-03-161-3/+3
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-02-191-17/+0
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-02-111-2/+5
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-02-091-0/+14
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-11-101-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-10-081-0/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-181-1/+1
|
* Add edit_note and spec for editing quick actionsPatrick Derichs2019-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call QuickActionsService on Note update Add support for notes which just contain commands after editing Return http status gone (410) if note was deleted Temporary frontend addition so it is not failing when a note is deleted Move specs to shared examples Fix rubocop style issue Deleting note on frontend when status is 410 Use guard clause for note which got deleted Simplified condition for nil note This method should no longer be called with nil note Refactoring of execute method to reduce complexity Move errors update to delete_note method Note is now deleted visually when it only contains commands after update Add expectation Fix style issues Changing action to fix tests Add tests for removeNote and update deleteNote expectations
* Use NotesFinder in IssuableActions modulePatrick Derichs2019-08-011-1/+1
| | | | | | | | | | Remove project from NotesFinder constructor Add project parameter to specs Also look for methods in private scope Fix specs to match new NotesFinder constructor
* Resolve "Filter discussion (tab) by comments or activity in issues and merge ↵Oswaldo Ferreira2018-10-231-1/+1
| | | | requests"
* Enable even more frozen string in app/controllersgfyoung2018-09-251-0/+2
| | | | | | | | | | | | Enables frozen string for some vestigial files as well as the following: * app/controllers/projects/**/*.rb * app/controllers/sherlock/**/*.rb * app/controllers/snippets/**/*.rb * app/controllers/users/**/*.rb Partially addresses #47424.
* Show the status of a user in interactionsBob Van Landuyt2018-07-301-1/+2
| | | | | | | | | | | | | | | The status is shown for - The author of a commit when viewing a commit - Notes on a commit (regular/diff) - The user that triggered a pipeline when viewing a pipeline - The author of a merge request when viewing a merge request - The author of notes on a merge request (regular/diff) - The author of an issue when viewing an issue - The author of notes on an issue - The author of a snippet when viewing a snippet - The author of notes on a snippet - A user's profile page - The list of members of a group/user
* Clean up `notes_controller`blackst0ne2018-05-141-13/+0
|
* Merge request and commit discussions APIJan Provaznik2018-05-011-3/+1
|
* Support Markdown rendering using multiple projectsrendering-markdown-multiple-projectsYorick Peterse2018-04-111-1/+1
| | | | | | | | | | | | | | | | | | | This refactors the Markdown pipeline so it supports the rendering of multiple documents that may belong to different projects. An example of where this happens is when displaying the event feed of a group. In this case we retrieve events for all projects in the group. Previously we would group events per project and render these chunks separately, but this would result in many SQL queries being executed. By extending the Markdown pipeline to support this out of the box we can drastically reduce the number of SQL queries. To achieve this we introduce a new object to the pipeline: Banzai::RenderContext. This object simply wraps two other objects: an optional Project instance, and an optional User instance. On its own this wouldn't be very helpful, but a RenderContext can also be used to associate HTML documents with specific Project instances. This work is done in Banzai::ObjectRenderer and allows us to reuse as many queries (and results) as possible.
* Render MR Notes with Vue with behind a cookieFatih Acet2018-02-281-7/+23
|
* Track and act upon the number of executed queriesquery-countsYorick Peterse2018-02-011-0/+5
| | | | | | | | | | | This ensures that we have more visibility in the number of SQL queries that are executed in web requests. The current threshold is hardcoded to 100 as we will rarely (maybe once or twice) change it. In production and development we use Sentry if enabled, in the test environment we raise an error. This feature is also only enabled in production/staging when running on GitLab.com as it's not very useful to other users.
* Replace factory_girl_rails with factory_bot_railsrc/use-factory_bot_railsRémy Coutable2017-12-141-1/+1
| | | | | | | | | | | I've followed the [upgrade guide](https://github.com/thoughtbot/factory_bot/blob/4-9-0-stable/UPGRADE_FROM_FACTORY_GIRL.md) and ran these two commands: ``` grep -e FactoryGirl **/*.rake **/*.rb -s -l | xargs sed -i "" "s|FactoryGirl|FactoryBot|" grep -e factory_girl **/*.rake **/*.rb -s -l | xargs sed -i "" "s|factory_girl|factory_bot|" ``` Signed-off-by: Rémy Coutable <remy@rymai.me>
* Adds Rubocop rule for line break after guard clauseJacopo2017-11-161-0/+1
| | | | Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
* Create system notes for MR too, improve doc + clean up codeJarka Kadlecova2017-09-141-6/+1
|
* Check the discussion lock only for issuables & clean styleJarka Kadlecova2017-09-141-1/+1
|
* Support discussion locking in the backendJarka Kadlecova2017-09-141-0/+14
|
* Support comments for personal snippetsJarka Kadlecova2017-05-051-44/+0
|
* Display comments for personal snippets12910-personal-snippets-notes-showJarka Kadlecova2017-05-021-125/+14
|
* Remove unused codeDouwe Maan2017-04-051-2/+1
|
* Address review commentsDouwe Maan2017-04-051-1/+1
|
* Correctly display multiple separate discussions on the same diff lineDouwe Maan2017-04-051-3/+3
|
* Don't use original_discussion_idDouwe Maan2017-04-051-6/+1
|
* Add specsDouwe Maan2017-04-051-7/+7
|
* Fix some specsDouwe Maan2017-04-051-0/+2
|
* Add option to start a new discussion on an MRDouwe Maan2017-04-051-38/+48
|
* Remove query parameters from notes polling endpoint to make caching easierAdam Niedzielski2017-03-011-1/+6
|
* add /award slash commandmhasbini2017-02-281-9/+2
| | | | add /award slash command; Allow posting of just an emoji in comment
* Fix inconsistent naming for services that delete thingsdixpac2017-02-081-1/+1
| | | | | | * Changed name of delete_user_service and worker to destroy * Move and change delete_group_service to Groups::DestroyService * Rename Notes::DeleteService to Notes::DestroyService
* support `/merge` slash comand for MRsJarka Kadlecova2017-01-111-1/+2
|
* Merge branch 'jej-note-search-uses-finder' into 'security' Douwe Maan2016-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Backport Note#commands_changes from EEbackport-commands-paramsDouwe Maan2016-11-241-0/+1
|
* Backport some changes done from Time Tracking feature in EE.ee-870-backportRuben Davila2016-11-181-12/+13
|
* Merge branch 'diff-line-comment-vuejs' into 'master' Douwe Maan2016-08-191-1/+33
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Diff line comments resolve ## What does this MR do? Diff line comments can be resolved. Part of #10325 To do: - [x] Backend (@DouweM) - [x] Fix https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5022#note_13319326. Will be made easier by https://gitlab.com/gitlab-org/gitlab-ce/issues/17237#note_13370331 - [x] System note when all discussions are resolved - [x] Notification when all discussions are resolved - [x] Write unit tests - [x] Look at resolve time https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5022#note_13912743 - Fixed by 4a13aa9 - [x] Frontend (@iamphill) - [x] Fix bugs - [x] Write more feature tests - [x] Frontend (@connorshea) - [x] Address frontend feedback - [x] Feature specs for Jump feature - [x] Documentation - [x] Add Vue.js in a standard way See merge request !5022
| * Address review feedbackDouwe Maan2016-08-161-2/+2
| |
| * Add specs for NotesController and DiscussionsControllerDouwe Maan2016-08-121-1/+1
| |
| * Actually don't send resolved notifications when deleting a noteDouwe Maan2016-08-041-0/+2
| |
| * Don't send resolved notifications when deleting a noteDouwe Maan2016-07-281-2/+0
| |