diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-09-25 10:42:34 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-09-25 10:42:34 +0300 |
commit | 239332eed3fa870fd41be83864882c0f389840d8 (patch) | |
tree | a81aba7617f391f9cb4a67339faa9de67b4426d3 /doc/api | |
parent | 961b0849e5098dae74050f6c49ebf3011ce072b7 (diff) | |
parent | 7da72a0de296e430378c7eb85fc486a01f3163bd (diff) |
Merge remote-tracking branch 'upstream/master' into no-ivar-in-modules
* upstream/master: (168 commits)
Update CHANGELOG.md for 10.0.1
Remove Grit settings from default settings
Fix duplicate key errors in PostDeployMigrateUserExternalMailData migration
Workaround for #38259
Workaround for n+1 in Projects::TreeController#show
Removed old icons from project page
Make branches page translatable
fix typo in icons section
Don't show it if there's no project.
Update CHANGELOG.md for 10.0.0
Inform user that current shared projects will remain shared
Allow the git circuit breaker to correctly handle missing repository storages
Reserve refs/replace cos `git-replace` is using it
Resolve "Better SVG Usage in the Frontend"
Replace the 'project/service.feature' spinach test with an rspec analog
Replace the 'project/shortcuts.feature' spinach test with an rspec analog
Removed two legacy config options
Fix rendering double note issue.
IssueNotes: Switch back to Write pane when note cancel or submit.
Upgrade Nokogiri because of CVE-2017-9050
...
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/issues.md | 10 | ||||
-rw-r--r-- | doc/api/projects.md | 92 | ||||
-rw-r--r-- | doc/api/tags.md | 2 |
3 files changed, 102 insertions, 2 deletions
diff --git a/doc/api/issues.md b/doc/api/issues.md index 8ca66049d31..cd2cfe8e430 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -95,6 +95,7 @@ Example response: "username" : "root" }, "updated_at" : "2016-01-04T15:31:51.081Z", + "closed_at" : null, "id" : 76, "title" : "Consequatur vero maxime deserunt laboriosam est voluptas dolorem.", "created_at" : "2016-01-04T15:31:51.081Z", @@ -205,6 +206,7 @@ Example response: "title" : "Ut commodi ullam eos dolores perferendis nihil sunt.", "updated_at" : "2016-01-04T15:31:46.176Z", "created_at" : "2016-01-04T15:31:46.176Z", + "closed_at" : null, "user_notes_count": 1, "due_date": null, "web_url": "http://example.com/example/example/issues/1", @@ -311,6 +313,7 @@ Example response: "title" : "Ut commodi ullam eos dolores perferendis nihil sunt.", "updated_at" : "2016-01-04T15:31:46.176Z", "created_at" : "2016-01-04T15:31:46.176Z", + "closed_at" : "2016-01-05T15:31:46.176Z", "user_notes_count": 1, "due_date": "2016-07-22", "web_url": "http://example.com/example/example/issues/1", @@ -358,7 +361,8 @@ Example response: "id" : 11, "title" : "v3.0", "created_at" : "2016-01-04T15:31:39.788Z", - "updated_at" : "2016-01-04T15:31:39.788Z" + "updated_at" : "2016-01-04T15:31:39.788Z", + "closed_at" : "2016-01-05T15:31:46.176Z" }, "author" : { "state" : "active", @@ -465,6 +469,7 @@ Example response: }, "description" : null, "updated_at" : "2016-01-07T12:44:33.959Z", + "closed_at" : null, "milestone" : null, "subscribed" : true, "user_notes_count": 0, @@ -533,6 +538,7 @@ Example response: "project_id" : 4, "description" : null, "updated_at" : "2016-01-07T12:55:16.213Z", + "closed_at" : "2016-01-08T12:55:16.213Z", "iid" : 15, "labels" : [ "bug" @@ -615,6 +621,7 @@ Example response: "state": "opened", "created_at": "2016-04-05T21:41:45.652Z", "updated_at": "2016-04-07T12:20:17.596Z", + "closed_at": null, "labels": [], "milestone": null, "assignees": [{ @@ -692,6 +699,7 @@ Example response: "state": "opened", "created_at": "2016-04-05T21:41:45.652Z", "updated_at": "2016-04-07T12:20:17.596Z", + "closed_at": null, "labels": [], "milestone": null, "assignees": [{ diff --git a/doc/api/projects.md b/doc/api/projects.md index 3144220e588..07331d05231 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -635,6 +635,98 @@ POST /projects/:id/fork | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | | `namespace` | integer/string | yes | The ID or path of the namespace that the project will be forked to | +## List Forks of a project + +>**Note:** This feature was introduced in GitLab 10.1 + +List the projects accessible to the calling user that have an established, forked relationship with the specified project + +``` +GET /projects/:id/forks +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | +| `archived` | boolean | no | Limit by archived status | +| `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` | +| `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` | +| `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` | +| `search` | string | no | Return list of projects matching the search criteria | +| `simple` | boolean | no | Return only the ID, URL, name, and path of each project | +| `owned` | boolean | no | Limit by projects owned by the current user | +| `membership` | boolean | no | Limit by projects that the current user is a member of | +| `starred` | boolean | no | Limit by projects starred by the current user | +| `statistics` | boolean | no | Include project statistics | +| `with_issues_enabled` | boolean | no | Limit by enabled issues feature | +| `with_merge_requests_enabled` | boolean | no | Limit by enabled merge requests feature | + +```bash +curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/forks" +``` + +Example responses: + +```json +[ + { + "id": 3, + "description": null, + "default_branch": "master", + "visibility": "internal", + "ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git", + "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git", + "web_url": "http://example.com/diaspora/diaspora-project-site", + "tag_list": [ + "example", + "disapora project" + ], + "name": "Diaspora Project Site", + "name_with_namespace": "Diaspora / Diaspora Project Site", + "path": "diaspora-project-site", + "path_with_namespace": "diaspora/diaspora-project-site", + "issues_enabled": true, + "open_issues_count": 1, + "merge_requests_enabled": true, + "jobs_enabled": true, + "wiki_enabled": true, + "snippets_enabled": false, + "resolve_outdated_diff_discussions": false, + "container_registry_enabled": false, + "created_at": "2013-09-30T13:46:02Z", + "last_activity_at": "2013-09-30T13:46:02Z", + "creator_id": 3, + "namespace": { + "id": 3, + "name": "Diaspora", + "path": "diaspora", + "kind": "group", + "full_path": "diaspora" + }, + "import_status": "none", + "archived": true, + "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", + "shared_runners_enabled": true, + "forks_count": 0, + "star_count": 1, + "public_jobs": true, + "shared_with_groups": [], + "only_allow_merge_if_pipeline_succeeds": false, + "only_allow_merge_if_all_discussions_are_resolved": false, + "request_access_enabled": false, + "_links": { + "self": "http://example.com/api/v4/projects", + "issues": "http://example.com/api/v4/projects/1/issues", + "merge_requests": "http://example.com/api/v4/projects/1/merge_requests", + "repo_branches": "http://example.com/api/v4/projects/1/repository_branches", + "labels": "http://example.com/api/v4/projects/1/labels", + "events": "http://example.com/api/v4/projects/1/events", + "members": "http://example.com/api/v4/projects/1/members" + } + } +] +``` + ## Star a project Stars a given project. Returns status code `304` if the project is already starred. diff --git a/doc/api/tags.md b/doc/api/tags.md index 32fe5eea692..bebe6536b6e 100644 --- a/doc/api/tags.md +++ b/doc/api/tags.md @@ -131,7 +131,7 @@ Parameters: "message": null } ``` -The message will be `nil` when creating a lightweight tag otherwise +The message will be `null` when creating a lightweight tag otherwise it will contain the annotation. In case of an error, |