summaryrefslogtreecommitdiff
path: root/lib/api/discussions.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42GitLab Bot2020-12-171-0/+1
|
* Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42GitLab Bot2020-11-191-10/+10
|
* Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42GitLab Bot2020-10-211-1/+1
|
* Add latest changes from gitlab-org/gitlab@13-2-stable-eeGitLab Bot2020-07-201-5/+13
|
* Add latest changes from gitlab-org/gitlab@13-1-stable-eeGitLab Bot2020-06-181-0/+2
|
* Add latest changes from gitlab-org/gitlab@12-10-stable-eeGitLab Bot2020-04-201-0/+5
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-251-6/+5
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-241-2/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-241-9/+9
|
* Filter out old system notes for epicsPatrick Derichs2019-08-281-1/+1
|
* Eliminate many Gitaly calls in discussions APIStan Hu2019-08-151-10/+16
| | | | | | | | | | | | | | | | | | | | Previously, the API to retrieve discussions from merge requests often generated hundreds of Gitaly calls to determine whether a system note should be shown to the user. It did this by: 1. Rendering the Markdown 2. Extracting cross-references from the Markdown 3. For cross-references that were commits, a Gitaly FindCommit RPC would be issued to validate that the commit exists. The last step is unnecessary because we don't need to display a commit if the user doesn't have access to the project in the first place. `RendersNotes#prepare_notes_for_rendering` is already used in `MergeRequestsController`, which is why we don't see N+1 Gitaly calls there. We use it here to optimize the note redaction process. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65957
* Use NotesFinder to fetch notes on API and ControllersPatrick Derichs2019-06-191-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix missing iid query on NotesFinder Changed parameters of find_noteable, so changes across a few files were needed. MergeRequest also requires iid instead of id query Make NotesFinder fail with RecordNotFound again Add specs for target_iid Using RSpec tablesyntax for target_iid specs Revert "Using RSpec tablesyntax for target_iid specs" This reverts commit ba45c7f569a. Allow find_by! here Fix variable name Add readable check Revert "Add readable check" This reverts commit 9e3a1a7aa39. Remove unnecessary assignment Add required changes for EE Fix parameter count Reduce code duplication by extracting a noteable module method The call to find_noteable was redundant so multiple files and lines have changed in that commit to use the newly introduced module method `noteable`. Replace casecmp with include check Add parent_type parameter Revert "Reduce code duplication by extracting a noteable module method" This reverts commit 8c0923babff16. Method is no longer needed Check whether noteable can be read by user
* Make `resolvable_types` a class methodBob Van Landuyt2019-06-031-1/+1
| | | | | This turns Notable::RESOLVABLE_TYPES into a `Notable.resolvable_types`. That allows us to override it in EE.
* Allow replying to an individual note in the APIallow-replying-to-individual-notes-from-apiSean McGivern2019-05-061-1/+5
| | | | | | If you can do this in the UI, you should be able to do it in the API. If a discussion is not a single note discussion, or it is replyable, you can reply to it.
* Refactor API noteable types constantsYorick Peterse2019-03-041-3/+1
| | | | | | | | | This replaces API::Notes::NOTEABLE_TYPES and API::Discussions::NOTEABLE_TYPES with class methods defined in a separate helper modules. This allows EE to extend the list of noteable types, without having to modify the constant in-place. We can't define these methods directly in the API classes, as they would be used before we're able to extend them in EE.
* Fix API::Namespaces to accept namepaces with dotsif-52811-fix_namespaces_api_routingImre Farkas2018-11-281-1/+1
| | | | | It also renames the API::PROJECT_ENDPOINT_REQUIREMENTS constant to API::NAMESPACE_OR_PROJECT_REQUIREMENTS
* Enable frozen string in lib/api and lib/backupgfyoung2018-09-291-0/+2
| | | | | | | | | | Partially addresses #47424. Had to make changes to spec files because stubbing methods on frozen objects is a mess in RSpec and leads to failures: https://github.com/rspec/rspec-mocks/issues/1190
* Disable existing offenses for the CodeReuse copsYorick Peterse2018-09-111-0/+4
| | | | | This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
* Merge request and commit discussions APIJan Provaznik2018-05-011-25/+63
|
* Resolve "Make a Rubocop that forbids returning from a block"🙈 jacopo beschi 🙉2018-04-181-5/+5
|
* Add discussion APIjprovazn-apiJan Provaznik2018-03-071-0/+195
* adds basic discussions API for issues and snippets * reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)