Commit Graph

113 Commits

Author SHA1 Message Date
Rémy Coutable 26978cb270
[API] Omit X-Total{,-Pages} when count > 10k
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-22 18:13:04 +01:00
Grzegorz Bizon 8707827d39 Improve readablity of CI_API_V4_URL related code 2019-01-04 15:32:40 +01:00
Grzegorz Bizon 476cba6ff3 Minor improvements to CI_API_V4_URL variable exposure 2019-01-03 14:18:05 +01:00
Grzegorz Bizon f10fe3ae97 Add API::Helpers::Version and expose API root URL
This commits adds a new class that is supposed to represent Grape API
version, like `v3` or `v4`.
2019-01-03 14:18:05 +01:00
Heinrich Lee Yu e0f0c29b0c Support lowercase none / any 2018-10-26 10:47:14 +08:00
Heinrich Lee Yu bf1ed85a9d Refactor api validator to separate class 2018-10-26 10:32:14 +08:00
gfyoung 3836d69119 Enable frozen string in lib/api and lib/backup
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
2018-09-29 21:04:50 -07:00
Robert Speicher c7d1eef671 Merge branch 'rubocop-code-reuse' into 'master'
Add RuboCop cops to enforce code reusing rules

See merge request gitlab-org/gitlab-ce!21391
2018-09-13 14:53:05 +00:00
Steve 175f689eb7 Initialize projects with readme 2018-09-12 13:58:31 +00:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Sean McGivern aff7dccc1f Use policies to determine if attributes can be set in the API
This is more idiomatic than checking membership explicitly.
2018-08-22 14:17:29 +01:00
Florent Dubois b63ed7cff6 Allow date parameters on Issues and Notes API for group owners
- Allow `created_at` and `updated_at` parameters on Issues API
- Allow `created_at` on Issue Notes API

Closes gitlab-org/gitlab-ce#40059
2018-08-22 12:16:48 +01:00
Francisco Javier López 🌴 On vacation; back on August 22th! 4b36f74bfe Fix bug setting http headers in Files API 2018-08-01 16:48:33 +00:00
🙈 jacopo beschi 🙉 046796cc3a Resolve "API endpoint that returns all members, including the inherited membership through ancestor group" 2018-07-25 21:45:42 +00:00
Kia Mei Somabes 37af75a2e0 Resolve "do not set updated_at when creating note" 2018-07-12 09:26:09 +00:00
Ahmet Demir 80f4e7575e Add SHA256 and HEAD on File API 2018-06-28 06:10:51 +00:00
Tomasz Maczukin a6a900256e
Change update entrypoint instead of adding new keep-alive one 2018-06-07 18:45:48 +02:00
Stan Hu 990af4fb5d Replace grape-route-helpers with our own grape-path-helpers
This gem (https://gitlab.com/gitlab-org/grape-path-helpers) makes a number of changes:

1. Brings in @mdelaossa's changes in https://github.com/reprah/grape-route-helpers/pull/21
2. Fixes some broken specs and code for Grape 1.0+
3. Optimizes the generation of paths by bringing in @dblessing's
   HashWithIndifferentAccess changes in https://gitlab.com/gitlab-org/gitlab-ce/issues/45718#note_70123793

Closes #45718
2018-05-30 03:15:03 -07:00
Grzegorz Bizon cfdd80ec10 Merge branch 'zj-internal-repo-path' into 'master'
Don't pass the repository path to Gitlab Shell

See merge request gitlab-org/gitlab-ce!19011
2018-05-28 08:13:58 +00:00
Yorick Peterse 4d3b313a90 Merge branch 'ab-42194-keyset-pagination' into 'master'
API: Keyset pagination support

Closes #45756

See merge request gitlab-org/gitlab-ce!18584
2018-05-22 11:19:34 +00:00
Francisco Javier López 0af4c56cff Fix `expose_url` helper does not include custom base url if it is set 2018-05-22 08:54:20 +00:00
Andreas Brandl f5c4203121 Add feature-flag for keyset pagination. 2018-05-21 18:02:41 +02:00
Andreas Brandl f8aee5b086 Add keyset pagination for API calls.
Closes #45756.
2018-05-21 18:02:41 +02:00
Andreas Brandl cc1d141127 Refactor and extract DefaultPaginationStrategy. 2018-05-21 18:02:40 +02:00
Zeger-Jan van de Weg a33d591602
Don't pass the repository path to Gitlab Shell
This isn't a requirement, and removes deprecated method calls
2018-05-17 15:19:32 +02:00
Jan Provaznik 7a76caa5a8 Merge request and commit discussions API 2018-05-01 12:39:44 +00:00
Roger Rüttimann bc7877e8c1 show only groups an admin is a member of in dashboards/grops 2018-05-01 09:24:21 +00:00
Lin Jen-Shin ab286656b2 Resolve "Namespace factory is problematic" 2018-04-23 15:48:26 +00:00
Nick Thomas 672733aa66
Add an API endpoint to download git repository snapshots 2018-04-19 17:25:01 +01:00
Bob Van Landuyt 11a9fbe65b Make the API project params reusable 2018-04-04 19:49:48 +02:00
Jacob Vosmaer (GitLab) b942462788 Remove support for absolute dirs from Git::Env 2018-03-30 09:19:46 +00:00
Alejandro Rodríguez cf1a1e9ac1 Send Gitaly payload for git-upload-archive SSH commands 2018-03-21 10:57:06 -03:00
Toon Claes 3802006436 Respect the protocol in `expose_url`
When https is configured in the URL, also use that, and do not set it
to http.

Closes gitlab-org/gitlab-ee#5217
2018-03-12 15:34:11 +01:00
Douwe Maan 82ea46a707 Merge branch 'gitaly-git-mandatory' into 'master'
Make git push mandatory

See merge request gitlab-org/gitlab-ce!17565
2018-03-07 15:57:45 +00:00
Sean McGivern 1da5a103ac Merge branch 'jprovazn-api' into 'master'
Add discussion API

See merge request gitlab-org/gitlab-ce!17510
2018-03-07 13:37:50 +00: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
Kim "BKC" Carlbäcker 3c0f6da546 Make git push mandatory 2018-03-06 15:17:00 +01:00
Francisco Javier López 8fe880dc06 Projects and groups badges API 2018-03-05 17:51:40 +00:00
Dylan Griffith b5a5fdf0e3 Persist runner IP address on contact (#43489) 2018-02-28 11:54:37 +11:00
Markus Koller b7cd99c376
Allow including custom attributes in API responses 2018-02-08 13:30:34 +01:00
Sean McGivern b7a2ce52ed Merge branch '41763-search-api' into 'master'
Search API

Closes #41763

See merge request gitlab-org/gitlab-ce!16878
2018-02-07 14:33:29 +00:00
Kamil Trzciński 9bd044d9a7 Merge branch '38265-stuckcijobsworker-wrongly-detects-cancels-stuck-builds-when-per-job-timeout-is-more-than-an-hour' into 'master'
Resolve "StuckCiJobsWorker wrongly detects, cancels 'stuck' builds when per-job timeout is more than an hour"

Closes #38265, #42196, and #42750

See merge request gitlab-org/gitlab-ce!16756
2018-02-07 12:44:23 +00:00
Jarka Kadlecová 1b2400b529 Return only limited pagination headers for search API endpoints 2018-02-06 17:58:18 +01:00
Tiago Botelho 1e56b3f476 Moves project creationg to git access check for git push 2018-02-06 16:52:29 +00:00
Tiago Botelho dc229c076c Abstracts ProjectMoved and ProjectCreated into a BaseProject 2018-02-06 13:35:35 +00:00
Tiago Botelho e42a548f1d Move new project on push logic to a service 2018-02-06 13:35:35 +00:00
Tiago Botelho bc78ae6985 Add specs 2018-02-06 13:35:35 +00:00
Tiago Botelho 32b2ff2601 Adds remote messsage when project is created in a push over SSH or HTTP 2018-02-06 13:35:35 +00:00
Matija Čupić 3366f377c1
Merge branch 'master' into 38265-stuckcijobsworker-wrongly-detects-cancels-stuck-builds-when-per-job-timeout-is-more-than-an-hour 2018-02-04 23:38:59 +01:00
Matija Čupić 38c242126d
Refactor runner attribute caching implementation 2018-02-04 18:34:21 +01:00