Commit graph

4054 commits

Author SHA1 Message Date
Sebastian Ziebell
56b3223945 Fixes test that checks status code of hook creation 2013-02-08 18:19:59 +01:00
Sebastian Ziebell
40e7846f3e Status code 404 returned when retrieving non existent branch (issue #2922)
Accessing a repository branch that does not exist returns a 404 error instead
of 200 now. Added a test.
2013-02-08 17:04:08 +01:00
Sebastian Ziebell
9544f90389 Adding a project hook returns status code 400 if url is not given
When adding a project hook a url must be specified or a 400 error code is returned

* Specs added to check status code on handling project hooks
* refactored code, extracted a method
2013-02-08 16:48:05 +01:00
Sebastian Ziebell
818caf0b5d API: refined status code handling when adding or updating a project member
When a user is added to a project that is already a member of, a status code 201 is now returned to
signal an idempotent operation. If something fails then instead of returning error code 404 different
more specific error codes are returned. Status code 400 (Bad request) is returned when a required
attribute, e.g. `access_level` is not given or 422 if there is a semantic error, e.g. should
the `access_level` have an unsupported value.

Specs are added to check these status codes.
2013-02-08 14:33:29 +01:00
Sebastian Ziebell
8045a81bcf Merge branch 'master' into fixes/api 2013-02-08 10:32:42 +01:00
Dmitriy Zaporozhets
2f0a75ab77 GitLab meta to 5.0 2013-02-08 08:55:39 +02:00
Dmitriy Zaporozhets
4b58030207 Merge pull request #2936 from jameswritescode/fix_installation_doc_typo
fix the gitlab-shell clone url in master installation doc
2013-02-07 22:41:19 -08:00
James Newton
d4c24b990f fix the gitlab-shell clone url 2013-02-07 11:53:37 -06:00
Dmitriy Zaporozhets
66121d6caa Improve devise views 2013-02-07 13:20:33 +02:00
Dmitriy Zaporozhets
210e9cd489 It should be 5.0.0pre 2013-02-07 13:05:30 +02:00
Dmitriy Zaporozhets
4e1757bfda Merge branch 'gitlab-shell' of dev.gitlabhq.com:gitlab/gitlabhq 2013-02-07 08:26:39 +00:00
Dmitriy Zaporozhets
d09d87e3b0 fix deploy key spec 2013-02-07 10:25:47 +02:00
Dmitriy Zaporozhets
cdcf69d0d9 gitlab;shell init script 2013-02-07 10:06:39 +02:00
Dmitriy Zaporozhets
8ae1d812dc deploy keys support for gitlab-shell api 2013-02-07 09:56:13 +02:00
Dmitriy Zaporozhets
48628d31d5 dont allow duplicates in ssh keys 2013-02-07 09:42:22 +02:00
Sebastian Ziebell
5d8a99f104 Test to check a user must be part of the team to see project.
A user must be part of the team to see a protected project. A test is given
to check that a 404 error is returned if the user can not see the project.
2013-02-06 17:11:01 +01:00
Sebastian Ziebell
a534c9b72d A few fixes in documentation to notes, updates infos on status codes
A few fixes in the notes URI pattern (`notes` instead of `:notes`), also updated
the information to status codes. If `body` attribute is missing from a POST request
a status code 400 (Bad request) is returned. This reflects the code changes from
the previous commit.
2013-02-06 17:11:00 +01:00
Sebastian Ziebell
bb24275f8d Status code 400 is returned if body is missing on note creation.
If a note is created with a POST request via API (`/projects/:id/notes`) status
code 400 is returned instead of 404. The resource itself exists but the request
is incomplete. Specs added to check different status codes when accessing, creating
and updating notes.
2013-02-06 17:11:00 +01:00
Sebastian Ziebell
b9d40d2524 Tests added to check status codes when handling milestone via API
A few more tests added to check status code when creating or updating milestones.
2013-02-06 17:11:00 +01:00
Sebastian Ziebell
5be0265fe7 Status code 400 returned if title not given in a milestone (via API)
If a milestone is created via API but no title given then status code 400 (Bad request)
is returned instead of 404. A small helper method handles the errors collection of a
milestone.
2013-02-06 17:10:29 +01:00
Sebastian Ziebell
41e93bbfe2 Test added to check creation of note to a non-existent MR via API 2013-02-06 17:05:55 +01:00
Sebastian Ziebell
f978a71f41 Creating MR comment without a note returns status code 400 (Bad request)
Creating a comment to an existing merge request via API without providing a note
returns a status code 400 now, suggesting a bad request. The reason for this
is the resource itself (MR) exists but the required property is not set.
2013-02-06 17:02:30 +01:00
Sebastian Ziebell
3f4e215c80 Extracted helper method to avoid code duplication 2013-02-06 17:02:30 +01:00
Sebastian Ziebell
413952ff94 Creating or updating a MR returns more informative status codes.
Using the API library to create or update a merge request at the moment a 404 error is returned.
This is fine when the merge request in question does not exist, but does not provide good
information that for example a required attribute is missing.
A status code of 400 (Bad request) is returned when creating or updating a merge request
when either `source_branch` or `target_branch` is missing. A status code of 409 is returned
when `source_branch` and `target_branch` are the same. Tests are added for these cases.
2013-02-06 16:57:00 +01:00
Jon Evans
6474797d1c Update app/views/admin/users/_form.html.haml 2013-02-06 09:27:09 -05:00
Jon Evans
c9777518e3 Ruby 1.9 hash syntax 2013-02-06 09:26:46 -05:00
Jon Evans
4ce3ef41de Disable autocomplete for admin/users form
Fixes #2796
2013-02-06 08:50:35 -05:00
Marin Jankovski
1b4ba3eb99 Add user delete option. 2013-02-06 12:44:09 +01:00
Dmitriy Zaporozhets
4bfb98ddc9 Merge pull request #2877 from former03/feature_groups_api
Add groups api
2013-02-06 03:19:29 -08:00
Dmitriy Zaporozhets
18fc090052 remove hooks and support scripts from main repo. Moved to gitlab-shell 2013-02-05 15:59:40 +02:00
Dmitriy Zaporozhets
bd3288e320 api check call 2013-02-05 15:55:49 +02:00
Dmitriy Zaporozhets
0a20f7e75e Merge pull request #2906 from redorkulated/patch-4
Update step 5 "database" (Issue #2894)
2013-02-05 04:10:28 -08:00
Dmitriy Zaporozhets
478570dc32 fix move repository 2013-02-05 13:43:25 +02:00
Dmitriy Zaporozhets
adfd36f26a no need to run gitolite for enable_automerge 2013-02-05 13:30:56 +02:00
Dmitriy Zaporozhets
867945d193 Improving installation docs 2013-02-05 13:02:58 +02:00
Sato Hiroyuki
9dccecc9b5 Sort the commits on network graph by commiter date.
Author date is not updated, if the commits is rebased.
So the network graph having many rebased commit turns round and round,
that it is very difficult to undarstand history.
2013-02-05 19:58:49 +09:00
Dmitriy Zaporozhets
70e3bffd95 Fixed: post-receive, project remove, tests 2013-02-05 12:47:50 +02:00
Sato Hiroyuki
df85c9c06a Fix bug when it has been switched to tag. 2013-02-05 19:08:25 +09:00
Sato Hiroyuki
8ff5cf9cd5 Add search box for the commit. 2013-02-05 19:08:09 +09:00
Dmitriy Zaporozhets
39e37677f2 add remove keys from gitlab-shell by id 2013-02-05 11:12:15 +02:00
Dmitriy Zaporozhets
081c272b85 Remove outdated specs and fixed key remove 2013-02-05 10:15:49 +02:00
Dmitriy Zaporozhets
12198bee2f update structure 2013-02-05 09:17:45 +02:00
Dmitriy Zaporozhets
f385c7212e remove unexisting stubs 2013-02-05 09:14:35 +02:00
Dmitriy Zaporozhets
0d5a098c19 updated 2013-02-05 09:01:29 +02:00
Sato Hiroyuki
81cc1cb87b Enable to display the commit older than 650th commit. 2013-02-05 12:42:30 +09:00
Sato Hiroyuki
1e907498a9 The commit is marked and displayed in the center. 2013-02-05 12:34:35 +09:00
Sato Hiroyuki
7812cb77c8 Fix typo. 2013-02-05 12:20:04 +09:00
Dmitriy Zaporozhets
c75fc9c7a6 remove gitolite stub 2013-02-04 18:18:36 +02:00
Dmitriy Zaporozhets
935b6ae653 Internal API 2013-02-04 17:53:43 +02:00
Dmitriy Zaporozhets
6f7ccea668 Fix satellites to use filesystem. Correct post-receive user finder 2013-02-04 16:19:37 +02:00