diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-22 12:11:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-22 12:11:52 +0300 |
commit | 02a0289d4077552778c0eeb0cc0172dfd7b6b331 (patch) | |
tree | 560b81839d31128526cbb4ace67fa363acb2ff51 | |
parent | 0c0c7f1891cf22db904423b0a5398150a385995f (diff) |
Add latest changes from gitlab-org/gitlab@master
-rw-r--r-- | Gemfile.checksum | 2 | ||||
-rw-r--r-- | Gemfile.lock | 2 | ||||
-rw-r--r-- | app/graphql/resolvers/environments_resolver.rb | 4 | ||||
-rw-r--r-- | doc/api/graphql/reference/index.md | 2 | ||||
-rw-r--r-- | doc/ci/jobs/index.md | 1 | ||||
-rw-r--r-- | doc/user/profile/contributions_calendar.md | 58 | ||||
-rw-r--r-- | doc/user/project/integrations/gitlab_slack_application.md | 2 | ||||
-rw-r--r-- | doc/user/project/pages/custom_domains_ssl_tls_certification/img/add_certificate_to_pages.png | bin | 14608 -> 0 bytes | |||
-rw-r--r-- | doc/user/project/pages/custom_domains_ssl_tls_certification/index.md | 17 | ||||
-rw-r--r-- | doc/user/search/advanced_search.md | 20 | ||||
-rw-r--r-- | spec/graphql/resolvers/environments_resolver_spec.rb | 28 |
11 files changed, 74 insertions, 62 deletions
diff --git a/Gemfile.checksum b/Gemfile.checksum index afd65b8b102..38044e328d2 100644 --- a/Gemfile.checksum +++ b/Gemfile.checksum @@ -531,7 +531,7 @@ {"name":"sassc","version":"2.4.0","platform":"x64-mingw32","checksum":"8773b917cb52c7e92c94d4bf324c1c0be3e50d9092f9f5ed4c3c6e454b451c5e"}, {"name":"sassc-rails","version":"2.1.0","platform":"ruby","checksum":"764dcc74e06930e3483caf0d595084d11f2b0fefd6539abf487cdddfba6cafa2"}, {"name":"sawyer","version":"0.9.2","platform":"ruby","checksum":"fa3a72d62a4525517b18857ddb78926aab3424de0129be6772a8e2ba240e7aca"}, -{"name":"sd_notify","version":"0.1.0","platform":"ruby","checksum":"22b68623635175dfdb856d43c9480f9ad13eafa604ab410dc91168102287a663"}, +{"name":"sd_notify","version":"0.1.1","platform":"ruby","checksum":"cbc7ac6caa7cedd26b30a72b5eeb6f36050dc0752df263452ea24fb5a4ad3131"}, {"name":"securecompare","version":"1.0.0","platform":"ruby","checksum":"cb0c6599deaaedf6d28f8d88538b06e7198c4826b1b8edb1dbeb44a2162fc62b"}, {"name":"seed-fu","version":"2.3.7","platform":"ruby","checksum":"f19673443e9af799b730e3d4eca6a89b39e5a36825015dffd00d02ea3365cf74"}, {"name":"selenium-webdriver","version":"3.142.7","platform":"ruby","checksum":"dea0993e0e4fdb364f0453144814c0e6099a411d17396807c6cac666d0ddac29"}, diff --git a/Gemfile.lock b/Gemfile.lock index aaaf9875ee8..f232b7bf025 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1322,7 +1322,7 @@ GEM sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - sd_notify (0.1.0) + sd_notify (0.1.1) securecompare (1.0.0) seed-fu (2.3.7) activerecord (>= 3.1) diff --git a/app/graphql/resolvers/environments_resolver.rb b/app/graphql/resolvers/environments_resolver.rb index f265e2183d0..aca1a36f0f5 100644 --- a/app/graphql/resolvers/environments_resolver.rb +++ b/app/graphql/resolvers/environments_resolver.rb @@ -14,6 +14,10 @@ module Resolvers required: false, description: 'States of environments that should be included in result.' + argument :type, GraphQL::Types::String, + required: false, + description: 'Search query for environment type.' + type Types::EnvironmentType, null: true alias_method :project, :object diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index be6d0d69a9a..35792b3b1ad 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -17128,6 +17128,7 @@ Returns [`Environment`](#environment). | <a id="projectenvironmentname"></a>`name` | [`String`](#string) | Name of the environment. | | <a id="projectenvironmentsearch"></a>`search` | [`String`](#string) | Search query for environment name. | | <a id="projectenvironmentstates"></a>`states` | [`[String!]`](#string) | States of environments that should be included in result. | +| <a id="projectenvironmenttype"></a>`type` | [`String`](#string) | Search query for environment type. | ##### `Project.environments` @@ -17146,6 +17147,7 @@ four standard [pagination arguments](#connection-pagination-arguments): | <a id="projectenvironmentsname"></a>`name` | [`String`](#string) | Name of the environment. | | <a id="projectenvironmentssearch"></a>`search` | [`String`](#string) | Search query for environment name. | | <a id="projectenvironmentsstates"></a>`states` | [`[String!]`](#string) | States of environments that should be included in result. | +| <a id="projectenvironmentstype"></a>`type` | [`String`](#string) | Search query for environment type. | ##### `Project.forkTargets` diff --git a/doc/ci/jobs/index.md b/doc/ci/jobs/index.md index 4eb8952dd73..15ec92a896e 100644 --- a/doc/ci/jobs/index.md +++ b/doc/ci/jobs/index.md @@ -110,6 +110,7 @@ You can't use these keywords as job names: - `true` - `false` - `nil` +- `pages:deploy` configured for a `deploy` stage Job names must be 255 characters or fewer. diff --git a/doc/user/profile/contributions_calendar.md b/doc/user/profile/contributions_calendar.md index 6df7ad56c5e..e8901ba907d 100644 --- a/doc/user/profile/contributions_calendar.md +++ b/doc/user/profile/contributions_calendar.md @@ -21,50 +21,20 @@ The contribution calendar only displays contributions from the last 12 months, b GitLab tracks the following contribution events: -- `approved` - - Merge request -- `closed` - - [Epic](../group/epics/index.md) - - Issue - - Merge request - - Milestone -- `commented` on any `Noteable` record. - - Alert - - Commit - - Design - - Issue - - Merge request - - Snippet -- `created` - - Design - - [Epic](../group/epics/index.md) - - Issue - - Merge request - - Milestone - - Project - - Wiki page -- `destroyed` - - Design - - Milestone - - Wiki page -- `expired` - - Project membership -- `joined` - - Project membership -- `left` - - Project membership -- `merged` - - Merge request -- `pushed` commits to (or deleted commits from) a repository, individually or in bulk. - - Project -- `reopened` - - [Epic](../group/epics/index.md) - - Issue - - Merge request - - Milestone -- `updated` - - Design - - Wiki page +| Event | Contribution | +| ----- | ------------ | +| `approved` | Merge request | +| `closed` | [Epic](../group/epics/index.md), Issue, Merge request, Milestone | +| `commented` on any `Noteable` record. | Alert, Commit, Design, Issue, Merge request, Snippet | +| `created` | Design, Epic, Issue, Merge request, Milestone, Project, Wiki page | +| `destroyed` | Design, Milestone, Wiki page | +| `expired` | Project membership | +| `joined` | Project membership | +| `left` | Project membership | +| `merged` | Merge request | +| `pushed` commits to (or deleted commits from) a repository, individually or in bulk. | Project | +| `reopened` | Epic, Issue, Merge request, Milestone | +| `updated` | Design, Wiki page | ### View daily contributions diff --git a/doc/user/project/integrations/gitlab_slack_application.md b/doc/user/project/integrations/gitlab_slack_application.md index 8d6fdf882b7..df9dfe2c033 100644 --- a/doc/user/project/integrations/gitlab_slack_application.md +++ b/doc/user/project/integrations/gitlab_slack_application.md @@ -10,7 +10,7 @@ NOTE: The GitLab for Slack app is only configurable for GitLab.com. It does **not** work for on-premises installations where you can configure [Slack slash commands](slack_slash_commands.md) instead. See -[Slack application integration for self-managed instances](https://gitlab.com/gitlab-org/gitlab/-/issues/28164) +[Slack application integration for self-managed instances](https://gitlab.com/groups/gitlab-org/-/epics/1211) for our plans to make the app configurable for all GitLab installations. Slack provides a native application that you can enable with your project's diff --git a/doc/user/project/pages/custom_domains_ssl_tls_certification/img/add_certificate_to_pages.png b/doc/user/project/pages/custom_domains_ssl_tls_certification/img/add_certificate_to_pages.png Binary files differdeleted file mode 100644 index d92a981dc60..00000000000 --- a/doc/user/project/pages/custom_domains_ssl_tls_certification/img/add_certificate_to_pages.png +++ /dev/null diff --git a/doc/user/project/pages/custom_domains_ssl_tls_certification/index.md b/doc/user/project/pages/custom_domains_ssl_tls_certification/index.md index 6378d962ffe..dc23540bd1b 100644 --- a/doc/user/project/pages/custom_domains_ssl_tls_certification/index.md +++ b/doc/user/project/pages/custom_domains_ssl_tls_certification/index.md @@ -52,15 +52,14 @@ this document for an [overview on DNS records](dns_concepts.md). #### 1. Add a custom domain -Navigate to your project's **Setting > Pages** and select **+ New domain** -to add your custom domain to GitLab Pages. You can choose whether to: +To add your custom domain to GitLab Pages: -- Add an [SSL/TLS certificate](#adding-an-ssltls-certificate-to-pages). -- Leave it blank (it can be added later). - -Select **Create New Domain**. - -![Add new domain](img/add_certificate_to_pages.png) +1. On the top bar, select **Main menu > Projects** and find your project. +1. On the left sidebar, select **Settings > Pages**. +1. In the top right, select **New Domain**. +1. In **Domain**, enter your domain. +1. Optional. In **Certificate**, turn off the **Automatic certificate management using Let's Encrypt** toggle to add an [SSL/TLS certificate](#adding-an-ssltls-certificate-to-pages). You can also add the certificate and key later. +1. Select **Create New Domain**. #### 2. Get the verification code @@ -292,8 +291,6 @@ meet these requirements. - To add the certificate to a domain previously added, go to your project's **Settings > Pages**, locate your domain name, select **Details** and **Edit** to add the certificate. -![Pages project - adding certificates](img/add_certificate_to_pages.png) - 1. Add the PEM certificate to its corresponding field. 1. If your certificate is missing its intermediate, copy and paste the root certificate (usually available from your CA website) diff --git a/doc/user/search/advanced_search.md b/doc/user/search/advanced_search.md index 925fc7e6036..ed1d3b1d290 100644 --- a/doc/user/search/advanced_search.md +++ b/doc/user/search/advanced_search.md @@ -29,11 +29,27 @@ You can use Advanced Search in: - Commits - Project wikis (not [group wikis](../project/wiki/group.md)) -## Configure Advanced Search +For Advanced Search: + +- You can only search files smaller than 1 MB. + For self-managed GitLab instances, an administrator can + [change this limit](../../integration/advanced_search/elasticsearch.md#advanced-search-configuration). +- You can't use any of the following characters in the search query: + + ```plaintext + . , : ; / ` ' = ? $ & ^ | ~ < > ( ) { } [ ] @ + ``` + +- Only the default branch of a project is indexed for code search. + In a non-default branch, basic search is used. +- Search results show only the first match in a file, + but there might be more results in that file. + +## Enable Advanced Search - On GitLab.com, Advanced Search is enabled for groups with paid subscriptions. - For self-managed GitLab instances, an administrator must - [configure Advanced Search](../../integration/advanced_search/elasticsearch.md). + [enable Advanced Search](../../integration/advanced_search/elasticsearch.md#enable-advanced-search). ## Syntax diff --git a/spec/graphql/resolvers/environments_resolver_spec.rb b/spec/graphql/resolvers/environments_resolver_spec.rb index 9f4c4716de0..b1f7dc1673e 100644 --- a/spec/graphql/resolvers/environments_resolver_spec.rb +++ b/spec/graphql/resolvers/environments_resolver_spec.rb @@ -13,6 +13,9 @@ RSpec.describe Resolvers::EnvironmentsResolver do let!(:environment1) { create(:environment, :available, name: 'production', project: project) } let!(:environment2) { create(:environment, :stopped, name: 'test', project: project) } let!(:environment3) { create(:environment, :available, name: 'test2', project: project) } + let!(:environment4) { create(:environment, :available, name: 'folder1/test1', project: project) } + let!(:environment5) { create(:environment, :available, name: 'folder1/test2', project: project) } + let!(:environment6) { create(:environment, :available, name: 'folder2/test3', project: project) } before do group.add_developer(current_user) @@ -20,7 +23,12 @@ RSpec.describe Resolvers::EnvironmentsResolver do describe '#resolve' do it 'finds all environments' do - expect(resolve_environments).to contain_exactly(environment1, environment2, environment3) + expect(resolve_environments).to contain_exactly(environment1, + environment2, + environment3, + environment4, + environment5, + environment6) end context 'with name' do @@ -31,7 +39,7 @@ RSpec.describe Resolvers::EnvironmentsResolver do context 'with search' do it 'searches environment by name' do - expect(resolve_environments(search: 'test')).to contain_exactly(environment2, environment3) + expect(resolve_environments(search: 'production')).to contain_exactly(environment1) end context 'when the search term does not match any environments' do @@ -43,7 +51,11 @@ RSpec.describe Resolvers::EnvironmentsResolver do context 'with states' do it 'searches environments by state' do - expect(resolve_environments(states: ['available'])).to contain_exactly(environment1, environment3) + expect(resolve_environments(states: ['available'])).to contain_exactly(environment1, + environment3, + environment4, + environment5, + environment6) end it 'generates an error if requested state is invalid' do @@ -53,6 +65,16 @@ RSpec.describe Resolvers::EnvironmentsResolver do end end + context 'with environment_type' do + it 'searches environments by type' do + expect(resolve_environments(type: 'folder1')).to contain_exactly(environment4, environment5) + end + + it 'returns an empty result' do + expect(resolve_environments(type: 'folder3')).to be_empty + end + end + context 'when project is nil' do subject { resolve(described_class, obj: nil, args: {}, ctx: { current_user: current_user }) } |