Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2023-09-18 18:10:09 +00:00
parent 884d6a4ece
commit 5ae452ecba
52 changed files with 491 additions and 274 deletions

View File

@ -90,8 +90,7 @@ workflow:
# For the scheduled pipelines, we set specific variables.
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"'
variables:
<<: *default-ruby-variables
<<: *default-branch-pipeline-failure-variables
<<: [*default-ruby-variables, *default-branch-pipeline-failure-variables]
CRYSTALBALL: "true"
PIPELINE_NAME: 'Scheduled Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline'
# Run pipelines for ruby3_1 branch
@ -103,15 +102,13 @@ workflow:
# when pipeline is triggered by a project access token.
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $GITLAB_USER_LOGIN =~ /project_\d+_bot\d*/'
variables:
<<: *default-ruby-variables
<<: *default-branch-pipeline-failure-variables
<<: [*default-ruby-variables, *default-branch-pipeline-failure-variables]
GITLAB_DEPENDENCY_PROXY_ADDRESS: ""
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline (triggered by a project token)'
# For `$CI_DEFAULT_BRANCH` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
variables:
<<: *default-ruby-variables
<<: *default-branch-pipeline-failure-variables
<<: [*default-ruby-variables, *default-branch-pipeline-failure-variables]
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline'
# For tags, create a pipeline.
- if: '$CI_COMMIT_TAG'

View File

@ -1625,14 +1625,12 @@
.qa:rules:package-and-test-schedule:
rules:
- <<: *if-dot-com-gitlab-org-schedule
- <<: [*if-dot-com-gitlab-org-schedule, *qa-e2e-test-schedule-variables]
allow_failure: true
<<: *qa-e2e-test-schedule-variables
.qa:rules:e2e-schedule-blocking:
rules:
- <<: *if-dot-com-gitlab-org-schedule
<<: *qa-e2e-test-schedule-variables
- <<: [*if-dot-com-gitlab-org-schedule, *qa-e2e-test-schedule-variables]
# Note: If any changes are made to this rule, the following should also be updated:
# 1) .qa:rules:manual-omnibus-and-follow-up-e2e

View File

@ -84,6 +84,9 @@ export default {
return { ...i, title };
});
},
onPinRemove(itemId) {
this.$emit('pin-remove', itemId);
},
},
};
</script>
@ -94,7 +97,7 @@ export default {
:expanded="expanded"
:has-flyout="hasFlyout"
@collapse-toggle="expanded = !expanded"
@pin-remove="(itemId) => $emit('pin-remove', itemId)"
@pin-remove="onPinRemove"
>
<draggable
v-if="items.length > 0"
@ -110,7 +113,7 @@ export default {
:key="item.id"
:item="item"
is-in-pinned-section
@pin-remove="(itemId) => $emit('pin-remove', itemId)"
@pin-remove="onPinRemove"
/>
</draggable>
<li v-else class="gl-text-secondary gl-font-sm gl-py-3" style="margin-left: 2.5rem">

View File

@ -118,11 +118,6 @@ module BulkImports
end
client.get("/#{entity_type}/#{source_entity_identifier}/export_relations/status")
rescue BulkImports::NetworkError => e
# the source instance will return a 404 if the feature is disabled as the endpoint won't be available
return if e.cause.is_a?(Gitlab::HTTP::BlockedUrlError)
raise ::BulkImports::Error.setting_not_enabled
end
def track_access_level(entity_params)

View File

@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/423077
milestone: '16.4'
type: development
group: group::authentication and authorization
default_enabled: false
default_enabled: true

View File

@ -3,6 +3,11 @@
#
development:
url: redis://localhost:6379
# ssl_params:
# ca_path: "/path/to/dir/with/certs"
# ca_file: "/path/to/ca.crt"
# cert_file: "/path/to/client.crt"
# key_file: "/path/to/client.key"
# sentinels:
# -
# host: localhost

View File

@ -100,7 +100,7 @@ Example response:
```json
{
"name": "master",
"name": "main",
"merged": false,
"protected": true,
"default": true,

View File

@ -120,7 +120,7 @@ POST /projects/:id/repository/commits
```shell
PAYLOAD=$(cat << 'JSON'
{
"branch": "master",
"branch": "main",
"commit_message": "some commit message",
"actions": [
{
@ -188,9 +188,9 @@ GitLab supports [form encoding](rest/index.md#encoding-api-parameters-of-array-a
```shell
curl --request POST \
--form "branch=master" \
--form "branch=main" \
--form "commit_message=some commit message" \
--form "start_branch=master" \
--form "start_branch=main" \
--form "actions[][action]=create" \
--form "actions[][file_path]=foo/bar" \
--form "actions[][content]=</path/to/local.file" \
@ -227,7 +227,7 @@ Parameters:
| `stats` | boolean | no | Include commit stats. Default is true |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master"
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/main"
```
Example response:
@ -250,7 +250,7 @@ Example response:
],
"last_pipeline" : {
"id": 8,
"ref": "master",
"ref": "main",
"sha": "2dc6aa325a317eda67812f05600bdf0fcdc70ab0",
"status": "created"
},
@ -317,7 +317,7 @@ Parameters:
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
--form "branch=master" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master/cherry_pick"
--form "branch=main" "https://gitlab.example.com/api/v4/projects/5/repository/commits/main/cherry_pick"
```
Example response:
@ -388,7 +388,7 @@ Parameters:
| `dry_run` | boolean | no | Does not commit any changes. Default is false. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/231032) in GitLab 13.3 |
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "branch=master" \
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "branch=main" \
"https://gitlab.example.com/api/v4/projects/5/repository/commits/a738f717824ff53aebad8b090c1b79a14f2bd9e8/revert"
```
@ -454,7 +454,7 @@ Parameters:
| `sha` | string | yes | The commit hash or name of a repository branch or tag |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master/diff"
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/main/diff"
```
Example response:
@ -490,7 +490,7 @@ Parameters:
| `sha` | string | yes | The commit hash or name of a repository branch or tag |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/master/comments"
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits/main/comments"
```
Example response:
@ -679,7 +679,7 @@ Example response:
"target_url" : "https://gitlab.example.com/janedoe/gitlab-foss/builds/91",
"finished_at" : null,
"id" : 91,
"ref" : "master"
"ref" : "main"
},
{
"started_at" : null,
@ -690,7 +690,7 @@ Example response:
"target_url" : "https://gitlab.example.com/janedoe/gitlab-foss/builds/90",
"id" : 90,
"finished_at" : null,
"ref" : "master",
"ref" : "main",
"sha" : "18f3e63d05582537db6d183d9d557be09e1f90c8",
"author" : {
"id" : 28,
@ -789,7 +789,7 @@ Example response:
"state":"opened",
"created_at":"2018-03-26T17:26:30.916Z",
"updated_at":"2018-03-26T17:26:30.916Z",
"target_branch":"master",
"target_branch":"main",
"source_branch":"test-branch",
"upvotes":0,
"downvotes":0,

View File

@ -185,7 +185,7 @@ Example response:
"ref_type": "branch",
"commit_from": "50d4420237a9de7be1304607147aec22e4a14af7",
"commit_to": "c5feabde2d8cd023215af4d2ceeb7a64839fc428",
"ref": "master",
"ref": "main",
"commit_title": "Add simple search to projects in public area"
},
"target_title": null

View File

@ -52,7 +52,7 @@ Example response:
"id": 1,
"link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}",
"image_url": "https://shields.io/my/badge",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=main",
"rendered_image_url": "https://shields.io/my/badge",
"kind": "group"
}
@ -84,7 +84,7 @@ Example response:
"id": 1,
"link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}",
"image_url": "https://shields.io/my/badge",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=main",
"rendered_image_url": "https://shields.io/my/badge",
"kind": "group"
}
@ -201,7 +201,7 @@ Example response:
{
"link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}",
"image_url": "https://shields.io/my/badge",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=main",
"rendered_image_url": "https://shields.io/my/badge"
}
```

View File

@ -49,7 +49,7 @@ Example response:
[
{
"id": 1,
"name": "master",
"name": "main",
"push_access_levels": [
{
"id": 1,
@ -114,7 +114,7 @@ GET /groups/:id/protected_branches/:name
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" \
"https://gitlab.example.com/api/v4/groups/5/protected_branches/master"
"https://gitlab.example.com/api/v4/groups/5/protected_branches/main"
```
Example response:
@ -122,7 +122,7 @@ Example response:
```json
{
"id": 1,
"name": "master",
"name": "main",
"push_access_levels": [
{
"id": 1,
@ -270,7 +270,7 @@ curl --request POST \
--header "PRIVATE-TOKEN: <your_access_token>" \
--header "Content-Type: application/json" \
--data '{
"name": "master",
"name": "main",
"allowed_to_push": [{"access_level": 30}],
"allowed_to_merge": [{
"access_level": 30
@ -286,7 +286,7 @@ Example response:
```json
{
"id": 5,
"name": "master",
"name": "main",
"push_access_levels": [
{
"id": 1,
@ -348,7 +348,7 @@ Example response:
```json
{
"name": "master",
"name": "main",
"push_access_levels": [
{
"id": 12,
@ -406,14 +406,14 @@ To delete:
curl --header 'Content-Type: application/json' --request PATCH \
--data '{"allowed_to_push": [{access_level: 40}]}' \
--header "PRIVATE-TOKEN: <your_access_token>" \
"https://gitlab.example.com/api/v4/groups/22034114/protected_branches/master"
"https://gitlab.example.com/api/v4/groups/22034114/protected_branches/main"
```
Example response:
```json
{
"name": "master",
"name": "main",
"push_access_levels": [
{
"id": 12,
@ -431,14 +431,14 @@ Example response:
```shell
curl --header 'Content-Type: application/json' --request PATCH \
--data '{"allowed_to_push": [{"id": 12, "access_level": 0}]' \
--header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/22034114/protected_branches/master"
--header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/22034114/protected_branches/main"
```
Example response:
```json
{
"name": "master",
"name": "main",
"push_access_levels": [
{
"id": 12,
@ -456,14 +456,14 @@ Example response:
```shell
curl --header 'Content-Type: application/json' --request PATCH \
--data '{"allowed_to_push": [{"id": 12, "_destroy": true}]}' \
--header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/22034114/protected_branches/master"
--header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/22034114/protected_branches/main"
```
Example response:
```json
{
"name": "master",
"name": "main",
"push_access_levels": []
}
```

View File

@ -207,7 +207,7 @@ Example response:
{
"file_name" : "dk.png",
"file_path" : "uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png",
"branch" : "master",
"branch" : "main",
"link" : {
"url" : "uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png",
"markdown" : "![dk](uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png)"

View File

@ -327,7 +327,7 @@ Example response:
{
"id": 9,
"description": "foo",
"default_branch": "master",
"default_branch": "main",
"tag_list": [], //deprecated, use `topics` instead
"topics": [],
"archived": false,
@ -407,13 +407,13 @@ Example response:
"path":"html5-boilerplate",
"path_with_namespace":"h5bp/html5-boilerplate",
"created_at":"2020-04-27T06:13:22.642Z",
"default_branch":"master",
"default_branch":"main",
"tag_list":[], //deprecated, use `topics` instead
"topics":[],
"ssh_url_to_repo":"ssh://git@gitlab.com/h5bp/html5-boilerplate.git",
"http_url_to_repo":"https://gitlab.com/h5bp/html5-boilerplate.git",
"web_url":"https://gitlab.com/h5bp/html5-boilerplate",
"readme_url":"https://gitlab.com/h5bp/html5-boilerplate/-/blob/master/README.md",
"readme_url":"https://gitlab.com/h5bp/html5-boilerplate/-/blob/main/README.md",
"avatar_url":null,
"star_count":0,
"forks_count":4,
@ -573,7 +573,7 @@ Example response:
{
"id": 7,
"description": "Voluptas veniam qui et beatae voluptas doloremque explicabo facilis.",
"default_branch": "master",
"default_branch": "main",
"tag_list": [], //deprecated, use `topics` instead
"topics": [],
"archived": false,
@ -612,7 +612,7 @@ Example response:
{
"id": 6,
"description": "Aspernatur omnis repudiandae qui voluptatibus eaque.",
"default_branch": "master",
"default_branch": "main",
"tag_list": [], //deprecated, use `topics` instead
"topics": [],
"archived": false,
@ -653,7 +653,7 @@ Example response:
{
"id": 8,
"description": "Velit eveniet provident fugiat saepe eligendi autem.",
"default_branch": "master",
"default_branch": "main",
"tag_list": [], //deprecated, use `topics` instead
"topics": [],
"archived": false,
@ -1039,7 +1039,7 @@ Example response:
{
"id": 9,
"description": "foo",
"default_branch": "master",
"default_branch": "main",
"tag_list": [], //deprecated, use `topics` instead
"topics": [],
"public": false,

View File

@ -2337,7 +2337,7 @@ Example response:
"state": "opened",
"created_at": "2017-04-06T18:33:34.168Z",
"updated_at": "2017-04-09T20:10:24.983Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "feature.custom-highlighting",
"upvotes": 0,
"downvotes": 0,

View File

@ -162,7 +162,7 @@ Supported attributes:
"protected_branches": [
{
"id": 1,
"name": "master",
"name": "main",
"push_access_levels": [
{
"access_level": 30,
@ -264,7 +264,7 @@ Supported attributes:
"protected_branches": [
{
"id": 1,
"name": "master",
"name": "main",
"push_access_levels": [
{
"access_level": 30,
@ -374,7 +374,7 @@ Supported attributes:
"protected_branches": [
{
"id": 1,
"name": "master",
"name": "main",
"push_access_levels": [
{
"access_level": 30,
@ -508,7 +508,7 @@ Supported attributes:
"protected_branches": [
{
"id": 1,
"name": "master",
"name": "main",
"push_access_levels": [
{
"access_level": 30,

View File

@ -114,7 +114,7 @@ Supported attributes:
"closed_at": null,
"created_at": "2017-04-29T08:46:00Z",
"updated_at": "2017-04-29T08:46:00Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "test1",
"upvotes": 0,
"downvotes": 0,
@ -303,7 +303,7 @@ Supported attributes:
"closed_at": null,
"created_at": "2017-04-29T08:46:00Z",
"updated_at": "2017-04-29T08:46:00Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "test1",
"upvotes": 0,
"downvotes": 0,
@ -479,7 +479,7 @@ Supported attributes:
"closed_at": null,
"created_at": "2017-04-29T08:46:00Z",
"updated_at": "2017-04-29T08:46:00Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "test1",
"upvotes": 0,
"downvotes": 0,
@ -672,7 +672,7 @@ Supported attributes:
"prepared_at": "2018-09-04T11:16:17.520Z",
"closed_by": null,
"closed_at": null,
"target_branch": "master",
"target_branch": "main",
"source_branch": "manual-job-rules",
"user_notes_count": 0,
"upvotes": 0,
@ -1179,7 +1179,7 @@ Supported attributes:
{
"id": 77,
"sha": "959e04d7c7a30600c894bd3c0cd0e1ce7f42c11d",
"ref": "master",
"ref": "main",
"status": "success"
}
]
@ -1284,7 +1284,7 @@ POST /projects/:id/merge_requests
"state": "merged",
"created_at": "2017-04-29T08:46:00Z",
"updated_at": "2017-04-29T08:46:00Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "test1",
"upvotes": 0,
"downvotes": 0,
@ -1439,7 +1439,7 @@ Must include at least one non-required attribute from above.
"state": "merged",
"created_at": "2017-04-29T08:46:00Z",
"updated_at": "2017-04-29T08:46:00Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "test1",
"upvotes": 0,
"downvotes": 0,
@ -1617,7 +1617,7 @@ Supported attributes:
"state": "merged",
"created_at": "2017-04-29T08:46:00Z",
"updated_at": "2017-04-29T08:46:00Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "test1",
"upvotes": 0,
"downvotes": 0,
@ -1819,7 +1819,7 @@ Supported attributes:
"state": "merged",
"created_at": "2017-04-29T08:46:00Z",
"updated_at": "2017-04-29T08:46:00Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "test1",
"upvotes": 0,
"downvotes": 0,
@ -2121,7 +2121,7 @@ Example response:
"state": "merged",
"created_at": "2017-04-29T08:46:00Z",
"updated_at": "2017-04-29T08:46:00Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "test1",
"upvotes": 0,
"downvotes": 0,
@ -2281,7 +2281,7 @@ Example response:
"state": "merged",
"created_at": "2017-04-29T08:46:00Z",
"updated_at": "2017-04-29T08:46:00Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "test1",
"upvotes": 0,
"downvotes": 0,

View File

@ -380,7 +380,7 @@ Example response:
"iid": 2,
"project_id": 9,
"sha": "e564015ac6cb3d8617647802c875b27d392f72a6",
"ref": "master",
"ref": "main",
"status": "canceled",
"source": "push",
"created_at": "2023-02-01T12:23:23.694Z",

View File

@ -47,7 +47,7 @@ Example response:
"id": 1,
"link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}",
"image_url": "https://shields.io/my/badge",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=main",
"rendered_image_url": "https://shields.io/my/badge",
"kind": "project"
},
@ -56,7 +56,7 @@ Example response:
"id": 2,
"link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}",
"image_url": "https://shields.io/my/badge",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=main",
"rendered_image_url": "https://shields.io/my/badge",
"kind": "group"
}
@ -88,7 +88,7 @@ Example response:
"id": 1,
"link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}",
"image_url": "https://shields.io/my/badge",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=main",
"rendered_image_url": "https://shields.io/my/badge",
"kind": "project"
}
@ -111,7 +111,7 @@ POST /projects/:id/badges
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
--data "link_url=https://gitlab.com/gitlab-org/gitlab-foss/commits/master&image_url=https://shields.io/my/badge1&name=mybadge" \
--data "link_url=https://gitlab.com/gitlab-org/gitlab-foss/commits/main&image_url=https://shields.io/my/badge1&name=mybadge" \
"https://gitlab.example.com/api/v4/projects/:id/badges"
```
@ -121,9 +121,9 @@ Example response:
{
"id": 1,
"name": "mybadge",
"link_url": "https://gitlab.com/gitlab-org/gitlab-foss/commits/master",
"link_url": "https://gitlab.com/gitlab-org/gitlab-foss/commits/main",
"image_url": "https://shields.io/my/badge1",
"rendered_link_url": "https://gitlab.com/gitlab-org/gitlab-foss/commits/master",
"rendered_link_url": "https://gitlab.com/gitlab-org/gitlab-foss/commits/main",
"rendered_image_url": "https://shields.io/my/badge1",
"kind": "project"
}
@ -155,9 +155,9 @@ Example response:
{
"id": 1,
"name": "mybadge",
"link_url": "https://gitlab.com/gitlab-org/gitlab-foss/commits/master",
"link_url": "https://gitlab.com/gitlab-org/gitlab-foss/commits/main",
"image_url": "https://shields.io/my/badge",
"rendered_link_url": "https://gitlab.com/gitlab-org/gitlab-foss/commits/master",
"rendered_link_url": "https://gitlab.com/gitlab-org/gitlab-foss/commits/main",
"rendered_image_url": "https://shields.io/my/badge",
"kind": "project"
}
@ -204,7 +204,7 @@ Example response:
{
"link_url": "http://example.com/ci_status.svg?project=%{project_path}&ref=%{default_branch}",
"image_url": "https://shields.io/my/badge",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=master",
"rendered_link_url": "http://example.com/ci_status.svg?project=example-org/example-project&ref=main",
"rendered_image_url": "https://shields.io/my/badge"
}
```

View File

@ -90,7 +90,7 @@ Example response:
"path": "security-reports",
"path_with_namespace": "gitlab-org/security-reports"
},
"project_default_branch": "master",
"project_default_branch": "main",
"report_type": "dependency_scanning",
"resolved_at": null,
"resolved_by_id": null,
@ -178,7 +178,7 @@ Example response:
"path": "security-reports",
"path_with_namespace": "gitlab-org/security-reports"
},
"project_default_branch": "master",
"project_default_branch": "main",
"report_type": "dependency_scanning",
"resolved_at": null,
"resolved_by_id": null,

View File

@ -162,7 +162,7 @@ When the user is authenticated and `simple` is not set this returns something li
"ssh_url_to_repo": "git@gitlab.example.com:diaspora/diaspora-client.git",
"http_url_to_repo": "https://gitlab.example.com/diaspora/diaspora-client.git",
"web_url": "https://gitlab.example.com/diaspora/diaspora-client",
"readme_url": "https://gitlab.example.com/diaspora/diaspora-client/blob/master/README.md",
"readme_url": "https://gitlab.example.com/diaspora/diaspora-client/blob/main/README.md",
"avatar_url": "https://gitlab.example.com/uploads/project/avatar/4/uploads/avatar.png",
"forks_count": 0,
"star_count": 0,
@ -349,12 +349,12 @@ GET /users/:user_id/projects
"id": 4,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "master",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git",
"http_url_to_repo": "http://example.com/diaspora/diaspora-client.git",
"web_url": "http://example.com/diaspora/diaspora-client",
"readme_url": "http://example.com/diaspora/diaspora-client/blob/master/README.md",
"readme_url": "http://example.com/diaspora/diaspora-client/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora client"
@ -457,12 +457,12 @@ GET /users/:user_id/projects
"id": 6,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "master",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:brightbox/puppet.git",
"http_url_to_repo": "http://example.com/brightbox/puppet.git",
"web_url": "http://example.com/brightbox/puppet",
"readme_url": "http://example.com/brightbox/puppet/blob/master/README.md",
"readme_url": "http://example.com/brightbox/puppet/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"puppet"
@ -613,12 +613,12 @@ Example response:
"id": 4,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "master",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git",
"http_url_to_repo": "http://example.com/diaspora/diaspora-client.git",
"web_url": "http://example.com/diaspora/diaspora-client",
"readme_url": "http://example.com/diaspora/diaspora-client/blob/master/README.md",
"readme_url": "http://example.com/diaspora/diaspora-client/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora client"
@ -709,12 +709,12 @@ Example response:
"id": 6,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "master",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:brightbox/puppet.git",
"http_url_to_repo": "http://example.com/brightbox/puppet.git",
"web_url": "http://example.com/brightbox/puppet",
"readme_url": "http://example.com/brightbox/puppet/blob/master/README.md",
"readme_url": "http://example.com/brightbox/puppet/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"puppet"
@ -871,12 +871,12 @@ Example response:
"id": 4,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "master",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git",
"http_url_to_repo": "http://example.com/diaspora/diaspora-client.git",
"web_url": "http://example.com/diaspora/diaspora-client",
"readme_url": "http://example.com/diaspora/diaspora-client/blob/master/README.md",
"readme_url": "http://example.com/diaspora/diaspora-client/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora client"
@ -967,12 +967,12 @@ Example response:
"id": 6,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "master",
"default_branch": "main",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:brightbox/puppet.git",
"http_url_to_repo": "http://example.com/brightbox/puppet.git",
"web_url": "http://example.com/brightbox/puppet",
"readme_url": "http://example.com/brightbox/puppet/blob/master/README.md",
"readme_url": "http://example.com/brightbox/puppet/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"puppet"
@ -1109,12 +1109,12 @@ GET /projects/:id
"id": 3,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "master",
"default_branch": "main",
"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",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora project"
@ -1182,7 +1182,7 @@ GET /projects/:id
},
"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_url": "http://example.com/diaspora/diaspora-client/blob/main/LICENSE",
"license": {
"key": "lgpl-3.0",
"name": "GNU Lesser General Public License v3.0",
@ -1305,14 +1305,14 @@ target the upstream project by default.
"path":"gitlab-foss",
"path_with_namespace":"gitlab-org/gitlab-foss",
"created_at":"2013-09-26T06:02:36.000Z",
"default_branch":"master",
"default_branch":"main",
"tag_list":[], //deprecated, use `topics` instead
"topics":[],
"ssh_url_to_repo":"git@gitlab.com:gitlab-org/gitlab-foss.git",
"http_url_to_repo":"https://gitlab.com/gitlab-org/gitlab-foss.git",
"web_url":"https://gitlab.com/gitlab-org/gitlab-foss",
"avatar_url":"https://gitlab.com/uploads/-/system/project/avatar/13083/logo-extra-whitespace.png",
"license_url": "https://gitlab.com/gitlab-org/gitlab/-/blob/master/LICENSE",
"license_url": "https://gitlab.com/gitlab-org/gitlab/-/blob/main/LICENSE",
"license": {
"key": "mit",
"name": "MIT License",
@ -1835,12 +1835,12 @@ Example responses:
"id": 3,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "master",
"default_branch": "main",
"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",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/master/README.md",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora project"
@ -1937,12 +1937,12 @@ Example response:
"id": 3,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "master",
"default_branch": "main",
"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",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/master/README.md",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora project"
@ -1980,7 +1980,7 @@ Example response:
"import_status": "none",
"archived": true,
"avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
"license_url": "http://example.com/diaspora/diaspora-client/blob/master/LICENSE",
"license_url": "http://example.com/diaspora/diaspora-client/blob/main/LICENSE",
"license": {
"key": "lgpl-3.0",
"name": "GNU Lesser General Public License v3.0",
@ -2045,12 +2045,12 @@ Example response:
"id": 3,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "master",
"default_branch": "main",
"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",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/master/README.md",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora project"
@ -2088,7 +2088,7 @@ Example response:
"import_status": "none",
"archived": true,
"avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
"license_url": "http://example.com/diaspora/diaspora-client/blob/master/LICENSE",
"license_url": "http://example.com/diaspora/diaspora-client/blob/main/LICENSE",
"license": {
"key": "lgpl-3.0",
"name": "GNU Lesser General Public License v3.0",
@ -2228,12 +2228,12 @@ Example response:
"id": 3,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "master",
"default_branch": "main",
"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",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora project"
@ -2287,7 +2287,7 @@ Example response:
},
"archived": true,
"avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png",
"license_url": "http://example.com/diaspora/diaspora-client/blob/master/LICENSE",
"license_url": "http://example.com/diaspora/diaspora-client/blob/main/LICENSE",
"license": {
"key": "lgpl-3.0",
"name": "GNU Lesser General Public License v3.0",
@ -2360,12 +2360,12 @@ Example response:
"id": 3,
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"description_html": "<p data-sourcepos=\"1:1-1:56\" dir=\"auto\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
"default_branch": "master",
"default_branch": "main",
"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",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/main/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora project"
@ -2419,7 +2419,7 @@ Example response:
},
"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_url": "http://example.com/diaspora/diaspora-client/blob/main/LICENSE",
"license": {
"key": "lgpl-3.0",
"name": "GNU Lesser General Public License v3.0",
@ -3051,13 +3051,13 @@ Example response:
"path_with_namespace": "cute-cats/hello-world",
"created_at": "2020-10-15T16:25:22.415Z",
"updated_at": "2020-10-15T16:25:22.415Z",
"default_branch": "master",
"default_branch": "main",
"tag_list": [], //deprecated, use `topics` instead
"topics": [],
"ssh_url_to_repo": "git@gitlab.example.com:cute-cats/hello-world.git",
"http_url_to_repo": "https://gitlab.example.com/cute-cats/hello-world.git",
"web_url": "https://gitlab.example.com/cute-cats/hello-world",
"readme_url": "https://gitlab.example.com/cute-cats/hello-world/-/blob/master/README.md",
"readme_url": "https://gitlab.example.com/cute-cats/hello-world/-/blob/main/README.md",
"avatar_url": null,
"forks_count": 0,
"star_count": 0,

View File

@ -189,7 +189,7 @@ Supported attributes:
| `straight` | boolean | no | Comparison method: `true` for direct comparison between `from` and `to` (`from`..`to`), `false` to compare using merge base (`from`...`to`)'. Default is `false`. |
```plaintext
GET /projects/:id/repository/compare?from=master&to=feature
GET /projects/:id/repository/compare?from=main&to=feature
```
Example response:

View File

@ -35,7 +35,7 @@ GET /projects/:id/repository/files/:file_path
```
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb?ref=master"
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb?ref=main"
```
| Attribute | Type | Required | Description |
@ -54,7 +54,7 @@ Example response:
"encoding": "base64",
"content": "IyA9PSBTY2hlbWEgSW5mb3...",
"content_sha256": "4c294617b60715c1d218e61164a3abd4808a4284cbc30e6728a01ad9aada4481",
"ref": "master",
"ref": "main",
"blob_id": "79f7bbd25901e8334750839545a9bd021f0e4c83",
"commit_id": "d5a3ff139356ce33e37e73add446f16869741b50",
"last_commit_id": "570e7b2abdd848b95f2f578043fc23bd6f6fd24d",
@ -73,7 +73,7 @@ HEAD /projects/:id/repository/files/:file_path
```
```shell
curl --head --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb?ref=master"
curl --head --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb?ref=main"
```
Example response:
@ -88,7 +88,7 @@ X-Gitlab-Encoding: base64
X-Gitlab-File-Name: key.rb
X-Gitlab-File-Path: app/models/key.rb
X-Gitlab-Last-Commit-Id: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d
X-Gitlab-Ref: master
X-Gitlab-Ref: main
X-Gitlab-Size: 1476
X-Gitlab-Execute-Filemode: false
...
@ -112,7 +112,7 @@ GET /projects/:id/repository/files/:file_path/blame
| `range` | hash | no | Blame range. |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/13083/repository/files/path%2Fto%2Ffile.rb/blame?ref=master"
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/13083/repository/files/path%2Fto%2Ffile.rb/blame?ref=main"
```
Example response:
@ -147,7 +147,7 @@ NOTE:
`HEAD` method returns just file metadata, as in [Get file from repository](repository_files.md#get-file-from-repository).
```shell
curl --head --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/13083/repository/files/path%2Fto%2Ffile.rb/blame?ref=master"
curl --head --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/13083/repository/files/path%2Fto%2Ffile.rb/blame?ref=main"
```
Example response:
@ -162,7 +162,7 @@ X-Gitlab-Encoding: base64
X-Gitlab-File-Name: file.rb
X-Gitlab-File-Path: path/to/file.rb
X-Gitlab-Last-Commit-Id: 570e7b2abdd848b95f2f578043fc23bd6f6fd24d
X-Gitlab-Ref: master
X-Gitlab-Ref: main
X-Gitlab-Size: 1476
X-Gitlab-Execute-Filemode: false
...
@ -174,7 +174,7 @@ To request a blame range, specify `range[start]` and `range[end]` parameters wit
the starting and ending line numbers of the file.
```shell
curl --head --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/13083/repository/files/path%2Fto%2Ffile.rb/blame?ref=master&range[start]=1&range[end]=2"
curl --head --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/13083/repository/files/path%2Fto%2Ffile.rb/blame?ref=main&range[start]=1&range[end]=2"
```
Example response:
@ -218,7 +218,7 @@ GET /projects/:id/repository/files/:file_path/raw
| `lfs` | boolean | no | Determines if the response should be Git LFS file contents, rather than the pointer. If the file is not tracked by Git LFS, ignored. Defaults to `false`. |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb/raw?ref=master"
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb/raw?ref=main"
```
NOTE:
@ -251,7 +251,7 @@ POST /projects/:id/repository/files/:file_path
```shell
curl --request POST --header 'PRIVATE-TOKEN: <your_access_token>' \
--header "Content-Type: application/json" \
--data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname",
--data '{"branch": "main", "author_email": "author@example.com", "author_name": "Firstname Lastname",
"content": "some content", "commit_message": "create a new file"}' \
"https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
```
@ -261,7 +261,7 @@ Example response:
```json
{
"file_path": "app/project.rb",
"branch": "master"
"branch": "main"
}
```
@ -293,7 +293,7 @@ PUT /projects/:id/repository/files/:file_path
```shell
curl --request PUT --header 'PRIVATE-TOKEN: <your_access_token>' \
--header "Content-Type: application/json" \
--data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname",
--data '{"branch": "main", "author_email": "author@example.com", "author_name": "Firstname Lastname",
"content": "some content", "commit_message": "update file"}' \
"https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
```
@ -303,7 +303,7 @@ Example response:
```json
{
"file_path": "app/project.rb",
"branch": "master"
"branch": "main"
}
```
@ -339,7 +339,7 @@ DELETE /projects/:id/repository/files/:file_path
```shell
curl --request DELETE --header 'PRIVATE-TOKEN: <your_access_token>' \
--header "Content-Type: application/json" \
--data '{"branch": "master", "author_email": "author@example.com", "author_name": "Firstname Lastname",
--data '{"branch": "main", "author_email": "author@example.com", "author_name": "Firstname Lastname",
"commit_message": "delete file"}' \
"https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
```

View File

@ -27,7 +27,7 @@ PUT /projects/:id/repository/submodules/:submodule
```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/submodules/lib%2Fmodules%2Fexample" \
--data "branch=master&commit_sha=3ddec28ea23acc5caa5d8331a6ecb2a65fc03e88&commit_message=Update submodule reference"
--data "branch=main&commit_sha=3ddec28ea23acc5caa5d8331a6ecb2a65fc03e88&commit_message=Update submodule reference"
```
Example response:

View File

@ -395,7 +395,7 @@ Example response:
"status": "running",
"stage": "test",
"name": "test",
"ref": "master",
"ref": "main",
"tag": false,
"coverage": null,
"created_at": "2017-11-16T08:50:29.000Z",
@ -439,7 +439,7 @@ Example response:
"pipeline": {
"id": 2,
"sha": "97de212e80737a608d939f648d959671fb0a0142",
"ref": "master",
"ref": "main",
"status": "running"
},
"project": {

View File

@ -53,13 +53,13 @@ Example response:
"path": "flight",
"path_with_namespace": "twitter/flight",
"created_at": "2017-09-05T07:58:01.621Z",
"default_branch": "master",
"default_branch": "main",
"tag_list":[], //deprecated, use `topics` instead
"topics":[],
"ssh_url_to_repo": "ssh://jarka@localhost:2222/twitter/flight.git",
"http_url_to_repo": "http://localhost:3000/twitter/flight.git",
"web_url": "http://localhost:3000/twitter/flight",
"readme_url": "http://localhost:3000/twitter/flight/-/blob/master/README.md",
"readme_url": "http://localhost:3000/twitter/flight/-/blob/main/README.md",
"avatar_url": null,
"star_count": 0,
"forks_count": 0,
@ -153,7 +153,7 @@ Example response:
"state": "opened",
"created_at": "2018-01-22T14:21:50.830Z",
"updated_at": "2018-02-06T12:40:33.295Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "jaja-test",
"upvotes": 0,
"downvotes": 0,
@ -290,7 +290,7 @@ Example response:
"path": "home.md",
"filename": "home.md",
"id": null,
"ref": "master",
"ref": "main",
"startline": 5,
"project_id": 6,
"group_id": null
@ -367,7 +367,7 @@ Example response:
"path": "README.md",
"filename": "README.md",
"id": null,
"ref": "master",
"ref": "main",
"startline": 46,
"project_id": 6
}
@ -475,13 +475,13 @@ Example response:
"path": "flight",
"path_with_namespace": "twitter/flight",
"created_at": "2017-09-05T07:58:01.621Z",
"default_branch": "master",
"default_branch": "main",
"tag_list":[], //deprecated, use `topics` instead
"topics":[],
"ssh_url_to_repo": "ssh://jarka@localhost:2222/twitter/flight.git",
"http_url_to_repo": "http://localhost:3000/twitter/flight.git",
"web_url": "http://localhost:3000/twitter/flight",
"readme_url": "http://localhost:3000/twitter/flight/-/blob/master/README.md",
"readme_url": "http://localhost:3000/twitter/flight/-/blob/main/README.md",
"avatar_url": null,
"star_count": 0,
"forks_count": 0,
@ -575,7 +575,7 @@ Example response:
"state": "opened",
"created_at": "2018-01-22T14:21:50.830Z",
"updated_at": "2018-02-06T12:40:33.295Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "jaja-test",
"upvotes": 0,
"downvotes": 0,
@ -681,7 +681,7 @@ Example response:
"path": "home.md",
"filename": "home.md",
"id": null,
"ref": "master",
"ref": "main",
"startline": 5,
"project_id": 6,
"group_id": 1
@ -758,7 +758,7 @@ Example response:
"path": "README.md",
"filename": "README.md",
"id": null,
"ref": "master",
"ref": "main",
"startline": 46,
"project_id": 6
}
@ -934,7 +934,7 @@ Example response:
"state": "opened",
"created_at": "2018-01-22T14:21:50.830Z",
"updated_at": "2018-02-06T12:40:33.295Z",
"target_branch": "master",
"target_branch": "main",
"source_branch": "jaja-test",
"upvotes": 0,
"downvotes": 0,
@ -1094,7 +1094,7 @@ Example response:
"path": "home.md",
"filename": "home.md",
"id": null,
"ref": "master",
"ref": "main",
"startline": 5,
"project_id": 6,
"group_id": 1
@ -1177,7 +1177,7 @@ Example response:
"path": "README.md",
"filename": "README.md",
"id": null,
"ref": "master",
"ref": "main",
"startline": 46,
"project_id": 6
}

View File

@ -184,7 +184,7 @@ Parameters:
Example request:
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/snippets/1/files/master/snippet%2Erb/raw"
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/snippets/1/files/main/snippet%2Erb/raw"
```
Example response:
@ -270,7 +270,7 @@ Example response:
"files": [
{
"path": "text.txt",
"raw_url": "https://gitlab.example.com/-/snippets/1/raw/master/renamed.md"
"raw_url": "https://gitlab.example.com/-/snippets/1/raw/main/renamed.md"
}
]
}
@ -355,7 +355,7 @@ Example response:
"files": [
{
"path": "renamed.md",
"raw_url": "https://gitlab.example.com/-/snippets/1/raw/master/renamed.md"
"raw_url": "https://gitlab.example.com/-/snippets/1/raw/main/renamed.md"
}
]
}

View File

@ -35,7 +35,7 @@ GET /projects/:id/external_status_checks
{
"id": 14,
"project_id": 6,
"name": "master",
"name": "main",
"created_at": "2020-10-12T14:04:50.787Z",
"updated_at": "2020-10-12T14:04:50.787Z",
"code_owner_approval_required": false
@ -216,7 +216,7 @@ In case status check is already passed status code is 422
"namespace": "Flightjs",
"visibility_level": 20,
"path_with_namespace": "flightjs/Flight",
"default_branch": "master",
"default_branch": "main",
"ci_config_path": null,
"homepage": "http://example.com/flightjs/Flight",
"url": "ssh://example.com/flightjs/Flight.git",
@ -242,10 +242,10 @@ In case status check is already passed status code is 422
"merge_user_id": null,
"merge_when_pipeline_succeeds": false,
"milestone_id": null,
"source_branch": "root-master-patch-30152",
"source_branch": "root-main-patch-30152",
"source_project_id": 6,
"state_id": 1,
"target_branch": "master",
"target_branch": "main",
"target_project_id": 6,
"time_estimate": 0,
"title": "Update README.md",
@ -263,7 +263,7 @@ In case status check is already passed status code is 422
"namespace": "Flightjs",
"visibility_level": 20,
"path_with_namespace": "flightjs/Flight",
"default_branch": "master",
"default_branch": "main",
"ci_config_path": null,
"homepage": "http://example.com/flightjs/Flight",
"url": "ssh://example.com/flightjs/Flight.git",
@ -281,7 +281,7 @@ In case status check is already passed status code is 422
"namespace": "Flightjs",
"visibility_level": 20,
"path_with_namespace": "flightjs/Flight",
"default_branch": "master",
"default_branch": "main",
"ci_config_path": null,
"homepage": "http://example.com/flightjs/Flight",
"url": "ssh://example.com/flightjs/Flight.git",

View File

@ -137,7 +137,7 @@ Parameters:
```shell
curl --request POST \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/5/repository/tags?tag_name=test&ref=master"
--url "https://gitlab.example.com/api/v4/projects/5/repository/tags?tag_name=test&ref=main"
```
Example response:

View File

@ -203,7 +203,7 @@ Example response:
{
"file_name" : "dk.png",
"file_path" : "uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png",
"branch" : "master",
"branch" : "main",
"link" : {
"url" : "uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png",
"markdown" : "![dk](uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png)"

View File

@ -85,6 +85,8 @@ The user authorization step is automatically skipped for this application.
## View all authorized applications
> `k8s_proxy` [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/422408) in GitLab 16.4 [with a flag](../administration/feature_flags.md) named `k8s_proxy_pat`. Enabled by default.
To see all the application you've authorized with your GitLab credentials:
1. On the left sidebar, select your avatar.
@ -95,7 +97,7 @@ The GitLab OAuth 2 applications support scopes, which allow application to perfo
different actions. See the following table for all available scopes.
| Scope | Description |
| ------------------ | ----------- |
|--------------------| ----------- |
| `api` | Grants complete read/write access to the API, including all groups and projects, the container registry, and the package registry. |
| `read_user` | Grants read-only access to the authenticated user's profile through the /user API endpoint, which includes username, public email, and full name. Also grants access to read-only API endpoints under /users. |
| `read_api` | Grants read access to the API, including all groups and projects, the container registry, and the package registry. |
@ -108,6 +110,7 @@ different actions. See the following table for all available scopes.
| `profile` | Grants read-only access to the user's profile data using [OpenID Connect](openid_connect_provider.md). |
| `email` | Grants read-only access to the user's primary email address using [OpenID Connect](openid_connect_provider.md). |
| `create_runner` | Grants permission to create runners. |
| `k8s_proxy` | Grants permission to perform Kubernetes API calls using the agent for Kubernetes. |
At any time you can revoke any access by selecting **Revoke**.

View File

@ -5,62 +5,49 @@ info: To determine the technical writer assigned to the Stage/Group associated w
type: index, reference
---
# AI/ML powered features
# GitLab Duo
GitLab is creating AI-assisted features across our DevSecOps platform. These features aim to help increase velocity and solve key pain points across the software development lifecycle.
| Feature | Purpose | Large Language Model | Current availability | Maturity |
|-|-|-|-|-|
| [Suggested Reviewers](project/merge_requests/reviews/index.md#suggested-reviewers) | Assists in creating faster and higher-quality reviews by automatically suggesting reviewers for your merge request. | GitLab creates a machine learning model for each project, which is used to generate reviewers <br><br> [View the issue](https://gitlab.com/gitlab-org/modelops/applied-ml/applied-ml-updates/-/issues/10) | SaaS only | [Generally Available (GA)](../policy/experiment-beta-support.md#generally-available-ga) |
| [Code Suggestions](project/repository/code_suggestions/index.md) | Helps you write code more efficiently by viewing code suggestions as you type. | [Google Vertex Codey APIs](https://cloud.google.com/vertex-ai/docs/generative-ai/code/code-models-overview) | SaaS <br> Self-managed | [Beta](../policy/experiment-beta-support.md#beta) |
| [Vulnerability summary](application_security/vulnerabilities/index.md#explaining-a-vulnerability) | Helps you remediate vulnerabilities more efficiently, uplevel your skills, and write more secure code. | [Google Vertex Codey APIs](https://cloud.google.com/vertex-ai/docs/generative-ai/code/code-models-overview) <br><br> Anthropic's claude model if degraded performance | SaaS only <br><br> Ultimate tier | [Beta](../policy/experiment-beta-support.md#beta) |
| [Code explanation](#explain-code-in-the-web-ui-with-code-explanation) | Helps you understand code by explaining it in English language. | [Google Vertex Codey APIs](https://cloud.google.com/vertex-ai/docs/generative-ai/code/code-models-overview) | SaaS only <br><br> Ultimate tier | [Experiment](../policy/experiment-beta-support.md#experiment) |
| [Chat](#answer-questions-with-chat) | Process and generate text and code in a conversational manner. Helps you quickly identify useful information in large volumes of text in issues, epics, code, and GitLab documentation. | Anthropic's claude model <br><br> OpenAI Embeddings | SaaS only | [Experiment](../policy/experiment-beta-support.md#experiment) |
| [Value stream forecasting](analytics/value_streams_dashboard.md) | Assists you with predicting productivity metrics and identifying anomalies across your software development lifecycle. | Statistical forecasting | SaaS only | [Experiment](../policy/experiment-beta-support.md#experiment) |
| [Discussion summary](#summarize-issue-discussions-with-discussion-summary) | Assists with quickly getting everyone up to speed on lengthy conversations to help ensure you are all on the same page. | [Google Vertex Codey APIs](https://cloud.google.com/vertex-ai/docs/generative-ai/code/code-models-overview) | SaaS only | [Experiment](../policy/experiment-beta-support.md#experiment) |
| [Merge request summary](project/merge_requests/ai_in_merge_requests.md#summarize-merge-request-changes) | Efficiently communicate the impact of your merge request changes. | [Google Vertex Codey APIs](https://cloud.google.com/vertex-ai/docs/generative-ai/code/code-models-overview) | SaaS only | [Experiment](../policy/experiment-beta-support.md#experiment) |
| [Code review summary](project/merge_requests/ai_in_merge_requests.md#summarize-my-merge-request-review) | Helps ease merge request handoff between authors and reviewers and help reviewers efficiently understand suggestions. | [Google Vertex Codey APIs](https://cloud.google.com/vertex-ai/docs/generative-ai/code/code-models-overview) | SaaS only | [Experiment](../policy/experiment-beta-support.md#experiment) |
| [Merge request template population](project/merge_requests/ai_in_merge_requests.md#fill-in-merge-request-templates) | Generate a description for the merge request based on the contents of the template. | [Google Vertex Codey APIs](https://cloud.google.com/vertex-ai/docs/generative-ai/code/code-models-overview) | SaaS only | [Experiment](../policy/experiment-beta-support.md#experiment) |
| [Test generation](project/merge_requests/ai_in_merge_requests.md#generate-suggested-tests-in-merge-requests) | Automates repetitive tasks and helps catch bugs early. | [Google Vertex Codey APIs](https://cloud.google.com/vertex-ai/docs/generative-ai/code/code-models-overview) | SaaS only | [Experiment](../policy/experiment-beta-support.md#experiment) |
| [Git suggestions](https://gitlab.com/gitlab-org/gitlab/-/issues/409636) | Helps you discover or recall Git commands when and where you need them. | OpenAI | SaaS only | [Experiment](../policy/experiment-beta-support.md#experiment) |
| **Root cause analysis** | Assists you in determining the root cause for a pipeline failure and failed CI/CD build. | [Google Vertex Codey APIs](https://cloud.google.com/vertex-ai/docs/generative-ai/code/code-models-overview) | SaaS only | [Experiment](../policy/experiment-beta-support.md#experiment) |
| [Issue description generation](#summarize-an-issue-with-issue-description-generation) | Generate issue descriptions. | [Google Vertex Codey APIs](https://cloud.google.com/vertex-ai/docs/generative-ai/code/code-models-overview) | SaaS only | [Experiment](../policy/experiment-beta-support.md#experiment) |
## Enable AI/ML features
> Introduced in GitLab 16.0 and [actively being rolled out](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/118222).
The [Generally Available features](../policy/experiment-beta-support.md#generally-available-ga) listed in the previous table do not need to be enabled.
Prerequisites:
[Experiment features](../policy/experiment-beta-support.md#experiment) and [Beta features](../policy/experiment-beta-support.md#beta) (besides Code Suggestions) on SaaS must be enabled by a user who has the Owner role in the group. Their usage is subject to the [Testing Terms of Use](https://about.gitlab.com/handbook/legal/testing-agreement/).
- You must have the Owner role for the group.
In addition, all features built on large language models (LLM) from Google, Anthropic or OpenAI require that [third-party AI features are enabled](group/manage.md#enable-third-party-ai-features) (which they are by default). The table above shows which features are built on which LLM. To disable AI features powered by third-party APIs, clear this setting.
To enable AI/ML features for a top-level group:
Code Suggestions currently has its own settings:
- Enable [Experiment features](group/manage.md#enable-experiment-features).
- Enable [third-party AI features](group/manage.md#enable-third-party-ai-features) (enabled by default).
To disable AI features powered by third-party APIs, clear this setting.
- View [how to enable for self-managed](project/repository/code_suggestions/saas.md#enable-code-suggestions).
- View [how to enable for SaaS](project/repository/code_suggestions/self_managed.md#enable-code-suggestions-on-self-managed-gitlab).
These settings work together so you can have a mix of both experimental and third-party AI features.
The use of Code Suggestions is also subject to the [Testing Terms of Use](https://about.gitlab.com/handbook/legal/testing-agreement/).
## Generally Available AI features
![Settings to enable AI/ML features](img/enable_AI_ML_features.png)
When a feature is [Generally Available](../policy/experiment-beta-support.md#generally-available-ga),
it does not require [Experiment features to be enabled](group/manage.md#enable-experiment-features).
Some of these features might require [third-party AI features to be enabled](group/manage.md#enable-third-party-ai-features).
## Experimental AI features and how to use them
The following feature is Generally Available:
The following subsections describe the experimental AI features in more detail.
- [Suggested Reviewers](project/merge_requests/reviews/index.md#suggested-reviewers)
## Beta AI features
[Beta features](../policy/experiment-beta-support.md#beta) do not require
[Experiment features to be enabled](group/manage.md#enable-experiment-features).
The following features are in Beta:
- [Code Suggestions](project/repository/code_suggestions/index.md)
- [Explain this vulnerability](application_security/vulnerabilities/index.md#explaining-a-vulnerability)
## Experiment AI features
[Experiment](../policy/experiment-beta-support.md#experiment) AI features require
[Experiment features to be enabled](group/manage.md#enable-experiment-features) as well as [third-party AI services to be enabled](group/manage.md#enable-third-party-ai-features).
The following features are in Experiment:
- [Fill in merge request templates](project/merge_requests/ai_in_merge_requests.md#fill-in-merge-request-templates)
- [Summarize merge request changes](project/merge_requests/ai_in_merge_requests.md#summarize-merge-request-changes)
- [Summarize my merge request review](project/merge_requests/ai_in_merge_requests.md#summarize-my-merge-request-review)
- [Suggested merge or squash commit message](project/merge_requests/ai_in_merge_requests.md#suggested-merge-or-squash-commit-message)
- [Generate suggested tests in merge requests](project/merge_requests/ai_in_merge_requests.md#generate-suggested-tests-in-merge-requests)
The rest of the features described on this page are also in the Experiment phase.
### Explain Selected Code in the Web UI **(ULTIMATE SAAS EXPERIMENT)**
### Explain code in the Web UI with Code explanation **(ULTIMATE SAAS EXPERIMENT)**
> Introduced in GitLab 15.11 as an [Experiment](../policy/experiment-beta-support.md#experiment) on GitLab.com.
@ -75,7 +62,7 @@ By using a large language model, GitLab can explain the code in natural language
Prerequisites:
Additional prerequisites [beyond the two above](#experiment-ai-features).
Additional prerequisites in addition to [the settings listed previously](#enable-aiml-features).
- The project must be on GitLab.com.
- You must have the GitLab Ultimate subscription tier.
@ -109,7 +96,7 @@ code in a merge request:
We cannot guarantee that the large language model produces results that are correct. Use the explanation with caution.
### GitLab Duo Chat **(ULTIMATE SAAS EXPERIMENT)**
### Answer questions with Chat **(ULTIMATE SAAS EXPERIMENT)**
> Introduced in GitLab 16.0 as an [Experiment](../policy/experiment-beta-support.md#experiment).
@ -154,7 +141,7 @@ Or, you can add a comment in the [feedback issue](https://gitlab.com/gitlab-org/
NOTE:
Only the last 50 messages are retained in the chat history. The chat history expires 3 days after last use.
### Summarize issue discussions **(ULTIMATE SAAS EXPERIMENT)**
### Summarize issue discussions with Discussion summary **(ULTIMATE SAAS EXPERIMENT)**
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10344) in GitLab 16.0 as an [Experiment](../policy/experiment-beta-support.md#experiment).
@ -174,7 +161,7 @@ Provide feedback on this experimental feature in [issue 407779](https://gitlab.c
**Data usage**: When you use this feature, the text of public comments on the issue are sent to the large
language model referenced above.
### Show deployment frequency forecast **(ULTIMATE SAAS EXPERIMENT)**
### Forecast deployment frequency with Value stream forecasting **(ULTIMATE ALL EXPERIMENT)**
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10228) in GitLab 16.2 as an [Experiment](../policy/experiment-beta-support.md#experiment).
@ -191,9 +178,11 @@ In CI/CD Analytics, you can view a forecast of deployment frequency:
The forecast is displayed as a dotted line on the chart. Data is forecasted for a duration that is half of the selected date range.
For example, if you select a 30-day range, a forecast for the following 15 days is displayed.
![Forecast deployment frequency](img/forecast_deployment_frequency.png)
Provide feedback on this experimental feature in [issue 416833](https://gitlab.com/gitlab-org/gitlab/-/issues/416833).
### Generate issue descriptions **(ULTIMATE SAAS EXPERIMENT)**
### Summarize an issue with Issue description generation **(ULTIMATE SAAS EXPERIMENT)**
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10762) in GitLab 16.3 as an [Experiment](../policy/experiment-beta-support.md#experiment).

View File

@ -7,7 +7,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Analyze GitLab usage **(FREE ALL)**
GitLab provides different types of analytics insights at the instance, group, and project level.
These insights appear on the left sidebar, under [**Analyze**](../project/settings/index.md#remove-project-analytics-from-the-left-sidebar).
These insights appear on the left sidebar, under [**Analyze**](../project/settings/index.md#disable-project-analytics).
## Instance-level analytics

View File

@ -81,7 +81,7 @@ With compliance violations report, you can see a high-level view of merge reques
When you select a row in the compliance report, a drawer appears that provides:
- The project name and [compliance framework label](../../project/settings/index.md#add-a-compliance-framework-to-a-project),
- The project name and [compliance framework label](../../project/working_with_projects.md#add-a-compliance-framework-to-a-project),
if the project has one assigned.
- A link to the merge request that introduced the violation.
- The merge request's branch path in the format `[source] into [target]`.

View File

@ -263,7 +263,7 @@ For more information on the administration of LDAP and group sync, refer to the
NOTE:
When you add LDAP synchronization, if an LDAP user is a group member and they are not part of the LDAP group, they are removed from the group.
You can use a workaround to [manage project access through LDAP groups](../project/settings/index.md#manage-project-access-through-ldap-groups).
You can use a workaround to [manage project access through LDAP groups](../project/working_with_projects.md#manage-project-access-through-ldap-groups).
### Create group links via CN **(PREMIUM SELF)**

View File

@ -165,7 +165,7 @@ To configure a compliance pipeline:
- `.compliance-ci.yaml@gitlab-org/gitlab`.
This configuration is inherited by projects where the compliance framework label is
[applied](../project/settings/index.md#add-a-compliance-framework-to-a-project). In projects with the applied compliance
[applied](../project/working_with_projects.md#add-a-compliance-framework-to-a-project). In projects with the applied compliance
framework label, the compliance pipeline configuration is run instead of the labeled project's own pipeline configuration.
The user running the pipeline in the labeled project must at least have the Reporter role on the compliance project.

View File

@ -138,6 +138,8 @@ token.revoke!
## Scopes for a group access token
> `k8s_proxy` [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/422408) in GitLab 16.4 [with a flag](../../../administration/feature_flags.md) named `k8s_proxy_pat`. Enabled by default.
The scope determines the actions you can perform when you authenticate with a group access token.
| Scope | Description |
@ -150,6 +152,7 @@ The scope determines the actions you can perform when you authenticate with a gr
| `write_repository` | Grants read and write access (pull and push) to all repositories within a group. |
| `create_runner` | Grants permission to create runners in a group. |
| `ai_features` | Grants permission to perform API actions for GitLab Duo. |
| `k8s_proxy` | Grants permission to perform Kubernetes API calls using the agent for Kubernetes in a group. |
## Enable or disable group access token creation

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 MiB

View File

@ -170,7 +170,7 @@ The following table lists project permissions available for each role:
| [Projects](project/index.md):<br>Rename project | | | | ✓ | ✓ |
| [Projects](project/index.md):<br>Share (invite) projects with groups | | | | ✓ (7) | ✓ (7) |
| [Projects](project/index.md):<br>View 2FA status of members | | | | ✓ | ✓ |
| [Projects](project/index.md):<br>Assign project to a [compliance framework](project/settings/index.md#add-a-compliance-framework-to-a-project) | | | | | ✓ |
| [Projects](project/index.md):<br>Assign project to a [compliance framework](project/working_with_projects.md#add-a-compliance-framework-to-a-project) | | | | | ✓ |
| [Projects](project/index.md):<br>Archive project | | | | | ✓ |
| [Projects](project/index.md):<br>Change project visibility level | | | | | ✓ |
| [Projects](project/index.md):<br>Delete project | | | | | ✓ |

View File

@ -104,7 +104,8 @@ To view the last time a token was used:
## Personal access token scopes
> Personal access tokens no longer being able to access container or package registries [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/387721) in GitLab 16.0.
> - Personal access tokens no longer being able to access container or package registries [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/387721) in GitLab 16.0.
> - `k8s_proxy` [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/422408) in GitLab 16.4 [with a flag](../../administration/feature_flags.md) named `k8s_proxy_pat`. Enabled by default.
A personal access token can perform actions based on the assigned scopes.
@ -121,6 +122,7 @@ A personal access token can perform actions based on the assigned scopes.
| `admin_mode` | Grants permission to perform API actions as an administrator, when Admin Mode is enabled. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107875) in GitLab 15.8.) |
| `create_runner` | Grants permission to create runners. |
| `ai_features` | Grants permission to perform API actions for GitLab Duo. |
| `k8s_proxy` | Grants permission to perform Kubernetes API calls using the agent for Kubernetes. |
WARNING:
If you enabled [external authorization](../admin_area/settings/external_authorization.md), personal access tokens cannot access container or package registries. If you use personal access tokens to access these registries, this measure breaks this use of these tokens. Disable external authorization to use personal access tokens with container or package registries.

View File

@ -117,5 +117,5 @@ current Bitbucket public name, and reconnect if there's a mismatch:
1. Following reconnection, the user should use the API again to verify that their `extern_uid` in
the GitLab database now matches their current Bitbucket public name.
The importer must then [delete the imported project](../../project/working_with_projects.md#delete-a-project)
The importer must then [delete the imported project](../../project/settings/index.md#delete-a-project)
and import again.

View File

@ -24,7 +24,10 @@ Prerequisite:
Use the project general settings to edit your project details.
1. Sign in to GitLab with at least the Maintainer role.
Prerequisite:
- You must have at least the Maintainer role for the project.
1. On the left sidebar, select **Search or go to** and find your project.
1. Select **Settings > General**.
1. In the **Project name** text box, enter your project name.
@ -175,9 +178,9 @@ to move any project to any namespace.
### Transferring a GitLab SaaS project to a different subscription tier
When you transfer a project from a namespace licensed for GitLab SaaS Premium or Ultimate to GitLab Free, the following paid feature data is deleted:
When you transfer a project from a namespace licensed for GitLab SaaS Premium or Ultimate to GitLab Free:
- [Project access tokens](../../../user/project/settings/project_access_tokens.md) are revoked
- [Project access tokens](../../../user/project/settings/project_access_tokens.md) are revoked.
- [Pipeline subscriptions](../../../ci/pipelines/index.md#trigger-a-pipeline-when-an-upstream-project-is-rebuilt)
and [test cases](../../../ci/test_cases/index.md) are deleted.
@ -223,6 +226,10 @@ Prerequisite:
> - Default deletion behavior changed to delayed deletion on the Premium and Ultimate tier [on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/393622) and [on self-managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119606) in GitLab 16.0.
You can mark a project to be deleted.
After you delete a project:
- Projects in personal namespaces are deleted immediately.
- Projects in groups are deleted after a retention period.
Prerequisite:
@ -238,6 +245,8 @@ To delete a project:
This action deletes the project and all associated resources (such as issues and merge requests).
You can also [delete projects using the Rails console](../working_with_projects.md#delete-a-project-using-console).
### Delayed project deletion **(PREMIUM ALL)**
> - [Enabled for projects in personal namespaces](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/89466) in GitLab 15.1.
@ -249,6 +258,10 @@ Projects in a group (not a personal namespace) can be deleted after a delay peri
On self-managed instances, group administrators can define a deletion delay period of between 1 and 90 days.
On SaaS, there is a non-adjustable default retention period of seven days.
You can [view projects that are pending deletion](../working_with_projects.md#view-projects-pending-deletion),
and use the Rails console to
[find projects that are pending deletion](../working_with_projects.md#find-projects-that-are-pending-deletion).
### Delete a project immediately
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/191367) in GitLab 14.1.
@ -283,10 +296,10 @@ To restore a project marked for deletion:
1. Expand **Advanced**.
1. In the Restore project section, select **Restore project**.
## Remove project analytics from the left sidebar
## Disable project analytics
By default, [analytics for a project](../../analytics/index.md#project-level-analytics) are displayed under the **Analyze** item in the left sidebar.
To remove this item:
To disable this feature and remove the **Analyze** item from the left sidebar:
1. On the left sidebar, select **Search or go to** and find your project.
1. Select **Settings > General**.
@ -294,28 +307,6 @@ To remove this item:
1. Turn off the **Analytics** toggle.
1. Select **Save changes**.
## Add a compliance framework to a project **(PREMIUM)**
You can
[add compliance frameworks to projects](../../group/compliance_frameworks.md#add-a-compliance-framework-to-a-project)
in a group that has a compliance framework.
## Manage project access through LDAP groups
You can [use LDAP to manage group membership](../../group/access_and_permissions.md#manage-group-memberships-via-ldap).
You cannot use LDAP groups to manage project access, but you can use the following workaround.
Prerequisites:
- You must [integrate LDAP with GitLab](../../../administration/auth/ldap/index.md).
- You must be an administrator.
1. [Create a group](../../group/index.md#create-a-group) to track membership of your project.
1. [Set up LDAP synchronization](../../../administration/auth/ldap/ldap_synchronization.md) for that group.
1. To use LDAP groups to manage access to a project,
[add the LDAP-synchronized group as a member](../members/index.md#add-groups-to-a-project) to the project.
## Disable CVE identifier request in issues **(FREE SAAS)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41203) in GitLab 13.4, only for public projects on GitLab.com.

View File

@ -79,6 +79,8 @@ To revoke a project access token:
## Scopes for a project access token
> `k8s_proxy` [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/422408) in GitLab 16.4 [with a flag](../../../administration/feature_flags.md) named `k8s_proxy_pat`. Enabled by default.
The scope determines the actions you can perform when you authenticate with a project access token.
NOTE:
@ -94,6 +96,7 @@ See the warning in [create a project access token](#create-a-project-access-toke
| `write_repository` | Grants read and write access (pull and push) to the repository. |
| `create_runner` | Grants permission to create runners in the project. |
| `ai_features` | Grants permission to perform API actions for GitLab Duo. |
| `k8s_proxy` | Grants permission to perform Kubernetes API calls using the agent for Kubernetes in the project. |
## Enable or disable project access token creation

View File

@ -135,22 +135,6 @@ To add a star to a project:
1. On the left sidebar, select **Search or go to** and find your project.
1. In the upper-right corner of the page, select **Star**.
## Delete a project
After you delete a project:
- Projects in personal namespaces are deleted immediately.
- Projects in groups are [deleted after a retention period](../project/settings/index.md#delayed-project-deletion).
To delete a project:
1. On the left sidebar, select **Search or go to** and find your project.
1. Select **Settings > General**.
1. Expand the **Advanced** section.
1. Scroll down to the **Delete project** section.
1. Select **Delete project**.
1. Confirm this action by completing the field.
## View projects pending deletion **(PREMIUM ALL)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37014) in GitLab 13.3 for Administrators.
@ -408,6 +392,26 @@ To access the Geo secondary server with HTTP:
The `go get` request generates HTTP traffic to the primary Geo server. When the module
download starts, the `insteadOf` configuration sends the traffic to the secondary Geo server.
## Add a compliance framework to a project **(PREMIUM)**
You can add compliance frameworks to projects in a group that has a [compliance framework](../group/compliance_frameworks.md).
## Manage project access through LDAP groups
You can [use LDAP to manage group membership](../group/access_and_permissions.md#manage-group-memberships-via-ldap).
You cannot use LDAP groups to manage project access, but you can use the following workaround.
Prerequisites:
- You must [integrate LDAP with GitLab](../../administration/auth/ldap/index.md).
- You must be an administrator.
1. [Create a group](../group/index.md#create-a-group) to track membership of your project.
1. [Set up LDAP synchronization](../../administration/auth/ldap/ldap_synchronization.md) for that group.
1. To use LDAP groups to manage access to a project,
[add the LDAP-synchronized group as a member](../group/manage.md) to the project.
## Related topics
- [Import a project](../../user/project/import/index.md).

View File

@ -16,6 +16,8 @@ require 'redis/store/factory'
module Gitlab
module Redis
class Wrapper
InvalidPathError = Class.new(StandardError)
class << self
delegate :params, :url, :store, to: :new
@ -122,12 +124,14 @@ module Gitlab
config = raw_config_hash
config[:instrumentation_class] ||= self.class.instrumentation_class
if config[:cluster].present?
config[:db] = 0 # Redis Cluster only supports db 0
config
else
parse_redis_url(config)
end
result = if config[:cluster].present?
config[:db] = 0 # Redis Cluster only supports db 0
config
else
parse_redis_url(config)
end
parse_client_tls_options(result)
end
def parse_redis_url(config)
@ -153,6 +157,33 @@ module Gitlab
end
end
def parse_client_tls_options(config)
return config unless config&.key?(:ssl_params)
# Only cert_file and key_file are handled in this method. ca_file and
# ca_path are Strings, so they can be passed as-is. cert_store is not
# currently supported.
cert_file = config[:ssl_params].delete(:cert_file)
key_file = config[:ssl_params].delete(:key_file)
unless ::File.exist?(cert_file)
raise InvalidPathError,
"Certificate file #{cert_file} specified in in `resque.yml` does not exist."
end
config[:ssl_params][:cert] = OpenSSL::X509::Certificate.new(File.read(cert_file))
unless ::File.exist?(key_file)
raise InvalidPathError,
"Key file #{key_file} specified in in `resque.yml` does not exist."
end
config[:ssl_params][:key] = OpenSSL::PKey.read(File.read(key_file))
config
end
def raw_config_hash
config_data = fetch_config

View File

@ -38,8 +38,8 @@ module Gitlab
button :confirm_purchase, text: /Confirm purchase/
# Order Summary
div :selected_plan, 'data-testid': 'selected-plan'
div :order_total, 'data-testid': 'total-amount'
div :selected_plan
div :total_amount
end
end
end

View File

@ -86,6 +86,40 @@ module Gitlab
# This is a stub, used for indexing. The method is dynamically generated.
end
# @note Defined as +text_field :quantity+
# @return [String] The text content or value of +quantity+
def quantity
# This is a stub, used for indexing. The method is dynamically generated.
end
# Set the value of quantity
# @example
# Gitlab::Page::Subscriptions::New.perform do |new|
# new.quantity = 'value'
# end
# @param value [String] The value to set.
def quantity=(value)
# This is a stub, used for indexing. The method is dynamically generated.
end
# @example
# Gitlab::Page::Subscriptions::New.perform do |new|
# expect(new.quantity_element).to exist
# end
# @return [Watir::TextField] The raw +TextField+ element
def quantity_element
# This is a stub, used for indexing. The method is dynamically generated.
end
# @example
# Gitlab::Page::Subscriptions::New.perform do |new|
# expect(new).to be_quantity
# end
# @return [Boolean] true if the +quantity+ element is present on the page
def quantity?
# This is a stub, used for indexing. The method is dynamically generated.
end
# @note Defined as +button :continue_to_billing+
# Clicks +continue_to_billing+
def continue_to_billing
@ -539,6 +573,54 @@ module Gitlab
def confirm_purchase?
# This is a stub, used for indexing. The method is dynamically generated.
end
# @note Defined as +div :selected_plan+
# @return [String] The text content or value of +selected_plan+
def selected_plan
# This is a stub, used for indexing. The method is dynamically generated.
end
# @example
# Gitlab::Page::Subscriptions::New.perform do |new|
# expect(new.selected_plan_element).to exist
# end
# @return [Watir::Div] The raw +Div+ element
def selected_plan_element
# This is a stub, used for indexing. The method is dynamically generated.
end
# @example
# Gitlab::Page::Subscriptions::New.perform do |new|
# expect(new).to be_selected_plan
# end
# @return [Boolean] true if the +selected_plan+ element is present on the page
def selected_plan?
# This is a stub, used for indexing. The method is dynamically generated.
end
# @note Defined as +div :total_amount+
# @return [String] The text content or value of +total_amount+
def total_amount
# This is a stub, used for indexing. The method is dynamically generated.
end
# @example
# Gitlab::Page::Subscriptions::New.perform do |new|
# expect(new.total_amount_element).to exist
# end
# @return [Watir::Div] The raw +Div+ element
def total_amount_element
# This is a stub, used for indexing. The method is dynamically generated.
end
# @example
# Gitlab::Page::Subscriptions::New.perform do |new|
# expect(new).to be_total_amount
# end
# @return [Boolean] true if the +total_amount+ element is present on the page
def total_amount?
# This is a stub, used for indexing. The method is dynamically generated.
end
end
end
end

View File

@ -70,6 +70,16 @@ module QA
"transferred",
"locked",
"unlocked",
"deployed",
"marked_as_duplicate",
"unmarked_as_duplicate",
"connected",
"disconnected",
"moved_columns_in_project",
"added_to_project",
"removed_from_project",
"base_ref_deleted",
"converted_to_discussion",
# mentions are supported but they can be reported differently on gitlab's side
# for example mention of issue creation in pr will be reported in the issue on gitlab side
# or referenced in github will still create a 'mentioned in' comment in gitlab

View File

@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe ProjectCiCdSetting do
RSpec.describe ProjectCiCdSetting, feature_category: :continuous_integration do
using RSpec::Parameterized::TableSyntax
describe 'validations' do

View File

@ -310,12 +310,11 @@ RSpec.describe API::BulkImports, feature_category: :importers do
}
end
it 'returns blocked url message in the error' do
it 'returns blocked url message in the error', :aggregate_failures do
request
expect(response).to have_gitlab_http_status(:unprocessable_entity)
expect(json_response['message']).to include("Url is blocked: Only allowed schemes are http, https")
expect(json_response['message']).to eq("URL is blocked: Only allowed schemes are http, https")
end
end
@ -335,16 +334,16 @@ RSpec.describe API::BulkImports, feature_category: :importers do
}
end
it 'returns blocked url error' do
it 'returns blocked url error', :aggregate_failures do
stub_request(:get, "http://gitlab.example/api/v4/#{source_entity_type}/#{source_entity_identifier}/export_relations/status?page=1&per_page=30&private_token=access_token")
.to_return(status: 404, body: "", headers: {})
.to_return(status: 404, body: "{'error':'404 Not Found'}")
request
expect(response).to have_gitlab_http_status(:unprocessable_entity)
expect(json_response['message']).to include("Group import disabled on source or destination instance. " \
"Ask an administrator to enable it on both instances and try again.")
expect(json_response['message']).to eq(
"Unsuccessful response 404 from /api/v4/groups/full_path/export_relations/status. Body: {'error':'404 Not Found'}"
)
end
end

View File

@ -62,6 +62,24 @@ RSpec.describe BulkImports::CreateService, feature_category: :importers do
end
end
# response when authorize_admin_project in API endpoint fails
context 'when direct transfer status query returns a 403' do
it 'raises a ServiceResponse::Error' do
expect_next_instance_of(BulkImports::Clients::HTTP) do |client|
expect(client).to receive(:validate_instance_version!).and_return(true)
expect(client).to receive(:get)
.with("/groups/full%2Fpath%2Fto%2Fgroup1/export_relations/status")
.and_raise(BulkImports::NetworkError, '403 Forbidden')
end
result = subject.execute
expect(result).to be_a(ServiceResponse)
expect(result).to be_error
expect(result.message).to eq("403 Forbidden")
end
end
context 'when direct transfer setting query returns a 404' do
it 'raises a ServiceResponse::Error' do
stub_request(:get, 'http://gitlab.example/api/v4/version?private_token=token').to_return(status: 404)

View File

@ -365,6 +365,90 @@ RSpec.shared_examples "redis_shared_examples" do
end
end
describe "#parse_client_tls_options" do
let(:dummy_certificate) { OpenSSL::X509::Certificate.new }
let(:dummy_key) { OpenSSL::PKey::RSA.new }
let(:resque_yaml_config_without_tls) { { url: 'redis://localhost:6379' } }
let(:resque_yaml_config_with_tls) do
{
url: 'rediss://localhost:6380',
ssl_params: {
cert_file: '/tmp/client.crt',
key_file: '/tmp/client.key'
}
}
end
let(:parsed_config_with_tls) do
{
url: 'rediss://localhost:6380',
ssl_params: {
cert: dummy_certificate,
key: dummy_key
}
}
end
before do
allow(::File).to receive(:exist?).and_call_original
allow(::File).to receive(:read).and_call_original
end
context 'when configuration does not have TLS related options' do
it 'returns the coniguration as-is' do
expect(subject.send(:parse_client_tls_options,
resque_yaml_config_without_tls)).to eq(resque_yaml_config_without_tls)
end
end
context 'when specified certificate file does not exist' do
before do
allow(::File).to receive(:exist?).with("/tmp/client.crt").and_return(false)
allow(::File).to receive(:exist?).with("/tmp/client.key").and_return(true)
end
it 'raises error about missing certificate file' do
expect do
subject.send(:parse_client_tls_options,
resque_yaml_config_with_tls)
end.to raise_error(Gitlab::Redis::Wrapper::InvalidPathError,
"Certificate file /tmp/client.crt specified in in `resque.yml` does not exist.")
end
end
context 'when specified key file does not exist' do
before do
allow(::File).to receive(:exist?).with("/tmp/client.crt").and_return(true)
allow(::File).to receive(:read).with("/tmp/client.crt").and_return("DUMMY_CERTIFICATE")
allow(OpenSSL::X509::Certificate).to receive(:new).with("DUMMY_CERTIFICATE").and_return(dummy_certificate)
allow(::File).to receive(:exist?).with("/tmp/client.key").and_return(false)
end
it 'raises error about missing key file' do
expect do
subject.send(:parse_client_tls_options,
resque_yaml_config_with_tls)
end.to raise_error(Gitlab::Redis::Wrapper::InvalidPathError,
"Key file /tmp/client.key specified in in `resque.yml` does not exist.")
end
end
context 'when configuration valid TLS related options' do
before do
allow(::File).to receive(:exist?).with("/tmp/client.crt").and_return(true)
allow(::File).to receive(:exist?).with("/tmp/client.key").and_return(true)
allow(::File).to receive(:read).with("/tmp/client.crt").and_return("DUMMY_CERTIFICATE")
allow(::File).to receive(:read).with("/tmp/client.key").and_return("DUMMY_KEY")
allow(OpenSSL::X509::Certificate).to receive(:new).with("DUMMY_CERTIFICATE").and_return(dummy_certificate)
allow(OpenSSL::PKey).to receive(:read).with("DUMMY_KEY").and_return(dummy_key)
end
it "converts cert_file and key_file appropriately" do
expect(subject.send(:parse_client_tls_options, resque_yaml_config_with_tls)).to eq(parsed_config_with_tls)
end
end
end
describe '#fetch_config' do
before do
FileUtils.mkdir_p(File.join(rails_root, 'config'))