Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-03-10 00:09:13 +00:00
parent d8d0344cc3
commit 23e66f0310
33 changed files with 130 additions and 115532 deletions

View File

@ -2278,6 +2278,7 @@ Gitlab/NamespacedClass:
- 'ee/app/policies/instance_security_dashboard_policy.rb'
- 'ee/app/policies/issuable_metric_image_policy.rb'
- 'ee/app/policies/iteration_policy.rb'
- 'ee/app/policies/push_rule_policy.rb'
- 'ee/app/policies/saml_provider_policy.rb'
- 'ee/app/policies/timelog_policy.rb'
- 'ee/app/policies/vulnerability_policy.rb'

View File

@ -30,7 +30,7 @@ export default {
},
computed: {
...mapState(['labels', 'labelsLoading']),
...mapGetters(['getListByLabelId', 'shouldUseGraphQL', 'isEpicBoard']),
...mapGetters(['getListByLabelId', 'shouldUseGraphQL']),
selectedLabel() {
if (!this.selectedId) {
return null;
@ -47,7 +47,7 @@ export default {
methods: {
...mapActions(['createList', 'fetchLabels', 'highlightList', 'setAddColumnFormVisibility']),
highlight(listId) {
if (this.shouldUseGraphQL || this.isEpicBoard) {
if (this.shouldUseGraphQL) {
this.highlightList(listId);
} else {
const list = boardsStore.state.lists.find(({ id }) => id === listId);
@ -70,7 +70,7 @@ export default {
return;
}
if (this.shouldUseGraphQL || this.isEpicBoard) {
if (this.shouldUseGraphQL) {
this.createList({ labelId: this.selectedId });
} else {
const listObj = {
@ -118,13 +118,17 @@ export default {
</template>
<template slot="items">
<gl-form-radio-group v-model="selectedId" class="gl-overflow-y-auto gl-px-5 gl-pt-3">
<gl-form-radio-group
v-if="labels.length > 0"
v-model="selectedId"
class="gl-overflow-y-auto gl-px-5 gl-pt-3"
>
<label
v-for="label in labels"
:key="label.id"
class="gl-display-flex gl-flex-align-items-center gl-mb-5 gl-font-weight-normal"
>
<gl-form-radio :value="label.id" class="gl-mb-0 gl-mr-3" />
<gl-form-radio :value="label.id" class="gl-mb-0" />
<span
class="dropdown-label-box gl-top-0"
:style="{

View File

@ -5,10 +5,11 @@ import { __ } from '~/locale';
export default {
i18n: {
add: __('Add'),
add: __('Add to board'),
cancel: __('Cancel'),
newList: __('New list'),
noneSelected: __('None'),
noResults: __('No matching results'),
selected: __('Selected'),
},
components: {
@ -40,6 +41,11 @@ export default {
default: null,
},
},
data() {
return {
searchValue: '',
};
},
methods: {
...mapActions(['setAddColumnFormVisibility']),
},
@ -83,6 +89,7 @@ export default {
>
<gl-search-box-by-type
id="board-available-column-entities"
v-model="searchValue"
debounce="250"
:placeholder="searchPlaceholder"
@input="$emit('filter-items', $event)"
@ -97,10 +104,12 @@ export default {
</gl-skeleton-loader>
</div>
<slot v-else name="items"></slot>
<slot v-else name="items">
<p class="gl-mx-5">{{ $options.i18n.noResults }}</p>
</slot>
</div>
<div
class="gl-display-flex gl-p-3 gl-border-t-1 gl-border-t-solid gl-border-gray-100 gl-bg-gray-10"
class="gl-display-flex gl-p-3 gl-border-t-1 gl-border-t-solid gl-border-gray-100 gl-bg-gray-10 gl-rounded-bottom-left-base gl-rounded-bottom-right-base"
>
<gl-button
data-testid="cancelAddNewColumn"
@ -111,7 +120,7 @@ export default {
<gl-button
data-testid="addNewColumnButton"
:disabled="!selectedId"
variant="success"
variant="confirm"
class="gl-mr-4"
@click="$emit('add-list')"
>{{ $options.i18n.add }}</gl-button

View File

@ -3,10 +3,10 @@ import { GlAlert } from '@gitlab/ui';
import { sortBy } from 'lodash';
import Draggable from 'vuedraggable';
import { mapState, mapGetters, mapActions } from 'vuex';
import BoardAddNewColumn from 'ee_else_ce/boards/components/board_add_new_column.vue';
import { sortableEnd, sortableStart } from '~/boards/mixins/sortable_default_options';
import defaultSortableConfig from '~/sortable/sortable_config';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import BoardAddNewColumn from './board_add_new_column.vue';
import BoardColumn from './board_column.vue';
import BoardColumnDeprecated from './board_column_deprecated.vue';

View File

@ -32,9 +32,9 @@ import IssueAssignees from '~/vue_shared/components/issue/issue_assignees.vue';
export default {
i18n: {
openedAgo: __('opened %{timeAgoString} by %{user}'),
openedAgoJira: __('opened %{timeAgoString} by %{user} in Jira'),
openedAgoServiceDesk: __('opened %{timeAgoString} by %{email} via %{user}'),
openedAgo: __('created %{timeAgoString} by %{user}'),
openedAgoJira: __('created %{timeAgoString} by %{user} in Jira'),
openedAgoServiceDesk: __('created %{timeAgoString} by %{email} via %{user}'),
},
components: {
IssueAssignees,

View File

@ -151,7 +151,7 @@ module IssuablesHelper
def issuable_meta(issuable, project)
output = []
output << "Opened #{time_ago_with_tooltip(issuable.created_at)} by ".html_safe
output << "Created #{time_ago_with_tooltip(issuable.created_at)} by ".html_safe
if issuable.is_a?(Issue) && issuable.service_desk_reply_to
output << "#{html_escape(issuable.service_desk_reply_to)} via "

View File

@ -522,6 +522,7 @@ module Ci
.append(key: 'CI_JOB_ID', value: id.to_s)
.append(key: 'CI_JOB_URL', value: Gitlab::Routing.url_helpers.project_job_url(project, self))
.append(key: 'CI_JOB_TOKEN', value: token.to_s, public: false, masked: true)
.append(key: 'CI_JOB_STARTED_AT', value: started_at&.iso8601)
.append(key: 'CI_BUILD_ID', value: id.to_s)
.append(key: 'CI_BUILD_TOKEN', value: token.to_s, public: false, masked: true)
.append(key: 'CI_REGISTRY_USER', value: ::Gitlab::Auth::CI_JOB_USER)

View File

@ -777,6 +777,7 @@ module Ci
Gitlab::Ci::Variables::Collection.new.tap do |variables|
variables.append(key: 'CI_PIPELINE_IID', value: iid.to_s)
variables.append(key: 'CI_PIPELINE_SOURCE', value: source.to_s)
variables.append(key: 'CI_PIPELINE_CREATED_AT', value: created_at&.iso8601)
variables.concat(predefined_commit_variables)

View File

@ -22,7 +22,7 @@
#{issuable_reference(issue)}
%span.issuable-authored.d-none.d-sm-inline-block
&middot;
opened #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')} by
created #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')} by
- if issue.service_desk_reply_to
#{issue.service_desk_reply_to} via
#{link_to_member(@project, issue.author, avatar: false)}

View File

@ -0,0 +1,5 @@
---
title: Add CI_JOB_STARTED_AT and CI_PIPELINE_CREATED_AT variables
merge_request: 54989
author: Vincent Firmin @winkies
type: added

View File

@ -0,0 +1,5 @@
---
title: Use Created instead of opened when describing issue creation
merge_request: 49478
author:
type: other

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3431,6 +3431,7 @@ Represents vulnerability finding of a security report on the pipeline.
| `printingMergeRequestLinkEnabled` | Boolean | Indicates if a link to create or view a merge request should display after a push to Git repositories of the project from the command line. |
| `projectMembers` | MemberInterfaceConnection | Members of the project. |
| `publicJobs` | Boolean | Indicates if there is public access to pipelines and job details of the project, including output logs and artifacts. |
| `pushRules` | PushRules | The project's push rules settings. |
| `release` | Release | A single release of the project. |
| `releases` | ReleaseConnection | Releases of the project. |
| `removeSourceBranchAfterMerge` | Boolean | Indicates if `Delete source branch` option should be enabled by default for all new merge requests of the project. |
@ -3604,6 +3605,14 @@ Autogenerated return type of PromoteToEpic.
| `errors` | String! => Array | Errors encountered during execution of the mutation. |
| `issue` | Issue | The issue after mutation. |
### `PushRules`
Represents rules that commit pushes must follow.
| Field | Type | Description |
| ----- | ---- | ----------- |
| `rejectUnsignedCommits` | Boolean! | Indicates whether commits not signed through GPG will be rejected. |
### `Release`
Represents a release.

View File

@ -61,6 +61,7 @@ There are also [Kubernetes-specific deployment variables](../../user/project/clu
| `CI_JOB_STATUS` | all | 13.5 | The status of the job as each runner stage is executed. Use with [`after_script`](../yaml/README.md#after_script). Can be `success`, `failed`, or `canceled`. |
| `CI_JOB_TOKEN` | 9.0 | 1.2 | A token to authenticate with [certain API endpoints](../../api/README.md#gitlab-ci-job-token) or download [dependent repositories](../../user/project/new_ci_build_permissions_model.md#dependent-repositories). The token is valid as long as the job is running. |
| `CI_JOB_URL` | 11.1 | 0.5 | The job details URL. |
| `CI_JOB_STARTED_AT` | 13.10 | all | The UTC datetime when a job started, in [ISO 8601](https://tools.ietf.org/html/rfc3339#appendix-A) format. |
| `CI_KUBERNETES_ACTIVE` | 13.0 | all | Only available if the pipeline has a Kubernetes cluster available for deployments. `true` when available. |
| `CI_NODE_INDEX` | 11.5 | all | The index of the job in the job set. Only available if the job uses [`parallel`](../yaml/README.md#parallel). |
| `CI_NODE_TOTAL` | 11.5 | all | The total number of instances of this job running in parallel. Set to `1` if the job does not use [`parallel`](../yaml/README.md#parallel). |
@ -72,6 +73,7 @@ There are also [Kubernetes-specific deployment variables](../../user/project/clu
| `CI_PIPELINE_SOURCE` | 10.0 | all | How the pipeline was triggered. Can be `push`, `web`, `schedule`, `api`, `external`, `chat`, `webide`, `merge_request_event`, `external_pull_request_event`, `parent_pipeline`, [`trigger`, or `pipeline`](../triggers/README.md#authentication-tokens). |
| `CI_PIPELINE_TRIGGERED` | all | all | `true` if the job was [triggered](../triggers/README.md). |
| `CI_PIPELINE_URL` | 11.1 | 0.5 | The URL for the pipeline details. |
| `CI_PIPELINE_CREATED_AT` | 13.10 | all | The UTC datetime when the pipeline was created, in [ISO 8601](https://tools.ietf.org/html/rfc3339#appendix-A) format. |
| `CI_PROJECT_CONFIG_PATH` | 13.8 | all | (Deprecated) The CI configuration path for the project. [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/321334) in GitLab 13.10. [Removal planned](https://gitlab.com/gitlab-org/gitlab/-/issues/322807) for GitLab 14.0. |
| `CI_PROJECT_DIR` | all | all | The full path the repository is cloned to, and where the job runs from. If the GitLab Runner `builds_dir` parameter is set, this variable is set relative to the value of `builds_dir`. For more information, see the [Advanced GitLab Runner configuration](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section). |
| `CI_PROJECT_ID` | all | all | The ID of the current project. This ID is unique across all projects on the GitLab instance. |

View File

@ -109,6 +109,7 @@ The following variables are known as "persisted":
- `CI_PIPELINE_ID`
- `CI_JOB_ID`
- `CI_JOB_TOKEN`
- `CI_JOB_STARTED_AT`
- `CI_BUILD_ID`
- `CI_BUILD_TOKEN`
- `CI_REGISTRY_USER`

View File

@ -9,8 +9,12 @@ info: To determine the technical writer assigned to the Stage/Group associated w
This guide documents how to manage PostgreSQL extensions for installations with an external
PostgreSQL database.
GitLab requires certain extensions to be installed into the GitLab database. For example,
GitLab relies on `pg_trgm` and the `btree_gist` extensions.
The following extensions must be loaded into the GitLab database:
| Extension | Minimum GitLab version |
|--------------|------------------------|
| `pg_trgm` | 8.6 |
| `btree_gist` | 13.1 |
In order to install extensions, PostgreSQL requires the user to have superuser privileges.
Typically, the GitLab database user is not a superuser. Therefore, regular database migrations

View File

@ -152,18 +152,24 @@ MySQL/MariaDB are advised to [migrate to PostgreSQL](../update/mysql_to_postgres
The server running PostgreSQL should have _at least_ 5-10 GB of storage
available, though the exact requirements [depend on the number of users](../administration/reference_architectures/index.md).
We highly recommend users to use the minimum PostgreSQL versions specified below as these are the versions used for development and testing.
We highly recommend using the minimum PostgreSQL versions (as specified in
the following table) as these were used for development and testing:
GitLab version | Minimum PostgreSQL version
-|-
10.0 | 9.6
13.0 | 11
| GitLab version | Minimum PostgreSQL version |
|----------------|----------------------------|
| 10.0 | 9.6 |
| 13.0 | 11 |
You must also ensure the `pg_trgm` and `btree_gist` extensions are [loaded into every
GitLab database](postgresql_extensions.html).
You must also ensure the following extensions are [loaded into every
GitLab database](postgresql_extensions.html):
| Extension | Minimum GitLab version |
| ------------ | ---------------------- |
| `pg_trgm` | 8.6 |
| `btree_gist` | 13.1 |
NOTE:
Support for [PostgreSQL 9.6 and 10 has been removed in GitLab 13.0](https://about.gitlab.com/releases/2020/05/22/gitlab-13-0-released/#postgresql-11-is-now-the-minimum-required-version-to-install-gitlab) so that GitLab can benefit from PostgreSQL 11 improvements, such as partitioning. For the schedule of transitioning to PostgreSQL 12, see [the related epic](https://gitlab.com/groups/gitlab-org/-/epics/2184).
Support for [PostgreSQL 9.6 and 10 was removed in GitLab 13.0](https://about.gitlab.com/releases/2020/05/22/gitlab-13-0-released/#postgresql-11-is-now-the-minimum-required-version-to-install-gitlab) so that GitLab can benefit from PostgreSQL 11 improvements, such as partitioning. For the schedule of transitioning to PostgreSQL 12, see [the related epic](https://gitlab.com/groups/gitlab-org/-/epics/2184).
#### Additional requirements for GitLab Geo

View File

@ -167,9 +167,12 @@ sudo make prefix=/usr/local install
WARNING:
From GitLab 13.0, you must use at least PostgreSQL 11.
The latest version of GitLab might depend on a more recent PostgreSQL version than what you are currently running (see the [PostgreSQL requirements](../install/requirements.md#postgresql-requirements)).
The latest version of GitLab might depend on a more recent PostgreSQL version
than what you're currently running. You may also need to enable some
extensions. For more information, see the
[PostgreSQL requirements](../install/requirements.md#postgresql-requirements)
In order to upgrade PostgreSQL, please refer to its [documentation](https://www.postgresql.org/docs/11/upgrading.html).
To upgrade PostgreSQL, refer to its [documentation](https://www.postgresql.org/docs/11/upgrading.html).
### 8. Get latest code

View File

@ -72,6 +72,9 @@ starting in GitLab 14.0, GitLab will not check your repository's root for config
### OpenAPI Specification
> Support for OpenAPI Specification v3 was
> [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/228652) in GitLab 13.9.
The [OpenAPI Specification](https://www.openapis.org/) (formerly the Swagger Specification) is an
API description format for REST APIs. This section shows you how to configure API fuzzing by using
an OpenAPI specification to provide information about the target API to test. OpenAPI specifications

View File

@ -207,6 +207,7 @@ epics:
| Fixed pipeline ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24309) in GitLab 13.1.) | The author of the pipeline. Enabled by default. |
| Merge merge request | |
| Merge when pipeline succeeds ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/211961) in GitLab 13.4) | Author, Participants, Watchers, Subscribers, and Custom notification level with this event selected. `Note:` Custom notification level is ignored for Author, Watchers and Subscribers |
| Merge request [marked as ready](../project/merge_requests/drafts.md) (introduced in [GitLab 13.10](https://gitlab.com/gitlab-org/gitlab/-/issues/15332)) | Watchers and participants |
| New comment | Participants, Watchers, Subscribers, and Custom notification level with this event selected, plus anyone mentioned by `@username` in the comment, with notification level "Mention" or higher |
| New epic | |
| New issue | |

View File

@ -57,6 +57,10 @@ When a merge request is ready to be merged, you can remove the `Draft` flag in s
in a comment in the merge request. This quick action is a toggle, and can be repeated
to change the status back. This quick action discards any other text in the comment.
In [GitLab 13.10 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/15332),
when you mark a merge request as ready, notifications are triggered to
[merge request participants and watchers](../../profile/notifications.md#notifications-on-issues-merge-requests-and-epics).
## Include or exclude drafts when searching
When viewing or searching in your project's merge requests list, you can include or exclude

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -96,10 +96,11 @@ To compare branches in a repository:
1. Navigate to your project's repository.
1. Select **Repository > Compare** in the sidebar.
1. Select branches to compare using the [branch filter search box](#branch-filter-search-box)
1. Select the target repository to compare with the [repository filter search box](#repository-filter-search-box).
1. Select branches to compare using the [branch filter search box](#branch-filter-search-box).
1. Click **Compare** to view the changes inline:
![compare branches](img/compare_branches.png)
![compare branches](img/compare_branches_v13_10.png)
## Delete merged branches
@ -114,11 +115,24 @@ this operation.
It's particularly useful to clean up old branches that were not deleted
automatically when a merge request was merged.
## Repository filter search box
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/52967) in GitLab 13.10.
This feature allows you to search and select a repository quickly when [comparing branches](#compare).
![Repository filter search box](img/repository_filter_search_box_v13_10.png)
Search results appear in the following order:
- Repositories with names exactly matching the search terms.
- Other repositories with names that include search terms, sorted alphabetically.
## Branch filter search box
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/22166) in GitLab 11.5.
![Branch filter search box](img/branch_filter_search_box.png)
![Branch filter search box](img/branch_filter_search_box_v13_10.png)
This feature allows you to search and select branches quickly. Search results appear in the following order:

View File

@ -108,7 +108,7 @@ You can see a **Create merge request** dropdown below the issue description.
The **Create merge request** button doesn't display if:
- A branch with the same name already exists.
- The branch already has a referenced merge request.
- A merge request already exists for this branch.
- Your project has an active fork relationship.
To make this button appear, one possible workaround is to

View File

@ -1345,6 +1345,9 @@ msgstr ""
msgid "A merge request hasn't yet been merged"
msgstr ""
msgid "A milestone list displays issues in the selected milestone."
msgstr ""
msgid "A new Auto DevOps pipeline has been created, go to %{pipelines_link_start}Pipelines page%{pipelines_link_end} for details"
msgstr ""
@ -1926,6 +1929,9 @@ msgstr ""
msgid "Add to Slack"
msgstr ""
msgid "Add to board"
msgstr ""
msgid "Add to epic"
msgstr ""
@ -12590,6 +12596,9 @@ msgstr ""
msgid "Failed to load labels. Please try again."
msgstr ""
msgid "Failed to load milestones."
msgstr ""
msgid "Failed to load milestones. Please try again."
msgstr ""
@ -18179,6 +18188,9 @@ msgstr ""
msgid "List the merge requests that must be merged before this one."
msgstr ""
msgid "List type"
msgstr ""
msgid "List view"
msgstr ""
@ -35297,6 +35309,15 @@ msgstr ""
msgid "created"
msgstr ""
msgid "created %{timeAgoString} by %{email} via %{user}"
msgstr ""
msgid "created %{timeAgoString} by %{user}"
msgstr ""
msgid "created %{timeAgoString} by %{user} in Jira"
msgstr ""
msgid "created %{timeAgo}"
msgstr ""
@ -36070,15 +36091,6 @@ msgstr ""
msgid "open issue"
msgstr ""
msgid "opened %{timeAgoString} by %{email} via %{user}"
msgstr ""
msgid "opened %{timeAgoString} by %{user}"
msgstr ""
msgid "opened %{timeAgoString} by %{user} in Jira"
msgstr ""
msgid "opened %{timeAgo}"
msgstr ""

View File

@ -192,9 +192,9 @@ describe('Issuable component', () => {
expect(wrapper.classes('closed')).toBe(false);
});
it('renders fuzzy opened date and author', () => {
it('renders fuzzy created date and author', () => {
expect(trimText(findOpenedAgoContainer().text())).toContain(
`opened 1 month ago by ${TEST_USER_NAME}`,
`created 1 month ago by ${TEST_USER_NAME}`,
);
});

View File

@ -2423,6 +2423,7 @@ RSpec.describe Ci::Build do
{ key: 'CI_JOB_ID', value: build.id.to_s, public: true, masked: false },
{ key: 'CI_JOB_URL', value: project.web_url + "/-/jobs/#{build.id}", public: true, masked: false },
{ key: 'CI_JOB_TOKEN', value: 'my-token', public: false, masked: true },
{ key: 'CI_JOB_STARTED_AT', value: build.started_at&.iso8601, public: true, masked: false },
{ key: 'CI_BUILD_ID', value: build.id.to_s, public: true, masked: false },
{ key: 'CI_BUILD_TOKEN', value: 'my-token', public: false, masked: true },
{ key: 'CI_REGISTRY_USER', value: 'gitlab-ci-token', public: true, masked: false },
@ -2472,6 +2473,7 @@ RSpec.describe Ci::Build do
{ key: 'CI_API_V4_URL', value: 'http://localhost/api/v4', public: true, masked: false },
{ key: 'CI_PIPELINE_IID', value: pipeline.iid.to_s, public: true, masked: false },
{ key: 'CI_PIPELINE_SOURCE', value: pipeline.source, public: true, masked: false },
{ key: 'CI_PIPELINE_CREATED_AT', value: pipeline.created_at.iso8601, public: true, masked: false },
{ key: 'CI_COMMIT_SHA', value: build.sha, public: true, masked: false },
{ key: 'CI_COMMIT_SHORT_SHA', value: build.short_sha, public: true, masked: false },
{ key: 'CI_COMMIT_BEFORE_SHA', value: build.before_sha, public: true, masked: false },

View File

@ -807,6 +807,7 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do
expect(keys).to eq %w[
CI_PIPELINE_IID
CI_PIPELINE_SOURCE
CI_PIPELINE_CREATED_AT
CI_COMMIT_SHA
CI_COMMIT_SHORT_SHA
CI_COMMIT_BEFORE_SHA