From 85dc423f7090da0a52c73eb66faf22ddb20efff9 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 19 Sep 2020 01:45:44 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-4-stable-ee --- spec/fixtures/api/schemas/entities/discussion.json | 3 + .../api/schemas/entities/github/branches.json | 16 +++ .../api/schemas/entities/github/commit.json | 61 ++++++++++++ .../api/schemas/entities/github/pull_request.json | 108 +++++++++++++++++++++ .../api/schemas/entities/github/pull_requests.json | 6 ++ .../api/schemas/entities/github/repositories.json | 16 +++ .../api/schemas/entities/github/repository.json | 16 +++ .../fixtures/api/schemas/entities/github/user.json | 13 +++ .../api/schemas/entities/group_group_link.json | 29 ++++++ .../api/schemas/entities/issue_sidebar.json | 5 +- .../api/schemas/entities/lint_job_entity.json | 58 +++++++++++ .../api/schemas/entities/lint_result_entity.json | 25 +++++ .../api/schemas/entities/merge_request_basic.json | 7 ++ .../entities/merge_request_poll_cached_widget.json | 6 +- .../entities/merge_request_poll_widget.json | 8 ++ .../schemas/entities/merge_request_sidebar.json | 4 +- .../entities/merge_request_sidebar_extras.json | 4 + spec/fixtures/api/schemas/group_group_links.json | 6 ++ spec/fixtures/api/schemas/group_member.json | 78 +++++++++++++++ spec/fixtures/api/schemas/group_members.json | 6 ++ spec/fixtures/api/schemas/issue.json | 2 +- spec/fixtures/api/schemas/jira_connect/author.json | 12 +++ spec/fixtures/api/schemas/jira_connect/branch.json | 19 ++++ spec/fixtures/api/schemas/jira_connect/commit.json | 29 ++++++ spec/fixtures/api/schemas/jira_connect/file.json | 14 +++ .../api/schemas/jira_connect/pull_request.json | 26 +++++ .../api/schemas/jira_connect/repository.json | 34 +++++++ .../api/schemas/public_api/v4/issue_link.json | 20 ++++ .../api/schemas/public_api/v4/issue_links.json | 9 ++ .../api/schemas/public_api/v4/milestone.json | 4 +- .../public_api/v4/milestone_with_stats.json | 4 +- .../public_api/v4/packages/collection_package.json | 34 +++++++ .../schemas/public_api/v4/packages/packages.json | 2 +- spec/fixtures/emails/x_envelope_to_header.eml | 32 ++++++ .../gitlab/database/structure_example_cleaned.sql | 16 ++- .../importers/bitbucket_server/activities.json | 75 +++++++++----- .../importers/bitbucket_server/pull_request.json | 5 +- .../gitlab/metrics/dashboard/broken_yml_syntax.yml | 13 +++ spec/fixtures/markdown.md.erb | 9 ++ .../code_coverage_with_multiple_files.json | 14 +++ spec/fixtures/unescaped_chars.po | 8 +- spec/fixtures/valid.po | 2 +- spec/fixtures/whats_new/01.yml | 2 + spec/fixtures/whats_new/02.yml | 2 + spec/fixtures/whats_new/05.yml | 2 + 45 files changed, 813 insertions(+), 51 deletions(-) create mode 100644 spec/fixtures/api/schemas/entities/github/branches.json create mode 100644 spec/fixtures/api/schemas/entities/github/commit.json create mode 100644 spec/fixtures/api/schemas/entities/github/pull_request.json create mode 100644 spec/fixtures/api/schemas/entities/github/pull_requests.json create mode 100644 spec/fixtures/api/schemas/entities/github/repositories.json create mode 100644 spec/fixtures/api/schemas/entities/github/repository.json create mode 100644 spec/fixtures/api/schemas/entities/github/user.json create mode 100644 spec/fixtures/api/schemas/entities/group_group_link.json create mode 100644 spec/fixtures/api/schemas/entities/lint_job_entity.json create mode 100644 spec/fixtures/api/schemas/entities/lint_result_entity.json create mode 100644 spec/fixtures/api/schemas/group_group_links.json create mode 100644 spec/fixtures/api/schemas/group_member.json create mode 100644 spec/fixtures/api/schemas/group_members.json create mode 100644 spec/fixtures/api/schemas/jira_connect/author.json create mode 100644 spec/fixtures/api/schemas/jira_connect/branch.json create mode 100644 spec/fixtures/api/schemas/jira_connect/commit.json create mode 100644 spec/fixtures/api/schemas/jira_connect/file.json create mode 100644 spec/fixtures/api/schemas/jira_connect/pull_request.json create mode 100644 spec/fixtures/api/schemas/jira_connect/repository.json create mode 100644 spec/fixtures/api/schemas/public_api/v4/issue_link.json create mode 100644 spec/fixtures/api/schemas/public_api/v4/issue_links.json create mode 100644 spec/fixtures/api/schemas/public_api/v4/packages/collection_package.json create mode 100644 spec/fixtures/emails/x_envelope_to_header.eml create mode 100644 spec/fixtures/lib/gitlab/metrics/dashboard/broken_yml_syntax.yml create mode 100644 spec/fixtures/pipeline_artifacts/code_coverage_with_multiple_files.json create mode 100644 spec/fixtures/whats_new/01.yml create mode 100644 spec/fixtures/whats_new/02.yml create mode 100644 spec/fixtures/whats_new/05.yml (limited to 'spec/fixtures') diff --git a/spec/fixtures/api/schemas/entities/discussion.json b/spec/fixtures/api/schemas/entities/discussion.json index 21d8efe0b2b..2afabcc9195 100644 --- a/spec/fixtures/api/schemas/entities/discussion.json +++ b/spec/fixtures/api/schemas/entities/discussion.json @@ -60,6 +60,9 @@ "resolve_with_issue_path": { "type": "string" }, "cached_markdown_version": { "type": "integer" }, "human_access": { "type": ["string", "null"] }, + "is_noteable_author": { "type": "boolean" }, + "is_contributor": { "type": "boolean" }, + "project_name": { "type": "string" }, "toggle_award_path": { "type": "string" }, "path": { "type": "string" }, "commands_changes": { "type": "object", "additionalProperties": true }, diff --git a/spec/fixtures/api/schemas/entities/github/branches.json b/spec/fixtures/api/schemas/entities/github/branches.json new file mode 100644 index 00000000000..ee3da3704f3 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/branches.json @@ -0,0 +1,16 @@ +{ + "type": "array", + "properties" : { + "name": { "type": "string" }, + "commit": { + "type": "object", + "required": ["sha", "type"], + "properties" : { + "sha": { "type": "string" }, + "type": { "type": "string" } + }, + "additionalProperties": false + }, + "additionalProperties": false + } +} diff --git a/spec/fixtures/api/schemas/entities/github/commit.json b/spec/fixtures/api/schemas/entities/github/commit.json new file mode 100644 index 00000000000..698d933be07 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/commit.json @@ -0,0 +1,61 @@ +{ + "type": "object", + "properties" : { + "sha": { "type": "string" }, + "parents": { + "type": "array", + "properties": { + "sha": { "type": "string" } + }, + "additionalProperties": false + }, + "author": { + "type": "object", + "required": ["login", "email"], + "properties" : { + "login": { "type": ["string", "null"] }, + "email": { "type": "string" } + }, + "additionalProperties": false + }, + "committer": { + "type": "object", + "required": ["login", "email"], + "properties" : { + "login": { "type": ["string", "null"] }, + "email": { "type": "string" } + }, + "additionalProperties": false + }, + "commit": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "author": { + "type": "object", + "required": ["name", "email", "date", "type"], + "properties" : { + "name": { "type": "string" }, + "email": { "type": "string" }, + "date": { "type": "date" }, + "type": { "type": "string" } + }, + "additionalProperties": false + }, + "committer": { + "type": "object", + "required": ["name", "email", "date", "type"], + "properties" : { + "name": { "type": "string" }, + "email": { "type": "string" }, + "date": { "type": "date" }, + "type": { "type": "string" } + }, + "additionalProperties": false + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } +} diff --git a/spec/fixtures/api/schemas/entities/github/pull_request.json b/spec/fixtures/api/schemas/entities/github/pull_request.json new file mode 100644 index 00000000000..6c24879b800 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/pull_request.json @@ -0,0 +1,108 @@ +{ + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "body": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": "integer" + }, + "number": { + "type": "integer" + }, + "state": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "merged": { + "type": "boolean" + }, + "merged_at": { + "type": [ + "date", + "null" + ] + }, + "closed_at": { + "type": [ + "date", + "null" + ] + }, + "updated_at": { + "type": "date" + }, + "assignee": { + "$ref": "user.json" + }, + "author": { + "$ref": "user.json" + }, + "head": { + "type": "object", + "required": [ + "label", + "ref", + "repo" + ], + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "repo": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "repository.json" + } + ] + } + }, + "additionalProperties": false + }, + "base": { + "type": "object", + "required": [ + "label", + "ref", + "repo" + ], + "properties": { + "label": { + "type": "string" + }, + "ref": { + "type": "string" + }, + "repo": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "repository.json" + } + ] + } + }, + "additionalProperties": false + }, + "additionalProperties": false + } +} \ No newline at end of file diff --git a/spec/fixtures/api/schemas/entities/github/pull_requests.json b/spec/fixtures/api/schemas/entities/github/pull_requests.json new file mode 100644 index 00000000000..4dddeb5fa20 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/pull_requests.json @@ -0,0 +1,6 @@ +{ + "type": "array", + "items": { + "$ref": "pull_request.json" + } +} diff --git a/spec/fixtures/api/schemas/entities/github/repositories.json b/spec/fixtures/api/schemas/entities/github/repositories.json new file mode 100644 index 00000000000..26457901ef2 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/repositories.json @@ -0,0 +1,16 @@ +{ + "type": "array", + "properties" : { + "id": { "type": "integer" }, + "name": { "type": "string" }, + "owner": { + "type": "object", + "required": ["login"], + "properties" : { + "login": { "type": "string" } + }, + "additionalProperties": false + }, + "additionalProperties": false + } +} diff --git a/spec/fixtures/api/schemas/entities/github/repository.json b/spec/fixtures/api/schemas/entities/github/repository.json new file mode 100644 index 00000000000..44d7d059140 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/repository.json @@ -0,0 +1,16 @@ +{ + "type": "object", + "properties": { + "id": { "type": "integer" }, + "name": { "type": "string" }, + "owner": { + "type": "object", + "required": ["login"], + "properties" : { + "login": { "type": "string" } + }, + "additionalProperties": false + }, + "additionalProperties": false + } +} diff --git a/spec/fixtures/api/schemas/entities/github/user.json b/spec/fixtures/api/schemas/entities/github/user.json new file mode 100644 index 00000000000..3d772a0c648 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/github/user.json @@ -0,0 +1,13 @@ +{ + "type": "object", + "required": ["id", "login", "url", "avatar_url"], + "properties" : { + "id": { "type": "integer" }, + "login": { "type": "string" }, + "url": { "type": "string" }, + "avatar_url": { "type": "string" }, + "html_url": { "type": "string" } + }, + "additionalProperties": false +} + diff --git a/spec/fixtures/api/schemas/entities/group_group_link.json b/spec/fixtures/api/schemas/entities/group_group_link.json new file mode 100644 index 00000000000..4c9aae140d2 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/group_group_link.json @@ -0,0 +1,29 @@ +{ + "type": "object", + "required": ["id", "created_at", "expires_at", "access_level"], + "properties": { + "id": { "type": "integer" }, + "created_at": { "type": "date-time" }, + "expires_at": { "type": ["date-time", "null"] }, + "access_level": { + "type": "object", + "required": ["integer_value", "string_value"], + "properties": { + "integer_value": { "type": "integer" }, + "string_value": { "type": "string" } + } + }, + "shared_with_group": { + "type": "object", + "required": ["id", "name", "full_name", "full_path", "avatar_url", "web_url"], + "properties": { + "id": { "type": "integer" }, + "name": { "type": "string" }, + "full_name": { "type": "string" }, + "full_path": { "type": "string" }, + "avatar_url": { "type": ["string", "null"] }, + "web_url": { "type": "string" } + } + } + } +} diff --git a/spec/fixtures/api/schemas/entities/issue_sidebar.json b/spec/fixtures/api/schemas/entities/issue_sidebar.json index 93adb493d1b..717eb4992ea 100644 --- a/spec/fixtures/api/schemas/entities/issue_sidebar.json +++ b/spec/fixtures/api/schemas/entities/issue_sidebar.json @@ -42,6 +42,9 @@ "project_labels_path": { "type": "string" }, "toggle_subscription_path": { "type": "string" }, "move_issue_path": { "type": "string" }, - "projects_autocomplete_path": { "type": "string" } + "projects_autocomplete_path": { "type": "string" }, + "supports_time_tracking": { "type": "boolean" }, + "supports_milestone": { "type": "boolean" }, + "supports_severity": { "type": "boolean" } } } diff --git a/spec/fixtures/api/schemas/entities/lint_job_entity.json b/spec/fixtures/api/schemas/entities/lint_job_entity.json new file mode 100644 index 00000000000..b85f58d4291 --- /dev/null +++ b/spec/fixtures/api/schemas/entities/lint_job_entity.json @@ -0,0 +1,58 @@ +{ + "type": "object", + "required": [ + "name", + "stage", + "before_script", + "script", + "after_script", + "tag_list", + "environment", + "when", + "allow_failure", + "only", + "except" + ], + "properties": { + "name": { + "type": ["string"] + }, + "stage": { + "type": ["string"] + }, + "before_script": { + "type": ["array"], + "items": { "type": "string" } + }, + "script": { + "type": ["array"], + "items": { "type": "string" } + }, + "after_script": { + "type": ["array"], + "items": { "type": "string" } + }, + "when": { + "items": { "type": ["string"] } + }, + "allow_failure": { + "type": ["boolean"] + }, + "environment": { + "type": ["string", null] + }, + "tag_list": { + "type": ["array"], + "items": { "type": "string" } + }, + "only": { + "type": ["array", "object", null], + "items": { "type": ["string", "array"]} + }, + "except": { + "type": ["array", "object", null], + "items": { "type": ["string", "array"]} + } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/entities/lint_result_entity.json b/spec/fixtures/api/schemas/entities/lint_result_entity.json new file mode 100644 index 00000000000..502e1dac1ac --- /dev/null +++ b/spec/fixtures/api/schemas/entities/lint_result_entity.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "required": ["valid", "errors", "jobs", "warnings"], + "properties": { + "errors": { + "type": "array", + "items": { "type": "string" } + }, + "warnings": { + "type": "array", + "items": { "type": "string" } + }, + "valid": { + "type": "boolean" + }, + "jobs": { + "type": ["array", null], + "items": { + "type": "object", + "$ref": "lint_job_entity.json" + } + } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/entities/merge_request_basic.json b/spec/fixtures/api/schemas/entities/merge_request_basic.json index ac0a0314455..3c19528d71b 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_basic.json +++ b/spec/fixtures/api/schemas/entities/merge_request_basic.json @@ -15,6 +15,13 @@ "$ref": "../public_api/v4/user/basic.json" } }, + "reviewers": { + "type": ["array"], + "items": { + "type": "object", + "$ref": "../public_api/v4/user/basic.json" + } + }, "milestone": { "type": [ "object", "null" ] }, diff --git a/spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json b/spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json index b40b71d2cd6..3d6b20896ce 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json +++ b/spec/fixtures/api/schemas/entities/merge_request_poll_cached_widget.json @@ -7,8 +7,8 @@ "title": { "type": "string" }, "auto_merge_enabled": { "type": "boolean" }, "state": { "type": "string" }, - "merge_commit_sha": { "type": ["string", "null"] }, - "short_merge_commit_sha": { "type": ["string", "null"] }, + "merged_commit_sha": { "type": ["string", "null"] }, + "short_merged_commit_sha": { "type": ["string", "null"] }, "merge_error": { "type": ["string", "null"] }, "merge_status": { "type": "string" }, "merge_user_id": { "type": ["integer", "null"] }, @@ -40,7 +40,7 @@ "diverged_commits_count": { "type": "integer" }, "target_branch_commits_path": { "type": "string" }, "target_branch_tree_path": { "type": "string" }, - "merge_commit_path": { "type": ["string", "null"] }, + "merged_commit_path": { "type": ["string", "null"] }, "source_branch_with_namespace_link": { "type": "string" }, "source_branch_path": { "type": "string" } } diff --git a/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json b/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json index 1eda0e12920..be2fe19b067 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json +++ b/spec/fixtures/api/schemas/entities/merge_request_poll_widget.json @@ -22,6 +22,14 @@ "only_allow_merge_if_pipeline_succeeds": { "type": "boolean" }, "has_ci": { "type": "boolean" }, "ci_status": { "type": ["string", "null"] }, + "pipeline_coverage_delta": { "type": ["float", "null"] }, + "builds_with_coverage": { + "type": ["array", "null"], + "items": { + "type": "object", + "required": ["name", "coverage"] + } + }, "cancel_auto_merge_path": { "type": ["string", "null"] }, "test_reports_path": { "type": ["string", "null"] }, "create_issue_to_resolve_discussions_path": { "type": ["string", "null"] }, diff --git a/spec/fixtures/api/schemas/entities/merge_request_sidebar.json b/spec/fixtures/api/schemas/entities/merge_request_sidebar.json index 9945de8a856..633203aed28 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_sidebar.json +++ b/spec/fixtures/api/schemas/entities/merge_request_sidebar.json @@ -51,6 +51,8 @@ "project_labels_path": { "type": "string" }, "toggle_subscription_path": { "type": "string" }, "move_issue_path": { "type": "string" }, - "projects_autocomplete_path": { "type": "string" } + "projects_autocomplete_path": { "type": "string" }, + "supports_time_tracking": { "type": "boolean" }, + "supports_milestone": { "type": "boolean" } } } diff --git a/spec/fixtures/api/schemas/entities/merge_request_sidebar_extras.json b/spec/fixtures/api/schemas/entities/merge_request_sidebar_extras.json index 11076ec73de..c54ae551d6a 100644 --- a/spec/fixtures/api/schemas/entities/merge_request_sidebar_extras.json +++ b/spec/fixtures/api/schemas/entities/merge_request_sidebar_extras.json @@ -17,6 +17,10 @@ "assignees": { "type": "array", "items": { "$ref": "../public_api/v4/user/basic.json" } + }, + "reviewers": { + "type": "array", + "items": { "$ref": "../public_api/v4/user/basic.json" } } }, "additionalProperties": false diff --git a/spec/fixtures/api/schemas/group_group_links.json b/spec/fixtures/api/schemas/group_group_links.json new file mode 100644 index 00000000000..f8b4e7f035b --- /dev/null +++ b/spec/fixtures/api/schemas/group_group_links.json @@ -0,0 +1,6 @@ +{ + "type": "array", + "items": { + "$ref": "entities/group_group_link.json" + } +} diff --git a/spec/fixtures/api/schemas/group_member.json b/spec/fixtures/api/schemas/group_member.json new file mode 100644 index 00000000000..035c862d229 --- /dev/null +++ b/spec/fixtures/api/schemas/group_member.json @@ -0,0 +1,78 @@ +{ + "type": "object", + "required": [ + "id", + "created_at", + "expires_at", + "access_level", + "requested_at", + "source", + "can_update", + "can_remove", + "can_override" + ], + "properties": { + "id": { "type": "integer" }, + "created_at": { "type": "date-time" }, + "expires_at": { "type": ["date-time", "null"] }, + "requested_at": { "type": ["date-time", "null"] }, + "can_update": { "type": "boolean" }, + "can_remove": { "type": "boolean" }, + "can_override": { "type": "boolean" }, + "access_level": { + "type": "object", + "required": ["integer_value", "string_value"], + "properties": { + "integer_value": { "type": "integer" }, + "string_value": { "type": "string" } + } + }, + "source": { + "type": "object", + "required": ["id", "name", "web_url"], + "properties": { + "id": { "type": "integer" }, + "name": { "type": "string" }, + "web_url": { "type": "string" } + } + }, + "created_by": { + "type": "object", + "required": ["name", "web_url"], + "properties": { + "name": { "type": "string" }, + "web_url": { "type": "string" } + } + }, + "user": { + "type": "object", + "required": [ + "id", + "name", + "username", + "avatar_url", + "web_url", + "blocked", + "two_factor_enabled" + ], + "properties": { + "id": { "type": "integer" }, + "name": { "type": "string" }, + "username": { "type": "string" }, + "avatar_url": { "type": ["string", "null"] }, + "web_url": { "type": "string" }, + "blocked": { "type": "boolean" }, + "two_factor_enabled": { "type": "boolean" } + } + }, + "invite": { + "type": "object", + "required": ["email", "avatar_url", "can_resend"], + "properties": { + "email": { "type": "string" }, + "avatar_url": { "type": "string" }, + "can_resend": { "type": "boolean" } + } + } + } +} diff --git a/spec/fixtures/api/schemas/group_members.json b/spec/fixtures/api/schemas/group_members.json new file mode 100644 index 00000000000..6268c7ef4d8 --- /dev/null +++ b/spec/fixtures/api/schemas/group_members.json @@ -0,0 +1,6 @@ +{ + "type": "array", + "items": { + "$ref": "group_member.json" + } +} diff --git a/spec/fixtures/api/schemas/issue.json b/spec/fixtures/api/schemas/issue.json index 77de9ae4f9f..84c39ad65e9 100644 --- a/spec/fixtures/api/schemas/issue.json +++ b/spec/fixtures/api/schemas/issue.json @@ -12,7 +12,7 @@ "title": { "type": "string" }, "confidential": { "type": "boolean" }, "due_date": { "type": ["date", "null"] }, - "relative_position": { "type": "integer" }, + "relative_position": { "type": ["integer", "null"] }, "time_estimate": { "type": "integer" }, "issue_sidebar_endpoint": { "type": "string" }, "toggle_subscription_endpoint": { "type": "string" }, diff --git a/spec/fixtures/api/schemas/jira_connect/author.json b/spec/fixtures/api/schemas/jira_connect/author.json new file mode 100644 index 00000000000..bd2cff96d99 --- /dev/null +++ b/spec/fixtures/api/schemas/jira_connect/author.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "properties": { + "name": { "type": "string" }, + "email": { "type": "string" }, + "username": { "type": "string" }, + "url": { "type": "uri" }, + "avatar": { "type": "uri" } + }, + "required": [ "name", "email" ], + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/jira_connect/branch.json b/spec/fixtures/api/schemas/jira_connect/branch.json new file mode 100644 index 00000000000..c397d88fa91 --- /dev/null +++ b/spec/fixtures/api/schemas/jira_connect/branch.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "properties": { + "id": { "type": "string" }, + "issueKeys": { "type": "array" }, + "name": { "type": "string" }, + "lastCommit": { + "$ref": "./commit.json" + }, + "url": { "type": "uri" }, + "createPullRequestUrl": { "type": "uri" }, + "updateSequenceId": { "type": "integer" } + }, + "required": [ + "id", "issueKeys", "name", "lastCommit", + "url", "createPullRequestUrl", "updateSequenceId" + ], + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/jira_connect/commit.json b/spec/fixtures/api/schemas/jira_connect/commit.json new file mode 100644 index 00000000000..794cf9ef365 --- /dev/null +++ b/spec/fixtures/api/schemas/jira_connect/commit.json @@ -0,0 +1,29 @@ +{ + "type": "object", + "properties": { + "id": { "type": "string" }, + "issueKeys": { "type": "array" }, + "hash": { "type": "string" }, + "displayId": { "type": "string" }, + "message": { "type": "string" }, + "flags": { "type": "array" }, + "author": { + "$ref": "./author.json" + }, + "fileCount": { "type": "integer" }, + "files": { + "type": "array", + "items": { + "$ref": "./file.json" + } + }, + "authorTimestamp": { "type": "timestamp" }, + "url": { "type": "uri" }, + "updateSequenceId": { "type": "integer" } + }, + "required": [ + "id", "issueKeys", "hash", "displayId", "message", "flags", "author", + "fileCount", "files", "authorTimestamp", "url", "updateSequenceId" + ], + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/jira_connect/file.json b/spec/fixtures/api/schemas/jira_connect/file.json new file mode 100644 index 00000000000..34718991237 --- /dev/null +++ b/spec/fixtures/api/schemas/jira_connect/file.json @@ -0,0 +1,14 @@ +{ + "type": "object", + "properties": { + "path": { "type": "string" }, + "changeType": { "type": "string" }, + "linesAdded": { "type": "integer" }, + "linesRemoved": { "type": "integer" }, + "url": { "type": "uri" } + }, + "required": [ + "path", "changeType", "linesAdded", "linesRemoved", "url" + ], + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/jira_connect/pull_request.json b/spec/fixtures/api/schemas/jira_connect/pull_request.json new file mode 100644 index 00000000000..56ce6faf498 --- /dev/null +++ b/spec/fixtures/api/schemas/jira_connect/pull_request.json @@ -0,0 +1,26 @@ +{ + "type": "object", + "properties": { + "id": { "type": "string" }, + "issueKeys": { "type": "array" }, + "displayId": { "type": "string" }, + "title": { "type": "string" }, + "author": { + "$ref": "./author.json" + }, + "commentCount": { "type": "integer" }, + "sourceBranch": { "type": "string" }, + "destinationBranch": { "type": "string" }, + "lastUpdate": { "type": "timestamp" }, + "status": { "type": "string" }, + "sourceBranchUrl": { "type": "uri" }, + "url": { "type": "uri" }, + "updateSequenceId": { "type": "integer" } + }, + "required": [ + "id", "issueKeys", "displayId", "title", "author", "commentCount", + "sourceBranch", "destinationBranch", "lastUpdate", "status", + "sourceBranchUrl", "url", "updateSequenceId" + ], + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/jira_connect/repository.json b/spec/fixtures/api/schemas/jira_connect/repository.json new file mode 100644 index 00000000000..9e81d77bc6a --- /dev/null +++ b/spec/fixtures/api/schemas/jira_connect/repository.json @@ -0,0 +1,34 @@ +{ + "type": "object", + "properties": { + "id": { "type": "string" }, + "name": { "type": "string" }, + "description": { "type": ["string", "null"] }, + "url": { "type": "uri" }, + "avatar": { "type": "uri" }, + "commits": { + "type": "array", + "items": { + "$ref": "./commit.json" + } + }, + "branches": { + "type": "array", + "items": { + "$ref": "./branch.json" + } + }, + "pullRequests": { + "type": "array", + "items": { + "$ref": "./pull_request.json" + } + }, + "updateSequenceId": { "type": "integer" } + }, + "required": [ + "id", "name", "description", "url", "avatar", + "commits", "branches", "pullRequests", "updateSequenceId" + ], + "additionalProperties": false +} diff --git a/spec/fixtures/api/schemas/public_api/v4/issue_link.json b/spec/fixtures/api/schemas/public_api/v4/issue_link.json new file mode 100644 index 00000000000..000e8485aca --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/issue_link.json @@ -0,0 +1,20 @@ +{ + "type": "object", + "properties" : { + "source_issue": { + "allOf": [ + { "$ref": "../../../../../../spec/fixtures/api/schemas/public_api/v4/issue.json" } + ] + }, + "target_issue": { + "allOf": [ + { "$ref": "../../../../../../spec/fixtures/api/schemas/public_api/v4/issue.json" } + ] + }, + "link_type": { + "type": "string", + "enum": ["relates_to", "blocks", "is_blocked_by"] + } + }, + "required" : [ "source_issue", "target_issue", "link_type" ] +} diff --git a/spec/fixtures/api/schemas/public_api/v4/issue_links.json b/spec/fixtures/api/schemas/public_api/v4/issue_links.json new file mode 100644 index 00000000000..d254615dd58 --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/issue_links.json @@ -0,0 +1,9 @@ +{ + "type": "array", + "items": { + "type": "object", + "properties" : { + "$ref": "./issue_link.json" + } + } +} diff --git a/spec/fixtures/api/schemas/public_api/v4/milestone.json b/spec/fixtures/api/schemas/public_api/v4/milestone.json index 6ca2e88ae91..c8c6a7b6ae1 100644 --- a/spec/fixtures/api/schemas/public_api/v4/milestone.json +++ b/spec/fixtures/api/schemas/public_api/v4/milestone.json @@ -12,11 +12,13 @@ "updated_at": { "type": "date" }, "start_date": { "type": "date" }, "due_date": { "type": "date" }, + "expired": { "type": ["boolean", "null"] }, "web_url": { "type": "string" } }, "required": [ "id", "iid", "title", "description", "state", - "state", "created_at", "updated_at", "start_date", "due_date" + "state", "created_at", "updated_at", "start_date", + "due_date", "expired" ], "additionalProperties": false } diff --git a/spec/fixtures/api/schemas/public_api/v4/milestone_with_stats.json b/spec/fixtures/api/schemas/public_api/v4/milestone_with_stats.json index e2475545ee9..f008ed7d55f 100644 --- a/spec/fixtures/api/schemas/public_api/v4/milestone_with_stats.json +++ b/spec/fixtures/api/schemas/public_api/v4/milestone_with_stats.json @@ -12,6 +12,7 @@ "updated_at": { "type": "date" }, "start_date": { "type": "date" }, "due_date": { "type": "date" }, + "expired": { "type": ["boolean", "null"] }, "web_url": { "type": "string" }, "issue_stats": { "required": ["total", "closed"], @@ -24,7 +25,8 @@ }, "required": [ "id", "iid", "title", "description", "state", - "state", "created_at", "updated_at", "start_date", "due_date", "issue_stats" + "state", "created_at", "updated_at", "start_date", + "due_date", "expired", "issue_stats" ], "additionalProperties": false } diff --git a/spec/fixtures/api/schemas/public_api/v4/packages/collection_package.json b/spec/fixtures/api/schemas/public_api/v4/packages/collection_package.json new file mode 100644 index 00000000000..109b0e59635 --- /dev/null +++ b/spec/fixtures/api/schemas/public_api/v4/packages/collection_package.json @@ -0,0 +1,34 @@ +{ + "type": "object", + "required": [ + "name", + "version", + "package_type", + "_links" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "package_type": { + "type": "string" + }, + "_links": { + "type": "object", + "required": [ + "web_path" + ], + "properties": { + "details": { + "type": "string" + } + } + }, + "created_at": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/spec/fixtures/api/schemas/public_api/v4/packages/packages.json b/spec/fixtures/api/schemas/public_api/v4/packages/packages.json index 66364da4fdb..a03a49db4f9 100644 --- a/spec/fixtures/api/schemas/public_api/v4/packages/packages.json +++ b/spec/fixtures/api/schemas/public_api/v4/packages/packages.json @@ -1,4 +1,4 @@ { "type": "array", - "items": { "$ref": "./package.json" } + "items": { "$ref": "./collection_package.json" } } diff --git a/spec/fixtures/emails/x_envelope_to_header.eml b/spec/fixtures/emails/x_envelope_to_header.eml new file mode 100644 index 00000000000..28e3d71535a --- /dev/null +++ b/spec/fixtures/emails/x_envelope_to_header.eml @@ -0,0 +1,32 @@ +Return-Path: +Received: from myserver.example.com ([unix socket]) by myserver (Cyrus v2.2.13-Debian-2.2.13-19+squeeze3) with LMTPA; Thu, 13 Jun 2013 17:03:50 -0400 +Received: from mail.example.com (mail.example.com [IPv6:2607:f8b0:4001:c03::234]) by myserver.example.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id r5DL3nFJ016967 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 13 Jun 2013 17:03:50 -0400 +Received: by myserver.example.com with SMTP id f4so21977375iea.25 for ; Thu, 13 Jun 2013 14:03:48 -0700 +Received: by 10.0.0.1 with HTTP; Thu, 13 Jun 2013 14:03:48 -0700 +From: "jake@example.com" +To: "support@example.com" +Subject: Insert hilarious subject line here +Date: Tue, 26 Nov 2019 14:22:41 +0000 +Message-ID: <7e2296f83dbf4de388cbf5f56f52c11f@EXDAG29-1.EXCHANGE.INT> +Accept-Language: de-DE, en-US +Content-Language: de-DE +X-MS-Has-Attach: +X-MS-TNEF-Correlator: +x-ms-exchange-transport-fromentityheader: Hosted +x-originating-ip: [62.96.54.178] +Content-Type: multipart/alternative; + boundary="_000_7e2296f83dbf4de388cbf5f56f52c11fEXDAG291EXCHANGEINT_" +MIME-Version: 1.0 +X-Envelope-To: incoming+gitlabhq/gitlabhq+auth_token@appmail.example.com + +--_000_7e2296f83dbf4de388cbf5f56f52c11fEXDAG291EXCHANGEINT_ +Content-Type: text/plain; charset="iso-8859-1" +Content-Transfer-Encoding: quoted-printable + + + +--_000_7e2296f83dbf4de388cbf5f56f52c11fEXDAG291EXCHANGEINT_ +Content-Type: text/html; charset="iso-8859-1" +Content-Transfer-Encoding: quoted-printable + +Look, a message with some alternate headers! We should really support them. diff --git a/spec/fixtures/gitlab/database/structure_example_cleaned.sql b/spec/fixtures/gitlab/database/structure_example_cleaned.sql index 42eed974e64..dc112da7037 100644 --- a/spec/fixtures/gitlab/database/structure_example_cleaned.sql +++ b/spec/fixtures/gitlab/database/structure_example_cleaned.sql @@ -1,8 +1,6 @@ -SET search_path=public; +CREATE EXTENSION IF NOT EXISTS pg_trgm; -CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public; - -CREATE TABLE public.abuse_reports ( +CREATE TABLE abuse_reports ( id integer NOT NULL, reporter_id integer, user_id integer, @@ -13,20 +11,18 @@ CREATE TABLE public.abuse_reports ( cached_markdown_version integer ); -CREATE SEQUENCE public.abuse_reports_id_seq +CREATE SEQUENCE abuse_reports_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE ONLY public.abuse_reports ALTER COLUMN id SET DEFAULT nextval('public.abuse_reports_id_seq'::regclass); +ALTER TABLE ONLY abuse_reports ALTER COLUMN id SET DEFAULT nextval('abuse_reports_id_seq'::regclass); -ALTER TABLE ONLY public.abuse_reports +ALTER TABLE ONLY abuse_reports ADD CONSTRAINT abuse_reports_pkey PRIMARY KEY (id); -CREATE INDEX index_abuse_reports_on_user_id ON public.abuse_reports USING btree (user_id); - --- schema_migrations.version information is no longer stored in this file, +CREATE INDEX index_abuse_reports_on_user_id ON abuse_reports USING btree (user_id);-- schema_migrations.version information is no longer stored in this file, -- but instead tracked in the db/schema_migrations directory -- see https://gitlab.com/gitlab-org/gitlab/-/issues/218590 for details diff --git a/spec/fixtures/importers/bitbucket_server/activities.json b/spec/fixtures/importers/bitbucket_server/activities.json index 09adfca9f31..ddcb94b8f58 100644 --- a/spec/fixtures/importers/bitbucket_server/activities.json +++ b/spec/fixtures/importers/bitbucket_server/activities.json @@ -20,7 +20,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [ @@ -38,7 +39,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [ @@ -56,7 +58,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [], @@ -85,7 +88,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "createdDate": 1530164016725, @@ -115,7 +119,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "createdDate": 1530164026000, @@ -147,7 +152,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [], @@ -194,7 +200,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [], @@ -363,7 +370,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" } }, @@ -383,7 +391,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [], @@ -543,7 +552,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" } }, @@ -563,7 +573,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [ @@ -581,7 +592,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [ @@ -599,7 +611,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [], @@ -789,7 +802,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" } }, @@ -809,7 +823,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [], @@ -843,7 +858,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" } }, @@ -863,7 +879,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "authorTimestamp": 1529727872000, @@ -880,7 +897,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "committerTimestamp": 1529727872000, @@ -951,7 +969,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" } }, @@ -971,7 +990,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [ @@ -989,7 +1009,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [], @@ -1038,7 +1059,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" } }, @@ -1058,7 +1080,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" }, "comments": [], @@ -1092,7 +1115,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" } }, @@ -1113,7 +1137,8 @@ ] }, "name": "root", - "slug": "root", + "slug": "slug", + "username": "username", "type": "NORMAL" } } diff --git a/spec/fixtures/importers/bitbucket_server/pull_request.json b/spec/fixtures/importers/bitbucket_server/pull_request.json index 6c7fcf3b04c..77f7eb330f5 100644 --- a/spec/fixtures/importers/bitbucket_server/pull_request.json +++ b/spec/fixtures/importers/bitbucket_server/pull_request.json @@ -5,8 +5,9 @@ "status":"UNAPPROVED", "user":{ "active":true, - "displayName":"root", + "displayName":"displayName", "emailAddress":"joe.montana@49ers.com", + "username": "username", "id":1, "links":{ "self":[ @@ -16,7 +17,7 @@ ] }, "name":"root", - "slug":"root", + "slug":"slug", "type":"NORMAL" } }, diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/broken_yml_syntax.yml b/spec/fixtures/lib/gitlab/metrics/dashboard/broken_yml_syntax.yml new file mode 100644 index 00000000000..d551ad2dcdb --- /dev/null +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/broken_yml_syntax.yml @@ -0,0 +1,13 @@ +dashboard: 'Test Dashboard' + panel_groups: + - group: Group B + panels: + - title: "Super Chart B" + type: "area-chart" + y_label: "y_label" + metrics: + - id: metric_b + query_range: 'query' + unit: unit + label: Legend Label +- group: Group A diff --git a/spec/fixtures/markdown.md.erb b/spec/fixtures/markdown.md.erb index 59795c835a2..aff4b1aae23 100644 --- a/spec/fixtures/markdown.md.erb +++ b/spec/fixtures/markdown.md.erb @@ -245,6 +245,15 @@ References should be parseable even inside _<%= merge_request.to_reference %>_ e - Group milestone by name in quotes: <%= group_milestone.to_reference(format: :name) %> - Group milestone by URL is ignore: <%= urls.milestone_url(group_milestone) %> +##### AlertReferenceFilter +- Alert: <%= alert.to_reference %> +- Alert in another project: <%= xalert.to_reference(project) %> +- Ignored in code: `<%= alert.to_reference %>` +- Ignored in links: [Link to <%= alert.to_reference %>](#alert-link) +- Alert by URL: <%= alert.details_url %> +- Link to alert by reference: [Alert](<%= alert.to_reference %>) +- Link to alert by URL: [Alert](<%= alert.details_url %>) + ### Task Lists - [ ] Incomplete task 1 diff --git a/spec/fixtures/pipeline_artifacts/code_coverage_with_multiple_files.json b/spec/fixtures/pipeline_artifacts/code_coverage_with_multiple_files.json new file mode 100644 index 00000000000..160413d73da --- /dev/null +++ b/spec/fixtures/pipeline_artifacts/code_coverage_with_multiple_files.json @@ -0,0 +1,14 @@ +{ + "files": { + "file_a.rb": { + "1": 1, + "2": 1, + "3": 1 + }, + "file_b.rb": { + "1": 0, + "2": 0, + "3": 0 + } + } +} diff --git a/spec/fixtures/unescaped_chars.po b/spec/fixtures/unescaped_chars.po index fbafe523fb3..3527c3e0888 100644 --- a/spec/fixtures/unescaped_chars.po +++ b/spec/fixtures/unescaped_chars.po @@ -7,15 +7,15 @@ msgid "" msgstr "" "Project-Id-Version: gitlab 1.0.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2017-07-13 12:10-0500\n" +"PO-Revision-Date: 2020-09-02 06:14+0000\n" "Language-Team: Spanish\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"Last-Translator: Bob Van Landuyt \n" +"Last-Translator: Takuya Noguchi \n" "X-Generator: Poedit 2.0.2\n" -msgid "You are going to transfer %{project_name_with_namespace} to another owner. Are you ABSOLUTELY sure?" -msgstr "將要把 %{project_name_with_namespace} 的所有權轉移給另一個人。真的「100%確定」要這麼做嗎?" +msgid "You are going to transfer %{project_name_with_namespace} to another namespace. Are you ABSOLUTELY sure?" +msgstr "將要把 %{project_name_with_namespace} 的所有權轉移給另一个名称空间。真的「100%確定」要這麼做嗎?" diff --git a/spec/fixtures/valid.po b/spec/fixtures/valid.po index f1d62296709..c9b68d16153 100644 --- a/spec/fixtures/valid.po +++ b/spec/fixtures/valid.po @@ -1071,7 +1071,7 @@ msgstr "Va a eliminar %{project_name_with_namespace}. ¡El proyecto eliminado NO msgid "You are going to remove the fork relationship to source project %{forked_from_project}. Are you ABSOLUTELY sure?" msgstr "Vas a eliminar el enlace de la bifurcación con el proyecto original %{forked_from_project}. ¿Estás TOTALMENTE seguro?" -msgid "You are going to transfer %{project_name_with_namespace} to another owner. Are you ABSOLUTELY sure?" +msgid "You are going to transfer %{project_name_with_namespace} to another namespace. Are you ABSOLUTELY sure?" msgstr "Vas a transferir %{project_name_with_namespace} a otro propietario. ¿Estás TOTALMENTE seguro?" msgid "You can only add files when you are on a branch" diff --git a/spec/fixtures/whats_new/01.yml b/spec/fixtures/whats_new/01.yml new file mode 100644 index 00000000000..06db95be44f --- /dev/null +++ b/spec/fixtures/whats_new/01.yml @@ -0,0 +1,2 @@ +--- +- title: It's gonna be a bright diff --git a/spec/fixtures/whats_new/02.yml b/spec/fixtures/whats_new/02.yml new file mode 100644 index 00000000000..91b0bd7036e --- /dev/null +++ b/spec/fixtures/whats_new/02.yml @@ -0,0 +1,2 @@ +--- +- title: bright diff --git a/spec/fixtures/whats_new/05.yml b/spec/fixtures/whats_new/05.yml new file mode 100644 index 00000000000..5b8939a2bc6 --- /dev/null +++ b/spec/fixtures/whats_new/05.yml @@ -0,0 +1,2 @@ +--- +- title: bright and sunshinin' day -- cgit v1.2.1