From 26b7b475586b67c9e9aee7ec7311cca712901dbc Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Wed, 15 May 2019 13:19:16 +0200 Subject: Add *_access_level to project API - issues_access_level - repository_access_level - merge_requests_access_level - builds_access_level - wiki_access_level - snippets_access_level --- doc/api/projects.md | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index b8ccf25581e..702a89c3bba 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -708,11 +708,17 @@ POST /projects | `namespace_id` | integer | no | Namespace for the new project (defaults to the current user's namespace) | | `default_branch` | string | no | `master` by default | | `description` | string | no | Short project description | -| `issues_enabled` | boolean | no | Enable issues for this project | -| `merge_requests_enabled` | boolean | no | Enable merge requests for this project | -| `jobs_enabled` | boolean | no | Enable jobs for this project | -| `wiki_enabled` | boolean | no | Enable wiki for this project | -| `snippets_enabled` | boolean | no | Enable snippets for this project | +| `issues_enabled` | boolean | no | (deprecated) Enable issues for this project. Use `issues_access_level` instead | +| `merge_requests_enabled` | boolean | no | (deprecated) Enable merge requests for this project. Use `merge_requests_access_level` instead | +| `jobs_enabled` | boolean | no | (deprecated) Enable jobs for this project. Use `builds_access_level` instead | +| `wiki_enabled` | boolean | no | (deprecated) Enable wiki for this project. Use `wiki_access_level` instead | +| `snippets_enabled` | boolean | no | (deprecated) Enable snippets for this project. Use `snippets_access_level` instead | +| `issues_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `repository_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `merge_requests_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `builds_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `wiki_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `snippets_access_level` | string | no | One of `disabled`, `private` or `enabled` | | `resolve_outdated_diff_discussions` | boolean | no | Automatically resolve merge request diffs discussions on lines changed with a push | | `container_registry_enabled` | boolean | no | Enable container registry for this project | | `shared_runners_enabled` | boolean | no | Enable shared runners for this project | @@ -753,11 +759,17 @@ POST /projects/user/:user_id | `path` | string | no | Custom repository name for new project. By default generated based on name | | `namespace_id` | integer | no | Namespace for the new project (defaults to the current user's namespace) | | `description` | string | no | Short project description | -| `issues_enabled` | boolean | no | Enable issues for this project | -| `merge_requests_enabled` | boolean | no | Enable merge requests for this project | -| `jobs_enabled` | boolean | no | Enable jobs for this project | -| `wiki_enabled` | boolean | no | Enable wiki for this project | -| `snippets_enabled` | boolean | no | Enable snippets for this project | +| `issues_enabled` | boolean | no | (deprecated) Enable issues for this project. Use `issues_access_level` instead | +| `merge_requests_enabled` | boolean | no | (deprecated) Enable merge requests for this project. Use `merge_requests_access_level` instead | +| `jobs_enabled` | boolean | no | (deprecated) Enable jobs for this project. Use `builds_access_level` instead | +| `wiki_enabled` | boolean | no | (deprecated) Enable wiki for this project. Use `wiki_access_level` instead | +| `snippets_enabled` | boolean | no | (deprecated) Enable snippets for this project. Use `snippets_access_level` instead | +| `issues_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `repository_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `merge_requests_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `builds_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `wiki_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `snippets_access_level` | string | no | One of `disabled`, `private` or `enabled` | | `resolve_outdated_diff_discussions` | boolean | no | Automatically resolve merge request diffs discussions on lines changed with a push | | `container_registry_enabled` | boolean | no | Enable container registry for this project | | `shared_runners_enabled` | boolean | no | Enable shared runners for this project | @@ -798,11 +810,17 @@ PUT /projects/:id | `path` | string | no | Custom repository name for the project. By default generated based on name | | `default_branch` | string | no | `master` by default | | `description` | string | no | Short project description | -| `issues_enabled` | boolean | no | Enable issues for this project | -| `merge_requests_enabled` | boolean | no | Enable merge requests for this project | -| `jobs_enabled` | boolean | no | Enable jobs for this project | -| `wiki_enabled` | boolean | no | Enable wiki for this project | -| `snippets_enabled` | boolean | no | Enable snippets for this project | +| `issues_enabled` | boolean | no | (deprecated) Enable issues for this project. Use `issues_access_level` instead | +| `merge_requests_enabled` | boolean | no | (deprecated) Enable merge requests for this project. Use `merge_requests_access_level` instead | +| `jobs_enabled` | boolean | no | (deprecated) Enable jobs for this project. Use `builds_access_level` instead | +| `wiki_enabled` | boolean | no | (deprecated) Enable wiki for this project. Use `wiki_access_level` instead | +| `snippets_enabled` | boolean | no | (deprecated) Enable snippets for this project. Use `snippets_access_level` instead | +| `issues_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `repository_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `merge_requests_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `builds_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `wiki_access_level` | string | no | One of `disabled`, `private` or `enabled` | +| `snippets_access_level` | string | no | One of `disabled`, `private` or `enabled` | | `resolve_outdated_diff_discussions` | boolean | no | Automatically resolve merge request diffs discussions on lines changed with a push | | `container_registry_enabled` | boolean | no | Enable container registry for this project | | `shared_runners_enabled` | boolean | no | Enable shared runners for this project | -- cgit v1.2.1 From 353e68772c8b57ef4a98be094f2674d28a2dedcd Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Wed, 15 May 2019 14:35:55 +0200 Subject: Add build_git_strategy attribute to project API We map the boolean to the string 'fetch' or 'clone', to be more explicit. --- doc/api/projects.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index 702a89c3bba..88fa45cc6fa 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -733,6 +733,7 @@ POST /projects | `tag_list` | array | no | The list of tags for a project; put array of tags, that should be finally assigned to a project | | `avatar` | mixed | no | Image file for avatar of the project | | `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line | +| `build_git_strategy` | string | no | The Git strategy. Defaults to `fetch` | | `ci_config_path` | string | no | The path to CI config file | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | | `approvals_before_merge` | integer | no | **[STARTER]** How many approvers should approve merge requests by default | @@ -784,6 +785,7 @@ POST /projects/user/:user_id | `tag_list` | array | no | The list of tags for a project; put array of tags, that should be finally assigned to a project | | `avatar` | mixed | no | Image file for avatar of the project | | `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line | +| `build_git_strategy` | string | no | The Git strategy. Defaults to `fetch` | | `ci_config_path` | string | no | The path to CI config file | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | | `approvals_before_merge` | integer | no | **[STARTER]** How many approvers should approve merge requests by default | @@ -834,6 +836,7 @@ PUT /projects/:id | `request_access_enabled` | boolean | no | Allow users to request member access | | `tag_list` | array | no | The list of tags for a project; put array of tags, that should be finally assigned to a project | | `avatar` | mixed | no | Image file for avatar of the project | +| `build_git_strategy` | string | no | The Git strategy. Defaults to `fetch` | | `ci_config_path` | string | no | The path to CI config file | | `ci_default_git_depth` | integer | no | Default number of revisions for [shallow cloning](../user/project/pipelines/settings.md#git-shallow-clone) | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | -- cgit v1.2.1 From a7892e71714ad0f425547db12f205771dc270da5 Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Wed, 15 May 2019 15:32:18 +0200 Subject: Add build_timeout to project API --- doc/api/projects.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index 88fa45cc6fa..3c31cfb98b8 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -734,6 +734,7 @@ POST /projects | `avatar` | mixed | no | Image file for avatar of the project | | `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line | | `build_git_strategy` | string | no | The Git strategy. Defaults to `fetch` | +| `build_timeout` | integer | no | The maximum amount of time in minutes that a job is able run (in seconds) | | `ci_config_path` | string | no | The path to CI config file | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | | `approvals_before_merge` | integer | no | **[STARTER]** How many approvers should approve merge requests by default | @@ -786,6 +787,7 @@ POST /projects/user/:user_id | `avatar` | mixed | no | Image file for avatar of the project | | `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line | | `build_git_strategy` | string | no | The Git strategy. Defaults to `fetch` | +| `build_timeout` | integer | no | The maximum amount of time in minutes that a job is able run (in seconds) | | `ci_config_path` | string | no | The path to CI config file | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | | `approvals_before_merge` | integer | no | **[STARTER]** How many approvers should approve merge requests by default | @@ -837,6 +839,7 @@ PUT /projects/:id | `tag_list` | array | no | The list of tags for a project; put array of tags, that should be finally assigned to a project | | `avatar` | mixed | no | Image file for avatar of the project | | `build_git_strategy` | string | no | The Git strategy. Defaults to `fetch` | +| `build_timeout` | integer | no | The maximum amount of time in minutes that a job is able run (in seconds) | | `ci_config_path` | string | no | The path to CI config file | | `ci_default_git_depth` | integer | no | Default number of revisions for [shallow cloning](../user/project/pipelines/settings.md#git-shallow-clone) | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | -- cgit v1.2.1 From 5f04d24934770e9aa366aac1400a302232eefd89 Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Wed, 15 May 2019 15:36:17 +0200 Subject: Add build_coverage_regex to project API --- doc/api/projects.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index 3c31cfb98b8..316a1fb56ed 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -735,6 +735,7 @@ POST /projects | `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line | | `build_git_strategy` | string | no | The Git strategy. Defaults to `fetch` | | `build_timeout` | integer | no | The maximum amount of time in minutes that a job is able run (in seconds) | +| `build_coverage_regex` | string | no | Test coverage parsing | | `ci_config_path` | string | no | The path to CI config file | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | | `approvals_before_merge` | integer | no | **[STARTER]** How many approvers should approve merge requests by default | @@ -788,6 +789,7 @@ POST /projects/user/:user_id | `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line | | `build_git_strategy` | string | no | The Git strategy. Defaults to `fetch` | | `build_timeout` | integer | no | The maximum amount of time in minutes that a job is able run (in seconds) | +| `build_coverage_regex` | string | no | Test coverage parsing | | `ci_config_path` | string | no | The path to CI config file | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | | `approvals_before_merge` | integer | no | **[STARTER]** How many approvers should approve merge requests by default | @@ -840,6 +842,7 @@ PUT /projects/:id | `avatar` | mixed | no | Image file for avatar of the project | | `build_git_strategy` | string | no | The Git strategy. Defaults to `fetch` | | `build_timeout` | integer | no | The maximum amount of time in minutes that a job is able run (in seconds) | +| `build_coverage_regex` | string | no | Test coverage parsing | | `ci_config_path` | string | no | The path to CI config file | | `ci_default_git_depth` | integer | no | Default number of revisions for [shallow cloning](../user/project/pipelines/settings.md#git-shallow-clone) | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | -- cgit v1.2.1 From 5028f5d73d8fa69f72ac8d2b1cc493d82cf6f3e4 Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Wed, 15 May 2019 16:17:25 +0200 Subject: Add auto_cancel_pending_pipelines to project API --- doc/api/projects.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index 316a1fb56ed..02b3faf2d0c 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -735,6 +735,7 @@ POST /projects | `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line | | `build_git_strategy` | string | no | The Git strategy. Defaults to `fetch` | | `build_timeout` | integer | no | The maximum amount of time in minutes that a job is able run (in seconds) | +| `auto_cancel_pending_pipelines` | string | no | Auto-cancel pending pipelines (Note: this is not a boolean, but enabled/disabled | | `build_coverage_regex` | string | no | Test coverage parsing | | `ci_config_path` | string | no | The path to CI config file | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | @@ -789,6 +790,7 @@ POST /projects/user/:user_id | `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line | | `build_git_strategy` | string | no | The Git strategy. Defaults to `fetch` | | `build_timeout` | integer | no | The maximum amount of time in minutes that a job is able run (in seconds) | +| `auto_cancel_pending_pipelines` | string | no | Auto-cancel pending pipelines (Note: this is not a boolean, but enabled/disabled | | `build_coverage_regex` | string | no | Test coverage parsing | | `ci_config_path` | string | no | The path to CI config file | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | @@ -842,6 +844,7 @@ PUT /projects/:id | `avatar` | mixed | no | Image file for avatar of the project | | `build_git_strategy` | string | no | The Git strategy. Defaults to `fetch` | | `build_timeout` | integer | no | The maximum amount of time in minutes that a job is able run (in seconds) | +| `auto_cancel_pending_pipelines` | string | no | Auto-cancel pending pipelines (Note: this is not a boolean, but enabled/disabled | | `build_coverage_regex` | string | no | Test coverage parsing | | `ci_config_path` | string | no | The path to CI config file | | `ci_default_git_depth` | integer | no | Default number of revisions for [shallow cloning](../user/project/pipelines/settings.md#git-shallow-clone) | -- cgit v1.2.1 From e44167004dd44cf727829d0fc9df59fe3404bb49 Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Wed, 15 May 2019 16:27:54 +0200 Subject: Add auto_devops_* to project API The auto_devops object sometimes doesn't exists. We may need to create it. --- doc/api/projects.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index 02b3faf2d0c..c3e9fc69dd2 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -738,6 +738,8 @@ POST /projects | `auto_cancel_pending_pipelines` | string | no | Auto-cancel pending pipelines (Note: this is not a boolean, but enabled/disabled | | `build_coverage_regex` | string | no | Test coverage parsing | | `ci_config_path` | string | no | The path to CI config file | +| `auto_devops_enabled` | boolean | no | Enable Auto DevOps for this project | +| `auto_devops_deploy_strategy` | string | no | Auto Deploy strategy (`continuous`, `manual` or `timed_incremental`) | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | | `approvals_before_merge` | integer | no | **[STARTER]** How many approvers should approve merge requests by default | | `mirror` | boolean | no | **[STARTER]** Enables pull mirroring in a project | @@ -793,6 +795,8 @@ POST /projects/user/:user_id | `auto_cancel_pending_pipelines` | string | no | Auto-cancel pending pipelines (Note: this is not a boolean, but enabled/disabled | | `build_coverage_regex` | string | no | Test coverage parsing | | `ci_config_path` | string | no | The path to CI config file | +| `auto_devops_enabled` | boolean | no | Enable Auto DevOps for this project | +| `auto_devops_deploy_strategy` | string | no | Auto Deploy strategy (`continuous`, `manual` or `timed_incremental`) | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | | `approvals_before_merge` | integer | no | **[STARTER]** How many approvers should approve merge requests by default | | `external_authorization_classification_label` | string | no | **[CORE ONLY]** The classification label for the project | @@ -848,6 +852,8 @@ PUT /projects/:id | `build_coverage_regex` | string | no | Test coverage parsing | | `ci_config_path` | string | no | The path to CI config file | | `ci_default_git_depth` | integer | no | Default number of revisions for [shallow cloning](../user/project/pipelines/settings.md#git-shallow-clone) | +| `auto_devops_enabled` | boolean | no | Enable Auto DevOps for this project | +| `auto_devops_deploy_strategy` | string | no | Auto Deploy strategy (`continuous`, `manual` or `timed_incremental`) | | `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins | | `approvals_before_merge` | integer | no | **[STARTER]** How many approvers should approve merge request by default | | `external_authorization_classification_label` | string | no | **[CORE ONLY]** The classification label for the project | -- cgit v1.2.1 From d529c8f6227eb79d1adb0d2bfece2ac59c578114 Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Thu, 27 Jun 2019 14:39:46 +0200 Subject: Update json for "Get single project" doc --- doc/api/projects.md | 131 +++++++++++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 69 deletions(-) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index c3e9fc69dd2..68f5d7f0edb 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -483,95 +483,88 @@ GET /projects/:id ```json { - "id": 3, - "description": null, + "id": 26, + "description": "My amazing project", + "name": "myproject", + "name_with_namespace": "mygroup / myproject", + "path": "myproject", + "path_with_namespace": "mygroup/myproject", + "created_at": "2019-06-27T12:32:51.444Z", "default_branch": "master", - "visibility": "private", - "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", - "readme_url": "http://example.com/diaspora/diaspora-project-site/blob/master/README.md", "tag_list": [ - "example", - "disapora project" + "topic1", + "topic2" ], - "owner": { - "id": 3, - "name": "Diaspora", - "created_at": "2013-09-30T13:46:02Z" - }, - "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, + "ssh_url_to_repo": "git@gitlab.example.com:mygroup/myproject.git", + "http_url_to_repo": "http://gitlab.example.com/mygroup/myproject.git", + "web_url": "http://gitlab.example.com/mygroup/myproject", + "readme_url": "http://gitlab.example.com/mygroup/myproject/blob/master/README.md", + "avatar_url": null, + "star_count": 0, + "forks_count": 0, + "last_activity_at": "2019-06-27T12:32:51.444Z", "namespace": { - "id": 3, - "name": "Diaspora", - "path": "diaspora", + "id": 23, + "name": "mygroup", + "path": "mygroup", "kind": "group", - "full_path": "diaspora", - "avatar_url": "http://localhost:3000/uploads/group/avatar/3/foo.jpg", - "web_url": "http://localhost:3000/groups/diaspora" + "full_path": "mygroup", + "parent_id": null, + "avatar_url": null, + "web_url": "http://gitlab.example.com/groups/mygroup" }, - "import_status": "none", - "import_error": null, - "permissions": { - "project_access": { - "access_level": 10, - "notification_level": 3 - }, - "group_access": { - "access_level": 50, - "notification_level": 3 - } + "_links": { + "self": "http://gitlab.example.com/api/v4/projects/26", + "issues": "http://gitlab.example.com/api/v4/projects/26/issues", + "merge_requests": "http://gitlab.example.com/api/v4/projects/26/merge_requests", + "repo_branches": "http://gitlab.example.com/api/v4/projects/26/repository/branches", + "labels": "http://gitlab.example.com/api/v4/projects/26/labels", + "events": "http://gitlab.example.com/api/v4/projects/26/events", + "members": "http://gitlab.example.com/api/v4/projects/26/members" }, + "empty_repo": false, "archived": false, - "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", - "license_url": "http://example.com/diaspora/diaspora-client/blob/master/LICENSE", - "license": { - "key": "lgpl-3.0", - "name": "GNU Lesser General Public License v3.0", - "nickname": "GNU LGPLv3", - "html_url": "http://choosealicense.com/licenses/lgpl-3.0/", - "source_url": "http://www.gnu.org/licenses/lgpl-3.0.txt" - }, + "visibility": "private", + "resolve_outdated_diff_discussions": false, + "container_registry_enabled": true, + "issues_enabled": true, + "merge_requests_enabled": true, + "wiki_enabled": true, + "jobs_enabled": true, + "snippets_enabled": true, "shared_runners_enabled": true, - "forks_count": 0, - "star_count": 0, - "runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b", + "lfs_enabled": true, + "creator_id": 1, + "import_status": "none", + "import_error": null, + "open_issues_count": 0, + "runners_token": "sQewQBDHAMkqnMFVXzuW", "ci_default_git_depth": 50, "public_jobs": true, + "ci_config_path": null, "shared_with_groups": [ - { - "group_id": 4, - "group_name": "Twitter", - "group_full_path": "twitter", - "group_access_level": 30 - }, { "group_id": 3, - "group_name": "Gitlab Org", - "group_full_path": "gitlab-org", - "group_access_level": 10 + "group_name": "test", + "group_full_path": "test", + "group_access_level": 30, + "expires_at": null } ], "repository_storage": "default", "only_allow_merge_if_pipeline_succeeds": false, - "only_allow_merge_if_all_discussions_are_resolved": false, - "printing_merge_requests_link_enabled": true, "request_access_enabled": false, + "only_allow_merge_if_all_discussions_are_resolved": false, + "printing_merge_request_link_enabled": true, "merge_method": "merge", + "external_authorization_classification_label": null, + "permissions": { + "project_access": null, + "group_access": { + "access_level": 50, + "notification_level": 3 + } + }, "statistics": { "commit_count": 37, "storage_size": 1038090, -- cgit v1.2.1 From 203ef336392befd907c335a4a851ec0794d5e91a Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Thu, 4 Jul 2019 09:08:35 +0100 Subject: Reduce changes to doc/api/projects.md --- doc/api/projects.md | 131 +++++++++++++++++++++++++++------------------------- 1 file changed, 69 insertions(+), 62 deletions(-) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index 68f5d7f0edb..c3e9fc69dd2 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -483,88 +483,95 @@ GET /projects/:id ```json { - "id": 26, - "description": "My amazing project", - "name": "myproject", - "name_with_namespace": "mygroup / myproject", - "path": "myproject", - "path_with_namespace": "mygroup/myproject", - "created_at": "2019-06-27T12:32:51.444Z", + "id": 3, + "description": null, "default_branch": "master", + "visibility": "private", + "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", + "readme_url": "http://example.com/diaspora/diaspora-project-site/blob/master/README.md", "tag_list": [ - "topic1", - "topic2" + "example", + "disapora project" ], - "ssh_url_to_repo": "git@gitlab.example.com:mygroup/myproject.git", - "http_url_to_repo": "http://gitlab.example.com/mygroup/myproject.git", - "web_url": "http://gitlab.example.com/mygroup/myproject", - "readme_url": "http://gitlab.example.com/mygroup/myproject/blob/master/README.md", - "avatar_url": null, - "star_count": 0, - "forks_count": 0, - "last_activity_at": "2019-06-27T12:32:51.444Z", - "namespace": { - "id": 23, - "name": "mygroup", - "path": "mygroup", - "kind": "group", - "full_path": "mygroup", - "parent_id": null, - "avatar_url": null, - "web_url": "http://gitlab.example.com/groups/mygroup" - }, - "_links": { - "self": "http://gitlab.example.com/api/v4/projects/26", - "issues": "http://gitlab.example.com/api/v4/projects/26/issues", - "merge_requests": "http://gitlab.example.com/api/v4/projects/26/merge_requests", - "repo_branches": "http://gitlab.example.com/api/v4/projects/26/repository/branches", - "labels": "http://gitlab.example.com/api/v4/projects/26/labels", - "events": "http://gitlab.example.com/api/v4/projects/26/events", - "members": "http://gitlab.example.com/api/v4/projects/26/members" + "owner": { + "id": 3, + "name": "Diaspora", + "created_at": "2013-09-30T13:46:02Z" }, - "empty_repo": false, - "archived": false, - "visibility": "private", - "resolve_outdated_diff_discussions": false, - "container_registry_enabled": true, + "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, - "wiki_enabled": true, "jobs_enabled": true, - "snippets_enabled": true, - "shared_runners_enabled": true, - "lfs_enabled": true, - "creator_id": 1, + "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", + "avatar_url": "http://localhost:3000/uploads/group/avatar/3/foo.jpg", + "web_url": "http://localhost:3000/groups/diaspora" + }, "import_status": "none", "import_error": null, - "open_issues_count": 0, - "runners_token": "sQewQBDHAMkqnMFVXzuW", + "permissions": { + "project_access": { + "access_level": 10, + "notification_level": 3 + }, + "group_access": { + "access_level": 50, + "notification_level": 3 + } + }, + "archived": false, + "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", + "license_url": "http://example.com/diaspora/diaspora-client/blob/master/LICENSE", + "license": { + "key": "lgpl-3.0", + "name": "GNU Lesser General Public License v3.0", + "nickname": "GNU LGPLv3", + "html_url": "http://choosealicense.com/licenses/lgpl-3.0/", + "source_url": "http://www.gnu.org/licenses/lgpl-3.0.txt" + }, + "shared_runners_enabled": true, + "forks_count": 0, + "star_count": 0, + "runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b", "ci_default_git_depth": 50, "public_jobs": true, - "ci_config_path": null, "shared_with_groups": [ + { + "group_id": 4, + "group_name": "Twitter", + "group_full_path": "twitter", + "group_access_level": 30 + }, { "group_id": 3, - "group_name": "test", - "group_full_path": "test", - "group_access_level": 30, - "expires_at": null + "group_name": "Gitlab Org", + "group_full_path": "gitlab-org", + "group_access_level": 10 } ], "repository_storage": "default", "only_allow_merge_if_pipeline_succeeds": false, - "request_access_enabled": false, "only_allow_merge_if_all_discussions_are_resolved": false, - "printing_merge_request_link_enabled": true, + "printing_merge_requests_link_enabled": true, + "request_access_enabled": false, "merge_method": "merge", - "external_authorization_classification_label": null, - "permissions": { - "project_access": null, - "group_access": { - "access_level": 50, - "notification_level": 3 - } - }, "statistics": { "commit_count": 37, "storage_size": 1038090, -- cgit v1.2.1 From 4d8f28f6e9b192b6a9f64a62c3f33d62354e3848 Mon Sep 17 00:00:00 2001 From: Maikel Date: Thu, 6 Jun 2019 11:12:12 +0000 Subject: Document the negative commit message push rule for the API. --- doc/api/projects.md | 51 +++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 24 deletions(-) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index da05b090699..6468d73e0af 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -1631,6 +1631,7 @@ GET /projects/:id/push_rule "id": 1, "project_id": 3, "commit_message_regex": "Fixes \d+\..*", + "commit_message_negative_regex": "ssh\:\/\/", "branch_name_regex": "", "deny_delete_tag": false, "created_at": "2012-10-12T17:04:47Z", @@ -1663,18 +1664,19 @@ Adds a push rule to a specified project. POST /projects/:id/push_rule ``` -| Attribute | Type | Required | Description | -| -------------------------------------- | -------------- | -------- | ----------- | -| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | -| `deny_delete_tag` **(STARTER)** | boolean | no | Deny deleting a tag | -| `member_check` **(STARTER)** | boolean | no | Restrict commits by author (email) to existing GitLab users | -| `prevent_secrets` **(STARTER)** | boolean | no | GitLab will reject any files that are likely to contain secrets | -| `commit_message_regex` **(STARTER)** | string | no | All commit messages must match this, e.g. `Fixed \d+\..*` | -| `branch_name_regex` **(STARTER)** | string | no | All branch names must match this, e.g. `(feature|hotfix)\/*` | -| `author_email_regex` **(STARTER)** | string | no | All commit author emails must match this, e.g. `@my-company.com$` | -| `file_name_regex` **(STARTER)** | string | no | All commited filenames must **not** match this, e.g. `(jar|exe)$` | -| `max_file_size` **(STARTER)** | integer | no | Maximum file size (MB) | -| `commit_committer_check` **(PREMIUM)** | boolean | no | Users can only push commits to this repository that were committed with one of their own verified emails. | +| Attribute | Type | Required | Description | +| --------------------------------------------- | -------------- | -------- | ----------- | +| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | +| `deny_delete_tag` **(STARTER)** | boolean | no | Deny deleting a tag | +| `member_check` **(STARTER)** | boolean | no | Restrict commits by author (email) to existing GitLab users | +| `prevent_secrets` **(STARTER)** | boolean | no | GitLab will reject any files that are likely to contain secrets | +| `commit_message_regex` **(STARTER)** | string | no | All commit messages must match this, e.g. `Fixed \d+\..*` | +| `commit_message_negative_regex` **(STARTER)** | string | no | No commit message is allowed to match this, e.g. `ssh\:\/\/` | +| `branch_name_regex` **(STARTER)** | string | no | All branch names must match this, e.g. `(feature|hotfix)\/*` | +| `author_email_regex` **(STARTER)** | string | no | All commit author emails must match this, e.g. `@my-company.com$` | +| `file_name_regex` **(STARTER)** | string | no | All commited filenames must **not** match this, e.g. `(jar|exe)$` | +| `max_file_size` **(STARTER)** | integer | no | Maximum file size (MB) | +| `commit_committer_check` **(PREMIUM)** | boolean | no | Users can only push commits to this repository that were committed with one of their own verified emails. | ### Edit project push rule @@ -1684,18 +1686,19 @@ Edits a push rule for a specified project. PUT /projects/:id/push_rule ``` -| Attribute | Type | Required | Description | -| -------------------------------------- | -------------- | -------- | ----------- | -| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | -| `deny_delete_tag` **(STARTER)** | boolean | no | Deny deleting a tag | -| `member_check` **(STARTER)** | boolean | no | Restrict commits by author (email) to existing GitLab users | -| `prevent_secrets` **(STARTER)** | boolean | no | GitLab will reject any files that are likely to contain secrets | -| `commit_message_regex` **(STARTER)** | string | no | All commit messages must match this, e.g. `Fixed \d+\..*` | -| `branch_name_regex` **(STARTER)** | string | no | All branch names must match this, e.g. `(feature|hotfix)\/*` | -| `author_email_regex` **(STARTER)** | string | no | All commit author emails must match this, e.g. `@my-company.com$` | -| `file_name_regex` **(STARTER)** | string | no | All commited filenames must **not** match this, e.g. `(jar|exe)$` | -| `max_file_size` **(STARTER)** | integer | no | Maximum file size (MB) | -| `commit_committer_check` **(PREMIUM)** | boolean | no | Users can only push commits to this repository that were committed with one of their own verified emails. | +| Attribute | Type | Required | Description | +| --------------------------------------------- | -------------- | -------- | ----------- | +| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | +| `deny_delete_tag` **(STARTER)** | boolean | no | Deny deleting a tag | +| `member_check` **(STARTER)** | boolean | no | Restrict commits by author (email) to existing GitLab users | +| `prevent_secrets` **(STARTER)** | boolean | no | GitLab will reject any files that are likely to contain secrets | +| `commit_message_regex` **(STARTER)** | string | no | All commit messages must match this, e.g. `Fixed \d+\..*` | +| `commit_message_negative_regex` **(STARTER)** | string | no | No commit message is allowed to match this, e.g. `ssh\:\/\/` | +| `branch_name_regex` **(STARTER)** | string | no | All branch names must match this, e.g. `(feature|hotfix)\/*` | +| `author_email_regex` **(STARTER)** | string | no | All commit author emails must match this, e.g. `@my-company.com$` | +| `file_name_regex` **(STARTER)** | string | no | All commited filenames must **not** match this, e.g. `(jar|exe)$` | +| `max_file_size` **(STARTER)** | integer | no | Maximum file size (MB) | +| `commit_committer_check` **(PREMIUM)** | boolean | no | Users can only push commits to this repository that were committed with one of their own verified emails. | ### Delete project push rule -- cgit v1.2.1 From 275f37030fbda23e97b0d2db8c1964868e651e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cindy=20Pallares=20=F0=9F=A6=89?= Date: Wed, 10 Jul 2019 03:08:15 +0000 Subject: Include merge method link in attribute description Currently, the project visibility methods attribute description link to the descriptions and options for visibility methods. The merge methods attribute description doesn't should do the same. --- doc/api/projects.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index c199babc1be..781192fb92e 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -727,7 +727,7 @@ POST /projects | `public_builds` | boolean | no | If `true`, jobs can be viewed by non-project-members | | `only_allow_merge_if_pipeline_succeeds` | boolean | no | Set whether merge requests can only be merged with successful jobs | | `only_allow_merge_if_all_discussions_are_resolved` | boolean | no | Set whether merge requests can only be merged when all the discussions are resolved | -| `merge_method` | string | no | Set the merge method used | +| `merge_method` | string | no | Set the [merge method](#project-merge-method) used | | `lfs_enabled` | boolean | no | Enable LFS | | `request_access_enabled` | boolean | no | Allow users to request member access | | `tag_list` | array | no | The list of tags for a project; put array of tags, that should be finally assigned to a project | @@ -784,7 +784,7 @@ POST /projects/user/:user_id | `public_builds` | boolean | no | If `true`, jobs can be viewed by non-project-members | | `only_allow_merge_if_pipeline_succeeds` | boolean | no | Set whether merge requests can only be merged with successful jobs | | `only_allow_merge_if_all_discussions_are_resolved` | boolean | no | Set whether merge requests can only be merged when all the discussions are resolved | -| `merge_method` | string | no | Set the merge method used | +| `merge_method` | string | no | Set the [merge method](#project-merge-method) used | | `lfs_enabled` | boolean | no | Enable LFS | | `request_access_enabled` | boolean | no | Allow users to request member access | | `tag_list` | array | no | The list of tags for a project; put array of tags, that should be finally assigned to a project | @@ -841,7 +841,7 @@ PUT /projects/:id | `public_builds` | boolean | no | If `true`, jobs can be viewed by non-project-members | | `only_allow_merge_if_pipeline_succeeds` | boolean | no | Set whether merge requests can only be merged with successful jobs | | `only_allow_merge_if_all_discussions_are_resolved` | boolean | no | Set whether merge requests can only be merged when all the discussions are resolved | -| `merge_method` | string | no | Set the merge method used | +| `merge_method` | string | no | Set the [merge method](#project-merge-method) used | | `lfs_enabled` | boolean | no | Enable LFS | | `request_access_enabled` | boolean | no | Allow users to request member access | | `tag_list` | array | no | The list of tags for a project; put array of tags, that should be finally assigned to a project | -- cgit v1.2.1