Commit Graph

97 Commits

Author SHA1 Message Date
GitLab Bot a089720fb7 Add latest changes from gitlab-org/gitlab@master 2025-05-09 12:12:52 +00:00
GitLab Bot 5a796c91aa Add latest changes from gitlab-org/gitlab@master 2024-11-18 21:26:05 +00:00
GitLab Bot 52982854c8 Add latest changes from gitlab-org/gitlab@master 2024-09-06 21:07:30 +00:00
GitLab Bot 8e1fe70334 Add latest changes from gitlab-org/gitlab@master 2024-04-18 06:14:03 +00:00
GitLab Bot 9445257afe Add latest changes from gitlab-org/gitlab@master 2024-04-12 12:09:45 +00:00
GitLab Bot 4dfb7c94f0 Add latest changes from gitlab-org/gitlab@master 2024-04-11 09:11:31 +00:00
GitLab Bot 489fbfc738 Add latest changes from gitlab-org/gitlab@master 2024-02-13 09:10:00 +00:00
GitLab Bot 7137270698 Add latest changes from gitlab-org/gitlab@master 2023-03-22 06:08:34 +00:00
GitLab Bot 12166c0faf Add latest changes from gitlab-org/gitlab@master 2023-02-16 12:08:03 +00:00
GitLab Bot f9053931de Add latest changes from gitlab-org/gitlab@master 2023-01-05 09:07:31 +00:00
GitLab Bot 7d99ad1b87 Add latest changes from gitlab-org/gitlab@master 2022-12-25 06:07:04 +00:00
GitLab Bot af60c8a79f Add latest changes from gitlab-org/gitlab@master 2022-12-14 09:08:01 +00:00
GitLab Bot 5fe2d74e00 Add latest changes from gitlab-org/gitlab@master 2022-12-09 09:08:55 +00:00
GitLab Bot a16398e10f Add latest changes from gitlab-org/gitlab@master 2022-07-29 18:08:58 +00:00
GitLab Bot 842ac3526c Add latest changes from gitlab-org/gitlab@master 2022-04-08 18:08:29 +00:00
GitLab Bot 389d5aa505 Add latest changes from gitlab-org/gitlab@master 2022-03-15 09:07:33 +00:00
GitLab Bot a40d39ddd2 Add latest changes from gitlab-org/gitlab@master 2022-02-26 00:14:54 +00:00
GitLab Bot da59ce8b21 Add latest changes from gitlab-org/gitlab@master 2021-04-12 18:12:15 +00:00
GitLab Bot 49a897eff9 Add latest changes from gitlab-org/gitlab@master 2020-09-08 09:08:31 +00:00
GitLab Bot bdca097916 Add latest changes from gitlab-org/gitlab@master 2020-08-11 03:11:00 +00:00
GitLab Bot fa7ac2663b Add latest changes from gitlab-org/gitlab@master 2020-06-24 06:09:01 +00:00
GitLab Bot abae8f34f3 Add latest changes from gitlab-org/gitlab@master 2020-03-31 21:08:05 +00:00
GitLab Bot 8f9beefac3 Add latest changes from gitlab-org/gitlab@master 2020-03-23 12:09:47 +00:00
GitLab Bot 17ab40ca08 Add latest changes from gitlab-org/gitlab@master 2020-02-26 15:08:56 +00:00
GitLab Bot c0d8f9f3f9 Add latest changes from gitlab-org/gitlab@master 2020-01-03 09:07:33 +00:00
GitLab Bot cfc792b9ca Add latest changes from gitlab-org/gitlab@master 2019-12-10 07:53:40 +00:00
GitLab Bot abfafe3c57 Add latest changes from gitlab-org/gitlab@master 2019-10-29 00:06:10 +00:00
Stan Hu e24b9c2502 Eliminate Gitaly N+1 queries with notes API
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.
2019-08-22 22:28:47 -07:00
Rémy Coutable 3a2abc1d50
Enable the Layout/ExtraSpacing cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-24 13:05:45 +01:00
blackst0ne b44a2c801a Update specs to rails5 format
Updates specs to use new rails5 format.

The old format:
`get :show, { some: params }, { some: headers }`

The new format:
`get :show, params: { some: params }, headers: { some: headers }`
2018-12-19 10:04:31 +11:00
Mark Chao a63bce1a4b Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
Lin Jen-Shin 4ee08b77bc Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
Jan Provaznik dcdfa04b32 Add discussion API
* adds basic discussions API for issues and snippets
* reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)
2018-03-07 12:27:50 +01:00
Oswaldo Ferreira bf8c20729b Cache merged and closed events data in merge_request_metrics table 2018-01-02 17:45:25 -02:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
haseeb 57d9121127 support ordering of project notes in notes api 2017-11-29 16:22:22 +00:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Jarka Kadlecova 994e7d1359 Create system notes for MR too, improve doc + clean up code 2017-09-14 14:50:32 +02:00
Robert Schilling 915dd57fe2 Add tests for the unmodified header 2017-08-28 17:10:34 +02:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Jacopo ff76adb547 Unnecessary "include WaitForAjax" and "include ApiHelpers"
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs.
Removed unnecessary usage of `api:true`
2017-04-21 22:32:02 +02:00
Toon Claes add5cd996f API: Make the /notes endpoint work with noteable iid instead of id
In API V4 all endpoints were changed so Merge Requests and Issues
should be referred by iid, instead of id. Except the /notes endpoint
was forgotten. So change the endpoints from:

- /projects/:id/issues/:issue_id/notes
- /projects/:id/merge_requests/:merge_request_id/notes

To:

- /projects/:id/issues/:issue_iid/notes
- /projects/:id/merge_requests/:merge_request_iid/notes

For Project Snippets nothing changes.
2017-03-27 15:29:37 +02:00
Sean McGivern 523fb730c2 Merge branch '25437-just-emoji' into 'master'
#25437 Allow posting of just an emoji in comment; add /award slash command

Closes #25437

See merge request !9382
2017-03-01 11:15:51 +00:00
mhasbini 9f949d4e24 add /award slash command
add /award slash command; Allow posting of just an emoji in comment
2017-02-28 22:38:19 +02:00
Robert Schilling 86c58687b2 Return 204 for delete endpoints 2017-02-28 08:32:38 +01:00
Robert Schilling 993c3d14d5 Remove shared example for pagination 2017-02-20 15:39:16 +01:00
Robert Schilling c70dfbc686 Add a custom pagination matcher 2017-02-16 15:38:40 +01:00
Robert Speicher a1f959430b Merge branch 'fix-guest-access-posting-to-notes' into 'security'
Prevent users from creating notes on resources they can't access

See https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2054
2017-01-23 13:54:52 -05:00