summaryrefslogtreecommitdiff
path: root/lib/api/helpers/notes_helpers.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2023-01-091-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2023-01-051-1/+13
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2022-12-251-13/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2022-12-141-1/+13
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2022-12-011-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-10-271-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-05-111-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-03-161-3/+3
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-01-261-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-10-291-4/+6
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-07-291-2/+3
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-05-271-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-231-0/+5
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-241-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-241-5/+5
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-231-1/+9
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-131-0/+2
|
* Filter out old system notes for epicsPatrick Derichs2019-08-281-3/+3
|
* Eliminate Gitaly N+1 queries with notes APIsh-eliminate-gitaly-nplus-one-notesStan Hu2019-08-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | Similar to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31834, we see that in https://gitlab.com/gitlab-org/gitlab-ce/issues/65957 there can be hundreds, even thousands, of Gitaly requests in the `/api/:version/projects/:id/merge_requests/:noteable_id/notes` endpoint. Previously, the API to retrieve notes 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. Issuing a Gitaly `FindCommit` RPC for every reference 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.
* Use NotesFinder#target to find Epics12026-use-notes-finder-target-for-epics-cePatrick Derichs2019-08-041-3/+9
|
* 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
* Simplify result of find_noteablepderichs-52123Patrick Derichs2019-06-191-3/+1
|
* Use NotesFinder to fetch notes on API and ControllersPatrick Derichs2019-06-191-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge branch 'resolve-lib-differences' into 'master'Robert Speicher2019-03-121-0/+6
|\ | | | | | | | | Resolve CE to EE differences in the lib/api directory See merge request gitlab-org/gitlab-ce!25430
| * Refactor API noteable types constantsYorick Peterse2019-03-041-0/+6
| | | | | | | | | | | | | | | | | | 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.
* | Forbid creating discussions for users with restricted accessIgor Drozdov2019-03-041-11/+3
|/
* 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
* Use policies to determine if attributes can be set in the APISean McGivern2018-08-221-4/+1
| | | | This is more idiomatic than checking membership explicitly.
* Allow date parameters on Issues and Notes API for group ownersFlorent Dubois2018-08-221-1/+1
| | | | | | | - Allow `created_at` and `updated_at` parameters on Issues API - Allow `created_at` on Issue Notes API Closes gitlab-org/gitlab-ce#40059
* Resolve "do not set updated_at when creating note"Kia Mei Somabes2018-07-121-0/+2
|
* Merge request and commit discussions APIJan Provaznik2018-05-011-7/+49
|
* Resolve "Namespace factory is problematic"Lin Jen-Shin2018-04-231-1/+3
|
* Add discussion APIjprovazn-apiJan Provaznik2018-03-071-0/+76
* adds basic discussions API for issues and snippets * reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)