diff options
55 files changed, 830 insertions, 888 deletions
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue index 08306312c2e..dcf2595edb8 100644 --- a/app/assets/javascripts/diffs/components/app.vue +++ b/app/assets/javascripts/diffs/components/app.vue @@ -42,7 +42,7 @@ import { import diffsEventHub from '../event_hub'; import { reviewStatuses } from '../utils/file_reviews'; import { diffsApp } from '../utils/performance'; -import { updateChangesTabCount } from '../utils/merge_request'; +import { updateChangesTabCount, extractFileHash } from '../utils/merge_request'; import { queueRedisHllEvents } from '../utils/queue_events'; import FindingsDrawer from './shared/findings_drawer.vue'; import CollapsedFilesWarning from './collapsed_files_warning.vue'; @@ -344,12 +344,13 @@ export default { ...mapActions(['startTaskList']), ...mapActions('diffs', [ 'moveToNeighboringCommit', - 'setBaseConfig', 'setCodequalityEndpoint', 'setSastEndpoint', 'fetchDiffFilesMeta', 'fetchDiffFilesBatch', 'fetchFileByFile', + 'loadCollapsedDiff', + 'setFileForcedOpen', 'fetchCoverageFiles', 'fetchCodequality', 'fetchSast', @@ -373,15 +374,34 @@ export default { notesEventHub.$on('refetchDiffData', this.refetchDiffData); notesEventHub.$on('fetchedNotesData', this.rereadNoteHash); diffsEventHub.$on('diffFilesModified', this.setDiscussions); + diffsEventHub.$on('doneLoadingBatches', this.autoScroll); diffsEventHub.$on(EVT_MR_PREPARED, this.fetchData); }, unsubscribeFromEvents() { diffsEventHub.$off(EVT_MR_PREPARED, this.fetchData); + diffsEventHub.$off('doneLoadingBatches', this.autoScroll); diffsEventHub.$off('diffFilesModified', this.setDiscussions); notesEventHub.$off('fetchedNotesData', this.rereadNoteHash); notesEventHub.$off('refetchDiffData', this.refetchDiffData); notesEventHub.$off('fetchDiffData', this.fetchData); }, + autoScroll() { + const lineCode = window.location.hash; + const sha1InHash = extractFileHash({ input: lineCode }); + + if (sha1InHash) { + const idx = this.diffs.findIndex((diffFile) => diffFile.file_hash === sha1InHash); + const file = this.diffs[idx]; + + this.loadCollapsedDiff({ file }) + .then(() => { + this.setDiscussions(); + this.scrollVirtualScrollerToIndex(idx); + this.setFileForcedOpen({ filePath: file.new_path }); + }) + .catch(() => {}); + } + }, navigateToDiffFileNumber(number) { this.navigateToDiffFileIndex(number - 1); }, diff --git a/app/assets/javascripts/diffs/components/diff_file.vue b/app/assets/javascripts/diffs/components/diff_file.vue index f99edced361..13274129f1d 100644 --- a/app/assets/javascripts/diffs/components/diff_file.vue +++ b/app/assets/javascripts/diffs/components/diff_file.vue @@ -161,6 +161,9 @@ export default { manuallyCollapsed() { return collapsedType(this.file) === DIFF_FILE_MANUAL_COLLAPSE; }, + forcedOpen() { + return this.file.viewer.forceOpen; + }, showBody() { return !this.isCollapsed || this.automaticallyCollapsed; }, @@ -174,6 +177,10 @@ export default { return Boolean(gon.current_user_id); }, isCollapsed() { + if (this.forcedOpen) { + return false; + } + if (collapsedType(this.file) !== DIFF_FILE_MANUAL_COLLAPSE) { return this.viewDiffsFileByFile ? false : this.file.viewer?.automaticallyCollapsed; } @@ -201,6 +208,11 @@ export default { this.manageViewedEffects(); }, }, + 'file.viewer.forceOpen': { + handler: function fileForcedOpenHandler() { + this.handleToggle(); + }, + }, 'file.file_hash': { handler: function hashChangeWatch(newHash, oldHash) { if ( diff --git a/app/assets/javascripts/diffs/components/diff_file_header.vue b/app/assets/javascripts/diffs/components/diff_file_header.vue index a9e63ad53bb..d72b0c76425 100644 --- a/app/assets/javascripts/diffs/components/diff_file_header.vue +++ b/app/assets/javascripts/diffs/components/diff_file_header.vue @@ -232,10 +232,15 @@ export default { 'setCurrentFileHash', 'reviewFile', 'setFileCollapsedByUser', + 'setFileForcedOpen', 'setGenerateTestFilePath', 'toggleFileCommentForm', ]), handleToggleFile() { + this.setFileForcedOpen({ + filePath: this.diffFile.file_path, + forced: false, + }); this.$emit('toggleFile'); }, showForkMessage(e) { @@ -278,6 +283,10 @@ export default { } if ((open && reviewed) || (closed && !reviewed)) { + this.setFileForcedOpen({ + filePath: this.diffFile.file_path, + forced: false, + }); this.$emit('toggleFile'); } }, diff --git a/app/assets/javascripts/diffs/store/actions.js b/app/assets/javascripts/diffs/store/actions.js index 7c68b5f69f1..ed8ae795bda 100644 --- a/app/assets/javascripts/diffs/store/actions.js +++ b/app/assets/javascripts/diffs/store/actions.js @@ -254,6 +254,7 @@ export const fetchDiffFilesBatch = ({ commit, state, dispatch }) => { if (totalLoaded === pagination.total_pages || pagination.total_pages === null) { commit(types.SET_RETRIEVING_BATCHES, false); + eventHub.$emit('doneLoadingBatches'); // We need to check that the currentDiffFileId points to a file that exists if ( @@ -879,6 +880,7 @@ export function switchToFullDiffFromRenamedFile({ commit }, { diffFile }) { ...diffFile.alternate_viewer, automaticallyCollapsed: false, manuallyCollapsed: false, + forceOpen: false, }, }); commit(types.SET_CURRENT_VIEW_DIFF_FILE_LINES, { filePath: diffFile.file_path, lines }); @@ -893,6 +895,10 @@ export const setFileCollapsedAutomatically = ({ commit }, { filePath, collapsed commit(types.SET_FILE_COLLAPSED, { filePath, collapsed, trigger: DIFF_FILE_AUTOMATIC_COLLAPSE }); }; +export function setFileForcedOpen({ commit }, { filePath, forced }) { + commit(types.SET_FILE_FORCED_OPEN, { filePath, forced }); +} + export const setSuggestPopoverDismissed = ({ commit, state }) => axios .post(state.dismissEndpoint, { diff --git a/app/assets/javascripts/diffs/store/mutation_types.js b/app/assets/javascripts/diffs/store/mutation_types.js index 3df491503a4..c2177bacbcc 100644 --- a/app/assets/javascripts/diffs/store/mutation_types.js +++ b/app/assets/javascripts/diffs/store/mutation_types.js @@ -39,6 +39,7 @@ export const REQUEST_FULL_DIFF = 'REQUEST_FULL_DIFF'; export const RECEIVE_FULL_DIFF_SUCCESS = 'RECEIVE_FULL_DIFF_SUCCESS'; export const RECEIVE_FULL_DIFF_ERROR = 'RECEIVE_FULL_DIFF_ERROR'; export const SET_FILE_COLLAPSED = 'SET_FILE_COLLAPSED'; +export const SET_FILE_FORCED_OPEN = 'SET_FILE_FORCED_OPEN'; export const SET_CURRENT_VIEW_DIFF_FILE_LINES = 'SET_CURRENT_VIEW_DIFF_FILE_LINES'; export const ADD_CURRENT_VIEW_DIFF_FILE_LINES = 'ADD_CURRENT_VIEW_DIFF_FILE_LINES'; diff --git a/app/assets/javascripts/diffs/store/mutations.js b/app/assets/javascripts/diffs/store/mutations.js index 3af2d6ee6b1..31369b169f5 100644 --- a/app/assets/javascripts/diffs/store/mutations.js +++ b/app/assets/javascripts/diffs/store/mutations.js @@ -349,6 +349,11 @@ export default { } } }, + [types.SET_FILE_FORCED_OPEN](state, { filePath, forced = true }) { + const file = state.diffFiles.find((f) => f.file_path === filePath); + + Vue.set(file.viewer, 'forceOpen', forced); + }, [types.SET_CURRENT_VIEW_DIFF_FILE_LINES](state, { filePath, lines }) { const file = state.diffFiles.find((f) => f.file_path === filePath); diff --git a/app/assets/javascripts/diffs/utils/diff_file.js b/app/assets/javascripts/diffs/utils/diff_file.js index 98e1c1cc849..f20ae6464ae 100644 --- a/app/assets/javascripts/diffs/utils/diff_file.js +++ b/app/assets/javascripts/diffs/utils/diff_file.js @@ -35,6 +35,7 @@ function collapsed(file) { return { automaticallyCollapsed: viewer.automaticallyCollapsed || viewer.collapsed || false, manuallyCollapsed: null, + forceOpen: false, }; } diff --git a/app/assets/javascripts/diffs/utils/merge_request.js b/app/assets/javascripts/diffs/utils/merge_request.js index bc81c0b0a05..a74c9fe7fac 100644 --- a/app/assets/javascripts/diffs/utils/merge_request.js +++ b/app/assets/javascripts/diffs/utils/merge_request.js @@ -1,6 +1,7 @@ import { ZERO_CHANGES_ALT_DISPLAY } from '../constants'; const endpointRE = /^(\/?(.+\/)+(.+)\/-\/merge_requests\/(\d+)).*$/i; +const SHA1RE = /([a-f0-9]{40})/g; function getVersionInfo({ endpoint } = {}) { const dummyRoot = 'https://gitlab.com'; @@ -51,3 +52,9 @@ export function getDerivedMergeRequestInformation({ endpoint } = {}) { startSha, }; } + +export function extractFileHash({ input = '' } = {}) { + const matches = input.match(SHA1RE); + + return matches?.[0]; +} diff --git a/app/assets/javascripts/members/components/members_tabs.vue b/app/assets/javascripts/members/components/members_tabs.vue index 75241d1ff26..de5c9eb5a55 100644 --- a/app/assets/javascripts/members/components/members_tabs.vue +++ b/app/assets/javascripts/members/components/members_tabs.vue @@ -112,6 +112,7 @@ export default { <template> <gl-tabs v-model="selectedTabIndex" + content-class="gl-py-0" sync-active-tab-with-query-params :query-param-name="$options.ACTIVE_TAB_QUERY_PARAM_NAME" > diff --git a/app/controllers/admin/identities_controller.rb b/app/controllers/admin/identities_controller.rb index 15c4103a781..17b0adb868e 100644 --- a/app/controllers/admin/identities_controller.rb +++ b/app/controllers/admin/identities_controller.rb @@ -63,6 +63,6 @@ class Admin::IdentitiesController < Admin::ApplicationController end def identity_params - params.require(:identity).permit(:provider, :extern_uid) + params.require(:identity).permit(:provider, :extern_uid, :saml_provider_id) end end diff --git a/app/helpers/sidekiq_helper.rb b/app/helpers/sidekiq_helper.rb deleted file mode 100644 index 21aa82aff1c..00000000000 --- a/app/helpers/sidekiq_helper.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -module SidekiqHelper - SIDEKIQ_PS_REGEXP = %r{\A - (?<pid>\d+)\s+ - (?<cpu>[\d\.,]+)\s+ - (?<mem>[\d\.,]+)\s+ - (?<state>[DIEKNRSTVWXZLpsl\+<>/\d]+)\s+ - (?<start>.+?)\s+ - (?<command>(?:ruby\d+:\s+)?sidekiq.*\].*) - \z}x - - def parse_sidekiq_ps(line) - match = line.strip.match(SIDEKIQ_PS_REGEXP) - match ? match[1..6] : Array.new(6, '?') - end -end diff --git a/app/helpers/sorting_helper.rb b/app/helpers/sorting_helper.rb index 1405bc7be37..94445564c22 100644 --- a/app/helpers/sorting_helper.rb +++ b/app/helpers/sorting_helper.rb @@ -64,15 +64,6 @@ module SortingHelper options end - def forks_sort_options_hash - { - sort_value_recently_created => sort_title_created_date, - sort_value_oldest_created => sort_title_created_date, - sort_value_latest_activity => sort_title_latest_activity, - sort_value_oldest_activity => sort_title_latest_activity - } - end - def forks_reverse_sort_options_hash { sort_value_recently_created => sort_value_oldest_created, @@ -93,12 +84,6 @@ module SortingHelper } end - def subgroups_sort_options_hash - groups_sort_options_hash.merge( - sort_value_stars_desc => sort_title_most_stars - ) - end - def admin_groups_sort_options_hash groups_sort_options_hash.merge( sort_value_largest_group => sort_title_largest_group @@ -199,19 +184,6 @@ module SortingHelper }.merge(issuable_sort_option_overrides) end - def audit_logs_sort_order_hash - { - sort_value_recently_created => sort_title_recently_created, - sort_value_oldest_created => sort_title_oldest_created - } - end - - def issuable_sort_option_title(sort_value) - sort_value = issuable_sort_option_overrides[sort_value] || sort_value - - sort_options_hash[sort_value] - end - def issuable_sort_options(viewing_issues, viewing_merge_requests) options = [ { value: sort_value_priority, text: sort_title_priority, href: page_filter_path(sort: sort_value_priority) }, @@ -321,17 +293,6 @@ module SortingHelper } end - def packages_sort_option_title(sort_value) - packages_sort_options_hash[sort_value] || sort_title_created_date - end - - def packages_sort_direction_button(sort_value) - reverse_sort = packages_reverse_sort_order_hash[sort_value] - url = package_sort_path(sort: reverse_sort) - - sort_direction_button(url, reverse_sort, sort_value) - end - def forks_sort_direction_button(sort_value, without = [:state, :scope, :label_name, :milestone_id, :assignee_id, :author_id]) reverse_sort = forks_reverse_sort_options_hash[sort_value] url = page_filter_path(sort: reverse_sort, without: without) diff --git a/app/views/admin/identities/_form.html.haml b/app/views/admin/identities/_form.html.haml index ad78c677da1..dec35e9cf15 100644 --- a/app/views/admin/identities/_form.html.haml +++ b/app/views/admin/identities/_form.html.haml @@ -7,6 +7,7 @@ .col-sm-10 - values = Gitlab::Auth::OAuth::Provider.providers.map { |name| ["#{Gitlab::Auth::OAuth::Provider.label_for(name)} (#{name})", name] } = f.select :provider, values, { allow_blank: false }, class: 'form-control' + = render_if_exists partial: 'admin/identities/provider_id', locals: { f: f } .form-group.row .col-sm-2.col-form-label = f.label :extern_uid, _("Identifier") @@ -15,4 +16,3 @@ .form-actions = f.submit _('Save changes'), pajamas_button: true - diff --git a/config/feature_flags/development/use_embeddings_with_vertex.yml b/config/feature_flags/development/use_embeddings_with_vertex.yml new file mode 100644 index 00000000000..1f37539b4ff --- /dev/null +++ b/config/feature_flags/development/use_embeddings_with_vertex.yml @@ -0,0 +1,8 @@ +--- +name: use_embeddings_with_vertex +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/130421 +rollout_issue_url: +milestone: '16.5' +type: development +group: group::duo chat +default_enabled: false diff --git a/doc/administration/monitoring/prometheus/gitlab_metrics.md b/doc/administration/monitoring/prometheus/gitlab_metrics.md index d91fd5f8156..59fb5784068 100644 --- a/doc/administration/monitoring/prometheus/gitlab_metrics.md +++ b/doc/administration/monitoring/prometheus/gitlab_metrics.md @@ -135,8 +135,8 @@ The following metrics are available: | `gitlab_issuable_fast_count_by_state_total` | Counter | 13.5 | Total number of row count operations on issue/merge request list pages | | | `gitlab_issuable_fast_count_by_state_failures_total` | Counter | 13.5 | Number of soft-failed row count operations on issue/merge request list pages | | | `gitlab_ci_trace_finalize_duration_seconds` | Histogram | 13.6 | Duration of build trace chunks migration to object storage | | -| `gitlab_vulnerability_report_branch_comparison_real_duration_seconds` | Histogram | 15.11 | Execution duration of vulnerability report present on default branch sql query | | -| `gitlab_vulnerability_report_branch_comparison_cpu_duration_seconds` | Histogram | 15.11 | Execution duration of vulnerability report present on default branch sql query | | +| `gitlab_vulnerability_report_branch_comparison_real_duration_seconds` | Histogram | 15.11 | Execution duration of vulnerability report present on default branch SQL query | | +| `gitlab_vulnerability_report_branch_comparison_cpu_duration_seconds` | Histogram | 15.11 | Execution duration of vulnerability report present on default branch SQL query | | | `gitlab_external_http_total` | Counter | 13.8 | Total number of HTTP calls to external systems | `controller`, `action` | | `gitlab_external_http_duration_seconds` | Counter | 13.8 | Duration in seconds spent on each HTTP call to external systems | | | `gitlab_external_http_exception_total` | Counter | 13.8 | Total number of exceptions raised when making external HTTP calls | | diff --git a/doc/administration/reference_architectures/10k_users.md b/doc/administration/reference_architectures/10k_users.md index cd2887bf8e2..39fc63f07fa 100644 --- a/doc/administration/reference_architectures/10k_users.md +++ b/doc/administration/reference_architectures/10k_users.md @@ -833,7 +833,7 @@ to be used with GitLab. The following IPs will be used as an example: You can optionally use a third party external service for Redis as long as it meets the [requirements](../../install/requirements.md#redis). -A reputable provider or solution should be used for this. [Google Memorystore](https://cloud.google.com/memorystore/docs/redis/redis-overview) and [AWS Elasticache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) are known to work. However, note that the Redis Cluster mode specifically isn't supported by GitLab. See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information. +A reputable provider or solution should be used for this. [Google Memorystore](https://cloud.google.com/memorystore/docs/redis/redis-overview) and [AWS ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) are known to work. However, note that the Redis Cluster mode specifically isn't supported by GitLab. See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information. ### Configure the Redis Cache cluster diff --git a/doc/administration/reference_architectures/25k_users.md b/doc/administration/reference_architectures/25k_users.md index b004b813f15..15378cb6bb2 100644 --- a/doc/administration/reference_architectures/25k_users.md +++ b/doc/administration/reference_architectures/25k_users.md @@ -850,7 +850,7 @@ to be used with GitLab. The following IPs will be used as an example: You can optionally use a third party external service for Redis as long as it meets the [requirements](../../install/requirements.md#redis). -A reputable provider or solution should be used for this. [Google Memorystore](https://cloud.google.com/memorystore/docs/redis/redis-overview) and [AWS Elasticache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) are known to work. However, note that the Redis Cluster mode specifically isn't supported by GitLab. See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information. +A reputable provider or solution should be used for this. [Google Memorystore](https://cloud.google.com/memorystore/docs/redis/redis-overview) and [AWS ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) are known to work. However, note that the Redis Cluster mode specifically isn't supported by GitLab. See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information. ### Configure the Redis Cache cluster diff --git a/doc/administration/reference_architectures/2k_users.md b/doc/administration/reference_architectures/2k_users.md index 5a0df0acd7e..6125b0a1dab 100644 --- a/doc/administration/reference_architectures/2k_users.md +++ b/doc/administration/reference_architectures/2k_users.md @@ -334,7 +334,7 @@ to be used with GitLab. You can optionally use a third party external service for Redis as long as it meets the [requirements](../../install/requirements.md#redis). -A reputable provider or solution should be used for this. [Google Memorystore](https://cloud.google.com/memorystore/docs/redis/redis-overview) and [AWS Elasticache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) are known to work. However, note that the Redis Cluster mode specifically isn't supported by GitLab. See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information. +A reputable provider or solution should be used for this. [Google Memorystore](https://cloud.google.com/memorystore/docs/redis/redis-overview) and [AWS ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) are known to work. However, note that the Redis Cluster mode specifically isn't supported by GitLab. See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information. ### Standalone Redis using the Linux package diff --git a/doc/administration/reference_architectures/3k_users.md b/doc/administration/reference_architectures/3k_users.md index 9bf176d3ebf..a176065ced5 100644 --- a/doc/administration/reference_architectures/3k_users.md +++ b/doc/administration/reference_architectures/3k_users.md @@ -450,7 +450,7 @@ to be used with GitLab. The following IPs will be used as an example: You can optionally use a third party external service for Redis as long as it meets the [requirements](../../install/requirements.md#redis). -A reputable provider or solution should be used for this. [Google Memorystore](https://cloud.google.com/memorystore/docs/redis/redis-overview) and [AWS Elasticache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) are known to work. However, note that the Redis Cluster mode specifically isn't supported by GitLab. See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information. +A reputable provider or solution should be used for this. [Google Memorystore](https://cloud.google.com/memorystore/docs/redis/redis-overview) and [AWS ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) are known to work. However, note that the Redis Cluster mode specifically isn't supported by GitLab. See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information. ### Standalone Redis using the Linux package diff --git a/doc/administration/reference_architectures/50k_users.md b/doc/administration/reference_architectures/50k_users.md index d9b0954b3f0..e1cab312374 100644 --- a/doc/administration/reference_architectures/50k_users.md +++ b/doc/administration/reference_architectures/50k_users.md @@ -843,7 +843,7 @@ to be used with GitLab. The following IPs will be used as an example: You can optionally use a third party external service for Redis as long as it meets the [requirements](../../install/requirements.md#redis). -A reputable provider or solution should be used for this. [Google Memorystore](https://cloud.google.com/memorystore/docs/redis/redis-overview) and [AWS Elasticache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) are known to work. However, note that the Redis Cluster mode specifically isn't supported by GitLab. See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information. +A reputable provider or solution should be used for this. [Google Memorystore](https://cloud.google.com/memorystore/docs/redis/redis-overview) and [AWS ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) are known to work. However, note that the Redis Cluster mode specifically isn't supported by GitLab. See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information. ### Configure the Redis Cache cluster diff --git a/doc/administration/reference_architectures/5k_users.md b/doc/administration/reference_architectures/5k_users.md index 04d0782da8e..f35f8a192c5 100644 --- a/doc/administration/reference_architectures/5k_users.md +++ b/doc/administration/reference_architectures/5k_users.md @@ -444,7 +444,7 @@ to be used with GitLab. The following IPs are used as an example: You can optionally use a third party external service for Redis as long as it meets the [requirements](../../install/requirements.md#redis). -A reputable provider or solution should be used for this. [Google Memorystore](https://cloud.google.com/memorystore/docs/redis/redis-overview) and [AWS Elasticache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) are known to work. However, note that the Redis Cluster mode specifically isn't supported by GitLab. See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information. +A reputable provider or solution should be used for this. [Google Memorystore](https://cloud.google.com/memorystore/docs/redis/redis-overview) and [AWS ElastiCache](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) are known to work. However, note that the Redis Cluster mode specifically isn't supported by GitLab. See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information. ### Standalone Redis using the Linux package diff --git a/doc/api/dependency_list_export.md b/doc/api/dependency_list_export.md index 083f7a640fc..c07424223ed 100644 --- a/doc/api/dependency_list_export.md +++ b/doc/api/dependency_list_export.md @@ -24,7 +24,7 @@ and subject to change without notice. Create a new CycloneDX JSON export for all the project dependencies detected in a pipeline. If an authenticated user doesn't have permission to -[read_dependency](../user/permissions.md#custom-role-requirements), +[`read_dependency`](../user/permissions.md#custom-role-requirements), this request returns a `403 Forbidden` status code. SBOM exports can be only accessed by the export's author. diff --git a/doc/api/integrations.md b/doc/api/integrations.md index b073f62f571..4e86e651a12 100644 --- a/doc/api/integrations.md +++ b/doc/api/integrations.md @@ -80,13 +80,9 @@ Example response: ## Apple App Store -Use GitLab to build and release an app in the Apple App Store. +### Set up Apple App Store -See also the [Apple App Store integration documentation](../user/project/integrations/apple_app_store.md). - -### Create/Edit Apple App Store integration - -Set Apple App Store integration for a project. +Set up the Apple App Store integration for a project. ```plaintext PUT /projects/:id/integrations/apple_app_store @@ -101,7 +97,7 @@ Parameters: | `app_store_private_key` | string | true | The Apple App Store Connect Private Key. | | `app_store_protected_refs` | boolean | false | Set variables only on protected branches and tags. Defaults to `true` (enabled). | -### Disable Apple App Store integration +### Disable Apple App Store Disable the Apple App Store integration for a project. Integration settings are reset. @@ -109,9 +105,9 @@ Disable the Apple App Store integration for a project. Integration settings are DELETE /projects/:id/integrations/apple_app_store ``` -### Get Apple App Store integration settings +### Get Apple App Store settings -Get Apple App Store integration settings for a project. +Get the Apple App Store integration settings for a project. ```plaintext GET /projects/:id/integrations/apple_app_store @@ -119,13 +115,9 @@ GET /projects/:id/integrations/apple_app_store ## Asana -Add commit messages as comments to Asana tasks. - -See also the [Asana integration documentation](../user/project/integrations/asana.md). +### Set up Asana -### Create/Edit Asana integration - -Set Asana integration for a project. +Set up the Asana integration for a project. ```plaintext PUT /projects/:id/integrations/asana @@ -138,7 +130,7 @@ Parameters: | `api_key` | string | true | User API token. User must have access to task. All comments are attributed to this user. | | `restrict_to_branch` | string | false | Comma-separated list of branches to be are automatically inspected. Leave blank to include all branches. | -### Disable Asana integration +### Disable Asana Disable the Asana integration for a project. Integration settings are reset. @@ -146,9 +138,9 @@ Disable the Asana integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/asana ``` -### Get Asana integration settings +### Get Asana settings -Get Asana integration settings for a project. +Get the Asana integration settings for a project. ```plaintext GET /projects/:id/integrations/asana @@ -156,11 +148,9 @@ GET /projects/:id/integrations/asana ## Assembla -Project Management Software (Source Commits Endpoint) - -### Create/Edit Assembla integration +### Set up Assembla -Set Assembla integration for a project. +Set up the Assembla integration for a project. ```plaintext PUT /projects/:id/integrations/assembla @@ -170,10 +160,10 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `token` | string | true | The authentication token -| `subdomain` | string | false | The subdomain setting | +| `token` | string | true | The authentication token. | +| `subdomain` | string | false | The subdomain setting. | -### Disable Assembla integration +### Disable Assembla Disable the Assembla integration for a project. Integration settings are reset. @@ -181,23 +171,21 @@ Disable the Assembla integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/assembla ``` -### Get Assembla integration settings +### Get Assembla settings -Get Assembla integration settings for a project. +Get the Assembla integration settings for a project. ```plaintext GET /projects/:id/integrations/assembla ``` -## Atlassian Bamboo CI +## Atlassian Bamboo -A continuous integration and build server +### Set up Atlassian Bamboo -### Create/Edit Atlassian Bamboo CI integration +Set up the Atlassian Bamboo integration for a project. -Set Atlassian Bamboo CI integration for a project. - -> You must set up automatic revision labeling and a repository trigger in Bamboo. +You must configure automatic revision labeling and a repository trigger in Bamboo. ```plaintext PUT /projects/:id/integrations/bamboo @@ -207,23 +195,23 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `bamboo_url` | string | true | Bamboo root URL. For example, `https://bamboo.example.com`. | -| `enable_ssl_verification` | boolean | false | Enable SSL verification. Defaults to true (enabled). | -| `build_key` | string | true | Bamboo build plan key like KEY | -| `username` | string | true | A user with API access, if applicable | -| `password` | string | true | Password of the user | +| `bamboo_url` | string | true | Bamboo root URL (for example, `https://bamboo.example.com`). | +| `enable_ssl_verification` | boolean | false | Enable SSL verification. Defaults to `true` (enabled). | +| `build_key` | string | true | Bamboo build plan key like `KEY`. | +| `username` | string | true | A user with API access, if applicable. | +| `password` | string | true | Password of the user. | -### Disable Atlassian Bamboo CI integration +### Disable Atlassian Bamboo -Disable the Atlassian Bamboo CI integration for a project. Integration settings are reset. +Disable the Atlassian Bamboo integration for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/bamboo ``` -### Get Atlassian Bamboo CI integration settings +### Get Atlassian Bamboo settings -Get Atlassian Bamboo CI integration settings for a project. +Get the Atlassian Bamboo integration settings for a project. ```plaintext GET /projects/:id/integrations/bamboo @@ -231,11 +219,9 @@ GET /projects/:id/integrations/bamboo ## Bugzilla -Bugzilla Issue Tracker - -### Create/Edit Bugzilla integration +### Set up Bugzilla -Set Bugzilla integration for a project. +Set up the Bugzilla integration for a project. ```plaintext PUT /projects/:id/integrations/bugzilla @@ -249,7 +235,7 @@ Parameters: | `issues_url` | string | true | Issue URL | | `project_url` | string | true | Project URL | -### Disable Bugzilla integration +### Disable Bugzilla Disable the Bugzilla integration for a project. Integration settings are reset. @@ -257,9 +243,9 @@ Disable the Bugzilla integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/bugzilla ``` -### Get Bugzilla integration settings +### Get Bugzilla settings -Get Bugzilla integration settings for a project. +Get the Bugzilla integration settings for a project. ```plaintext GET /projects/:id/integrations/bugzilla @@ -267,11 +253,9 @@ GET /projects/:id/integrations/bugzilla ## Buildkite -Continuous integration and deployments +### Set up Buildkite -### Create/Edit Buildkite integration - -Set Buildkite integration for a project. +Set up the Buildkite integration for a project. ```plaintext PUT /projects/:id/integrations/buildkite @@ -281,14 +265,14 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `token` | string | true | Buildkite project GitLab token | -| `project_url` | string | true | Pipeline URL. For example, `https://buildkite.com/example/pipeline` | -| `enable_ssl_verification` | boolean | false | DEPRECATED: This parameter has no effect since SSL verification is always enabled | -| `push_events` | boolean | false | Enable notifications for push events | -| `merge_requests_events` | boolean | false | Enable notifications for merge request events | -| `tag_push_events` | boolean | false | Enable notifications for tag push events | +| `token` | string | true | Buildkite project GitLab token. | +| `project_url` | string | true | Pipeline URL. For example, `https://buildkite.com/example/pipeline`. | +| `enable_ssl_verification` | boolean | false | **Deprecated:** This parameter has no effect because SSL verification is always enabled. | +| `push_events` | boolean | false | Enable notifications for push events. | +| `merge_requests_events` | boolean | false | Enable notifications for merge request events. | +| `tag_push_events` | boolean | false | Enable notifications for tag push events. | -### Disable Buildkite integration +### Disable Buildkite Disable the Buildkite integration for a project. Integration settings are reset. @@ -296,9 +280,9 @@ Disable the Buildkite integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/buildkite ``` -### Get Buildkite integration settings +### Get Buildkite settings -Get Buildkite integration settings for a project. +Get the Buildkite integration settings for a project. ```plaintext GET /projects/:id/integrations/buildkite @@ -306,12 +290,9 @@ GET /projects/:id/integrations/buildkite ## Campfire -Send notifications about push events to Campfire chat rooms. -[New users can no longer sign up for Campfire](https://basecamp.com/handbook/05-product-histories#campfire). +### Set up Campfire -### Create/Edit Campfire integration - -Set Campfire integration for a project. +Set up the Campfire integration for a project. ```plaintext PUT /projects/:id/integrations/campfire @@ -321,11 +302,11 @@ Parameters: | Parameter | Type | Required | Description | |---------------|---------|----------|---------------------------------------------------------------------------------------------| -| `token` | string | true | Campfire API token. To find it, sign in to Campfire and select **My info**. | -| `subdomain` | string | false | Campfire subdomain. Text between `https://` and `.campfirenow.com` when you're logged in. | +| `token` | string | true | Campfire API token. To find it, sign in to Campfire and select **My info**. | +| `subdomain` | string | false | Campfire subdomain. Text between `https://` and `.campfirenow.com` when you're logged in. | | `room` | string | false | Campfire room. The last part of the URL when you're in a room. | -### Disable Campfire integration +### Disable Campfire Disable the Campfire integration for a project. Integration settings are reset. @@ -333,9 +314,9 @@ Disable the Campfire integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/campfire ``` -### Get Campfire integration settings +### Get Campfire settings -Get Campfire integration settings for a project. +Get the Campfire integration settings for a project. ```plaintext GET /projects/:id/integrations/campfire @@ -345,11 +326,9 @@ GET /projects/:id/integrations/campfire > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/120732) in GitLab 16.1. -ClickUp issue tracker. - -### Create or edit ClickUp integration +### Set up ClickUp -Set up ClickUp integration for a project. +Set up the ClickUp integration for a project. ```plaintext PUT /projects/:id/integrations/clickup @@ -357,12 +336,12 @@ PUT /projects/:id/integrations/clickup Parameters: -| Parameter | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `issues_url` | string | true | Issue URL | -| `project_url` | string | true | Project URL | +| Parameter | Type | Required | Description | +| ------------- | ------ | -------- | -------------- | +| `issues_url` | string | true | Issue URL. | +| `project_url` | string | true | Project URL. | -### Disable ClickUp integration +### Disable ClickUp Disable the ClickUp integration for a project. Integration settings are reset. @@ -370,9 +349,9 @@ Disable the ClickUp integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/clickup ``` -### Get ClickUp integration settings +### Get ClickUp settings -Get ClickUp integration settings for a project. +Get the ClickUp integration settings for a project. ```plaintext GET /projects/:id/integrations/clickup @@ -380,11 +359,9 @@ GET /projects/:id/integrations/clickup ## Datadog -Datadog system monitoring. +### Set up Datadog -### Create/Edit Datadog integration - -Set Datadog integration for a project. +Set up the Datadog integration for a project. ```plaintext PUT /projects/:id/integrations/datadog @@ -402,7 +379,7 @@ Parameters: | `datadog_tags` | string | false | Custom tags in Datadog. Specify one tag per line in the format: `key:value\nkey2:value2` ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/79665) in GitLab 14.8.) | | `archive_trace_events` | boolean | false | When enabled, job logs are collected by Datadog and displayed along with pipeline execution traces ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/346339) in GitLab 15.3) | -### Disable Datadog integration +### Disable Datadog Disable the Datadog integration for a project. Integration settings are reset. @@ -410,9 +387,9 @@ Disable the Datadog integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/datadog ``` -### Get Datadog integration settings +### Get Datadog settings -Get Datadog integration settings for a project. +Get the Datadog integration settings for a project. ```plaintext GET /projects/:id/integrations/datadog @@ -420,11 +397,9 @@ GET /projects/:id/integrations/datadog ## Telegram -Telegram chat tool. - -### Create/Edit Telegram integration +### Set up Telegram -Set the Telegram integration for a project. +Set up the Telegram integration for a project. ```plaintext PUT /projects/:id/integrations/telegram @@ -447,7 +422,7 @@ Parameters: | `pipeline_events` | boolean | true | Enable notifications for pipeline events | | `wiki_page_events` | boolean | true | Enable notifications for wiki page events | -### Disable Telegram integration +### Disable Telegram Disable the Telegram integration for a project. Integration settings are reset. @@ -455,9 +430,9 @@ Disable the Telegram integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/telegram ``` -### Get Telegram integration settings +### Get Telegram settings -Get Telegram integration settings for a project. +Get the Telegram integration settings for a project. ```plaintext GET /projects/:id/integrations/telegram @@ -465,11 +440,9 @@ GET /projects/:id/integrations/telegram ## Unify Circuit -Unify Circuit RTC and collaboration tool. - -### Create/Edit Unify Circuit integration +### Set up Unify Circuit -Set Unify Circuit integration for a project. +Set up the Unify Circuit integration for a project. ```plaintext PUT /projects/:id/integrations/unify-circuit @@ -479,20 +452,20 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `webhook` | string | true | The Unify Circuit webhook. For example, `https://circuit.com/rest/v2/webhooks/incoming/...`. | -| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines | -| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is "default" | -| `push_events` | boolean | false | Enable notifications for push events | -| `issues_events` | boolean | false | Enable notifications for issue events | -| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events | -| `merge_requests_events` | boolean | false | Enable notifications for merge request events | -| `tag_push_events` | boolean | false | Enable notifications for tag push events | -| `note_events` | boolean | false | Enable notifications for note events | -| `confidential_note_events` | boolean | false | Enable notifications for confidential note events | -| `pipeline_events` | boolean | false | Enable notifications for pipeline events | -| `wiki_page_events` | boolean | false | Enable notifications for wiki page events | - -### Disable Unify Circuit integration +| `webhook` | string | true | The Unify Circuit webhook (for example, `https://circuit.com/rest/v2/webhooks/incoming/...`). | +| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines. | +| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. | +| `push_events` | boolean | false | Enable notifications for push events. | +| `issues_events` | boolean | false | Enable notifications for issue events. | +| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events. | +| `merge_requests_events` | boolean | false | Enable notifications for merge request events. | +| `tag_push_events` | boolean | false | Enable notifications for tag push events. | +| `note_events` | boolean | false | Enable notifications for note events. | +| `confidential_note_events` | boolean | false | Enable notifications for confidential note events. | +| `pipeline_events` | boolean | false | Enable notifications for pipeline events. | +| `wiki_page_events` | boolean | false | Enable notifications for wiki page events. | + +### Disable Unify Circuit Disable the Unify Circuit integration for a project. Integration settings are reset. @@ -500,9 +473,9 @@ Disable the Unify Circuit integration for a project. Integration settings are re DELETE /projects/:id/integrations/unify-circuit ``` -### Get Unify Circuit integration settings +### Get Unify Circuit settings -Get Unify Circuit integration settings for a project. +Get the Unify Circuit integration settings for a project. ```plaintext GET /projects/:id/integrations/unify-circuit @@ -510,11 +483,9 @@ GET /projects/:id/integrations/unify-circuit ## Pumble -Pumble chat tool. +### Set up Pumble -### Create/Edit Pumble integration - -Set Pumble integration for a project. +Set up the Pumble integration for a project. ```plaintext PUT /projects/:id/integrations/pumble @@ -524,7 +495,7 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `webhook` | string | true | The Pumble webhook. For example, `https://api.pumble.com/workspaces/x/...`. | +| `webhook` | string | true | The Pumble webhook (for example, `https://api.pumble.com/workspaces/x/...`). | | `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default is `default`. | | `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events. | | `confidential_note_events` | boolean | false | Enable notifications for confidential note events. | @@ -537,7 +508,7 @@ Parameters: | `tag_push_events` | boolean | false | Enable notifications for tag push events. | | `wiki_page_events` | boolean | false | Enable notifications for wiki page events. | -### Disable Pumble integration +### Disable Pumble Disable the Pumble integration for a project. Integration settings are reset. @@ -545,9 +516,9 @@ Disable the Pumble integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/pumble ``` -### Get Pumble integration settings +### Get Pumble settings -Get Pumble integration settings for a project. +Get the Pumble integration settings for a project. ```plaintext GET /projects/:id/integrations/pumble @@ -555,11 +526,9 @@ GET /projects/:id/integrations/pumble ## Webex Teams -Webex Teams collaboration tool. - -### Create/Edit Webex Teams integration +### Set up Webex Teams -Set Webex Teams integration for a project. +Set up the Webex Teams integration for a project. ```plaintext PUT /projects/:id/integrations/webex-teams @@ -569,20 +538,20 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `webhook` | string | true | The Webex Teams webhook. For example, `https://api.ciscospark.com/v1/webhooks/incoming/...`. | -| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines | -| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is "default" | -| `push_events` | boolean | false | Enable notifications for push events | -| `issues_events` | boolean | false | Enable notifications for issue events | -| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events | -| `merge_requests_events` | boolean | false | Enable notifications for merge request events | -| `tag_push_events` | boolean | false | Enable notifications for tag push events | -| `note_events` | boolean | false | Enable notifications for note events | -| `confidential_note_events` | boolean | false | Enable notifications for confidential note events | -| `pipeline_events` | boolean | false | Enable notifications for pipeline events | -| `wiki_page_events` | boolean | false | Enable notifications for wiki page events | - -### Disable Webex Teams integration +| `webhook` | string | true | The Webex Teams webhook (for example, `https://api.ciscospark.com/v1/webhooks/incoming/...`). | +| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines. | +| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. | +| `push_events` | boolean | false | Enable notifications for push events. | +| `issues_events` | boolean | false | Enable notifications for issue events. | +| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events. | +| `merge_requests_events` | boolean | false | Enable notifications for merge request events. | +| `tag_push_events` | boolean | false | Enable notifications for tag push events. | +| `note_events` | boolean | false | Enable notifications for note events. | +| `confidential_note_events` | boolean | false | Enable notifications for confidential note events. | +| `pipeline_events` | boolean | false | Enable notifications for pipeline events. | +| `wiki_page_events` | boolean | false | Enable notifications for wiki page events. | + +### Disable Webex Teams Disable the Webex Teams integration for a project. Integration settings are reset. @@ -590,21 +559,19 @@ Disable the Webex Teams integration for a project. Integration settings are rese DELETE /projects/:id/integrations/webex-teams ``` -### Get Webex Teams integration settings +### Get Webex Teams settings -Get Webex Teams integration settings for a project. +Get the Webex Teams integration settings for a project. ```plaintext GET /projects/:id/integrations/webex-teams ``` -## Custom Issue Tracker - -Custom issue tracker +## Custom issue tracker -### Create/Edit Custom Issue Tracker integration +### Set up a custom issue tracker -Set Custom Issue Tracker integration for a project. +Set up a custom issue tracker for a project. ```plaintext PUT /projects/:id/integrations/custom-issue-tracker @@ -618,31 +585,29 @@ Parameters: | `issues_url` | string | true | Issue URL | | `project_url` | string | true | Project URL | -### Disable Custom Issue Tracker integration +### Disable a custom issue tracker -Disable the Custom Issue Tracker integration for a project. Integration settings are reset. +Disable a custom issue tracker for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/custom-issue-tracker ``` -### Get Custom Issue Tracker integration settings +### Get custom issue tracker settings -Get Custom Issue Tracker integration settings for a project. +Get the custom issue tracker settings for a project. ```plaintext GET /projects/:id/integrations/custom-issue-tracker ``` -## Discord +## Discord Notifications -Send notifications about project events to a Discord channel. - -### Create/Edit Discord integration +### Set up Discord Notifications > `_channel` parameters [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125621) in GitLab 16.3. -Set Discord integration for a project. +Set up the Discord Notifications integration for a project. ```plaintext PUT /projects/:id/integrations/discord @@ -652,51 +617,49 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `webhook` | string | true | Discord webhook. For example, `https://discord.com/api/webhooks/…` | -| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is "default" | -| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events | -| `confidential_issue_channel` | string | false | The webhook override to receive confidential issues events notifications | -| `confidential_note_events` | boolean | false | Enable notifications for confidential note events | -| `confidential_note_channel` | string | false | The webhook override to receive confidential note events notifications | -| `issues_events` | boolean | false | Enable notifications for issue events | -| `issue_channel` | string | false | The webhook override to receive issues events notifications | -| `merge_requests_events` | boolean | false | Enable notifications for merge request events | -| `merge_request_channel` | string | false | The webhook override to receive merge request events notifications | -| `note_events` | boolean | false | Enable notifications for note events | -| `note_channel` | string | false | The webhook override to receive note events notifications | -| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines | -| `pipeline_events` | boolean | false | Enable notifications for pipeline events | -| `pipeline_channel` | string | false | The webhook override to receive pipeline events notifications | -| `push_events` | boolean | false | Enable notifications for push events | -| `push_channel` | string | false | The webhook override to receive push events notifications | -| `tag_push_events` | boolean | false | Enable notifications for tag push events | -| `tag_push_channel` | string | false | The webhook override to receive tag push events notifications | -| `wiki_page_events` | boolean | false | Enable notifications for wiki page events | -| `wiki_page_channel` | string | false | The webhook override to receive wiki page events notifications | +| `webhook` | string | true | Discord webhook (for example, `https://discord.com/api/webhooks/…`). | +| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. | +| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events. | +| `confidential_issue_channel` | string | false | The webhook override to receive confidential issues events notifications. | +| `confidential_note_events` | boolean | false | Enable notifications for confidential note events. | +| `confidential_note_channel` | string | false | The webhook override to receive confidential note events notifications. | +| `issues_events` | boolean | false | Enable notifications for issue events. | +| `issue_channel` | string | false | The webhook override to receive issues events notifications. | +| `merge_requests_events` | boolean | false | Enable notifications for merge request events. | +| `merge_request_channel` | string | false | The webhook override to receive merge request events notifications. | +| `note_events` | boolean | false | Enable notifications for note events. | +| `note_channel` | string | false | The webhook override to receive note events notifications. | +| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines. | +| `pipeline_events` | boolean | false | Enable notifications for pipeline events. | +| `pipeline_channel` | string | false | The webhook override to receive pipeline events notifications. | +| `push_events` | boolean | false | Enable notifications for push events. | +| `push_channel` | string | false | The webhook override to receive push events notifications. | +| `tag_push_events` | boolean | false | Enable notifications for tag push events. | +| `tag_push_channel` | string | false | The webhook override to receive tag push events notifications. | +| `wiki_page_events` | boolean | false | Enable notifications for wiki page events. | +| `wiki_page_channel` | string | false | The webhook override to receive wiki page events notifications. | -### Disable Discord integration +### Disable Discord Notifications -Disable the Discord integration for a project. Integration settings are reset. +Disable the Discord Notifications integration for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/discord ``` -### Get Discord integration settings +### Get Discord Notifications settings -Get Discord integration settings for a project. +Get the Discord Notifications integration settings for a project. ```plaintext GET /projects/:id/integrations/discord ``` -## Drone CI +## Drone -Drone is a Continuous Integration platform built on Docker, written in Go +### Set up Drone -### Create/Edit Drone CI integration - -Set Drone CI integration for a project. +Set up the Drone integration for a project. ```plaintext PUT /projects/:id/integrations/drone-ci @@ -706,36 +669,34 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `token` | string | true | Drone CI project specific token | -| `drone_url` | string | true | `http://drone.example.com` | -| `enable_ssl_verification` | boolean | false | Enable SSL verification. Defaults to true (enabled). | -| `push_events` | boolean | false | Enable notifications for push events | -| `merge_requests_events` | boolean | false | Enable notifications for merge request events | -| `tag_push_events` | boolean | false | Enable notifications for tag push events | +| `token` | string | true | Drone CI project specific token. | +| `drone_url` | string | true | `http://drone.example.com`. | +| `enable_ssl_verification` | boolean | false | Enable SSL verification. Defaults to `true` (enabled). | +| `push_events` | boolean | false | Enable notifications for push events. | +| `merge_requests_events` | boolean | false | Enable notifications for merge request events. | +| `tag_push_events` | boolean | false | Enable notifications for tag push events. | -### Disable Drone CI integration +### Disable Drone -Disable the Drone CI integration for a project. Integration settings are reset. +Disable the Drone integration for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/drone-ci ``` -### Get Drone CI integration settings +### Get Drone settings -Get Drone CI integration settings for a project. +Get the Drone integration settings for a project. ```plaintext GET /projects/:id/integrations/drone-ci ``` -## Emails on Push +## Emails on push -Email the commits and diff of each push to a list of recipients. +### Set up emails on push -### Create/Edit Emails on Push integration - -Set Emails on Push integration for a project. +Set up the emails on push integration for a project. ```plaintext PUT /projects/:id/integrations/emails-on-push @@ -745,24 +706,24 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `recipients` | string | true | Emails separated by whitespace | -| `disable_diffs` | boolean | false | Disable code diffs | -| `send_from_committer_email` | boolean | false | Send from committer | -| `push_events` | boolean | false | Enable notifications for push events | -| `tag_push_events` | boolean | false | Enable notifications for tag push events | -| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. Notifications are always fired for tag pushes. The default value is "all" | +| `recipients` | string | true | Emails separated by whitespace. | +| `disable_diffs` | boolean | false | Disable code diffs. | +| `send_from_committer_email` | boolean | false | Send from committer. | +| `push_events` | boolean | false | Enable notifications for push events. | +| `tag_push_events` | boolean | false | Enable notifications for tag push events. | +| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. Notifications are always fired for tag pushes. The default value is `all`. | -### Disable Emails on Push integration +### Disable emails on push -Disable the Emails on Push integration for a project. Integration settings are reset. +Disable the emails on push integration for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/emails-on-push ``` -### Get Emails on Push integration settings +### Get emails on push settings -Get Emails on Push integration settings for a project. +Get the emails on push integration settings for a project. ```plaintext GET /projects/:id/integrations/emails-on-push @@ -770,11 +731,9 @@ GET /projects/:id/integrations/emails-on-push ## Engineering Workflow Management (EWM) -Use IBM Engineering Workflow Management (EWM) as a project's issue tracker. - -### Create/Edit EWM integration +### Set up EWM -Set EWM integration for a project. +Set up the EWM integration for a project. ```plaintext PUT /projects/:id/integrations/ewm @@ -784,11 +743,11 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `new_issue_url` | string | true | The URL to create an issue in EWM | -| `project_url` | string | true | The URL to the project in EWM | -| `issues_url` | string | true | The URL to view an issue in EWM. Must contain `:id` | +| `new_issue_url` | string | true | The URL to create an issue in EWM. | +| `project_url` | string | true | The URL to the project in EWM. | +| `issues_url` | string | true | The URL to view an issue in EWM. Must contain `:id`. | -### Disable EWM integration +### Disable EWM Disable the EWM integration for a project. Integration settings are reset. @@ -796,23 +755,19 @@ Disable the EWM integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/ewm ``` -### Get EWM integration settings +### Get EWM settings -Get EWM integration settings for a project. +Get the EWM integration settings for a project. ```plaintext GET /projects/:id/integrations/ewm ``` -## Confluence integration +## Confluence Workspace -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/220934) in GitLab 13.2. +### Set up Confluence Workspace -Replaces the link to the internal wiki with a link to a Confluence Cloud Workspace. - -### Create/Edit Confluence integration - -Set Confluence integration for a project. +Set up the Confluence Workspace integration for a project. ```plaintext PUT /projects/:id/integrations/confluence @@ -824,59 +779,27 @@ Parameters: | --------- | ---- | -------- | ----------- | | `confluence_url` | string | true | The URL of the Confluence Cloud Workspace hosted on atlassian.net. | -### Disable Confluence integration +### Disable Confluence Workspace -Disable the Confluence integration for a project. Integration settings are reset. +Disable the Confluence Workspace integration for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/confluence ``` -### Get Confluence integration settings +### Get Confluence Workspace settings -Get Confluence integration settings for a project. +Get the Confluence Workspace integration settings for a project. ```plaintext GET /projects/:id/integrations/confluence ``` -## Shimo integration - -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/343386) in GitLab 14.5 [with a flag](../administration/feature_flags.md) named `shimo_integration`. Disabled by default. -> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/343386) in GitLab 15.4. -> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/343386) in GitLab 15.4. [Feature flag `shimo_integration`](https://gitlab.com/gitlab-org/gitlab/-/issues/345356) removed. - -Replaces the link to the internal wiki with a link to a Shimo Workspace. - -### Create/Edit Shimo integration - -Set Shimo integration for a project. - -```plaintext -PUT /projects/:id/integrations/shimo -``` - -Parameters: - -| Parameter | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `external_wiki_url` | string | true | Shimo Workspace URL | - -### Disable Shimo integration - -Disable the Shimo integration for a project. Integration settings are reset. - -```plaintext -DELETE /projects/:id/integrations/shimo -``` - ## External wiki -Replaces the link to the internal wiki with a link to an external wiki. - -### Create/Edit External wiki integration +### Set up an external wiki -Set External wiki integration for a project. +Set up an external wiki for a project. ```plaintext PUT /projects/:id/integrations/external-wiki @@ -888,17 +811,17 @@ Parameters: | --------- | ---- | -------- | ----------- | | `external_wiki_url` | string | true | The URL of the external wiki | -### Disable External wiki integration +### Disable an external wiki -Disable the External wiki integration for a project. Integration settings are reset. +Disable an external wiki for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/external-wiki ``` -### Get External wiki integration settings +### Get external wiki settings -Get External wiki integration settings for a project. +Get the external wiki settings for a project. ```plaintext GET /projects/:id/integrations/external-wiki @@ -906,11 +829,9 @@ GET /projects/:id/integrations/external-wiki ## GitHub **(PREMIUM ALL)** -Code collaboration software. +### Set up GitHub -### Create/Edit GitHub integration - -Set GitHub integration for a project. +Set up the GitHub integration for a project. ```plaintext PUT /projects/:id/integrations/github @@ -920,11 +841,11 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `token` | string | true | GitHub API token with `repo:status` OAuth scope | -| `repository_url` | string | true | GitHub repository URL | -| `static_context` | boolean | false | Append instance name instead of branch to [status check name](../user/project/integrations/github.md#static-or-dynamic-status-check-names) | +| `token` | string | true | GitHub API token with `repo:status` OAuth scope. | +| `repository_url` | string | true | GitHub repository URL. | +| `static_context` | boolean | false | Append instance name instead of branch to [status check name](../user/project/integrations/github.md#static-or-dynamic-status-check-names). | -### Disable GitHub integration +### Disable GitHub Disable the GitHub integration for a project. Integration settings are reset. @@ -932,21 +853,19 @@ Disable the GitHub integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/github ``` -### Get GitHub integration settings +### Get GitHub settings -Get GitHub integration settings for a project. +Get the GitHub integration settings for a project. ```plaintext GET /projects/:id/integrations/github ``` -## Hangouts Chat - -Google Workspace team collaboration tool. +## Google Chat -### Create/Edit Hangouts Chat integration +### Set up Google Chat -Set Hangouts Chat integration for a project. +Set up the Google Chat integration for a project. ```plaintext PUT /projects/:id/integrations/hangouts-chat @@ -956,45 +875,41 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `webhook` | string | true | The Hangouts Chat webhook. For example, `https://chat.googleapis.com/v1/spaces...`. | -| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines | -| `notify_only_default_branch` | boolean | false | DEPRECATED: This parameter has been replaced with `branches_to_be_notified` | -| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is "default" | -| `push_events` | boolean | false | Enable notifications for push events | -| `issues_events` | boolean | false | Enable notifications for issue events | -| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events | -| `merge_requests_events` | boolean | false | Enable notifications for merge request events | -| `tag_push_events` | boolean | false | Enable notifications for tag push events | -| `note_events` | boolean | false | Enable notifications for note events | -| `confidential_note_events` | boolean | false | Enable notifications for confidential note events | -| `pipeline_events` | boolean | false | Enable notifications for pipeline events | -| `wiki_page_events` | boolean | false | Enable notifications for wiki page events | +| `webhook` | string | true | The Hangouts Chat webhook (for example, `https://chat.googleapis.com/v1/spaces...`). | +| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines. | +| `notify_only_default_branch` | boolean | false | DEPRECATED: This parameter has been replaced with `branches_to_be_notified`. | +| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. | +| `push_events` | boolean | false | Enable notifications for push events. | +| `issues_events` | boolean | false | Enable notifications for issue events. | +| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events. | +| `merge_requests_events` | boolean | false | Enable notifications for merge request events. | +| `tag_push_events` | boolean | false | Enable notifications for tag push events. | +| `note_events` | boolean | false | Enable notifications for note events. | +| `confidential_note_events` | boolean | false | Enable notifications for confidential note events. | +| `pipeline_events` | boolean | false | Enable notifications for pipeline events. | +| `wiki_page_events` | boolean | false | Enable notifications for wiki page events. | -### Disable Hangouts Chat integration +### Disable Google Chat -Disable the Hangouts Chat integration for a project. Integration settings are reset. +Disable the Google Chat integration for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/hangouts-chat ``` -### Get Hangouts Chat integration settings +### Get Google Chat settings -Get Hangouts Chat integration settings for a project. +Get the Google Chat integration settings for a project. ```plaintext GET /projects/:id/integrations/hangouts-chat ``` -## Irker (IRC gateway) - -Send IRC messages, on update, to a list of recipients through an irker gateway. - -For more information, see the [irker integration documentation](../user/project/integrations/irker.md). +## irker (IRC gateway) -### Create/Edit Irker (IRC gateway) integration +### Set up irker -Set Irker (IRC gateway) integration for a project. +Set up the irker integration for a project. ```plaintext PUT /projects/:id/integrations/irker @@ -1010,17 +925,17 @@ Parameters: | `server_port` | integer | false | 6659 | | `colorize_messages` | boolean | false | Colorize messages | -### Disable Irker (IRC gateway) integration +### Disable irker -Disable the Irker (IRC gateway) integration for a project. Integration settings are reset. +Disable the irker integration for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/irker ``` -### Get Irker (IRC gateway) integration settings +### Get irker settings -Get Irker (IRC gateway) integration settings for a project. +Get the irker integration settings for a project. ```plaintext GET /projects/:id/integrations/irker @@ -1028,19 +943,9 @@ GET /projects/:id/integrations/irker ## Jira -Jira issue tracker. +### Set up Jira -### Get Jira integration settings - -Get Jira integration settings for a project. - -```plaintext -GET /projects/:id/integrations/jira -``` - -### Create/Edit Jira integration - -Set Jira integration for a project. +Set up the Jira integration for a project. ```plaintext PUT /projects/:id/integrations/jira @@ -1050,21 +955,21 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `url` | string | yes | The URL to the Jira project which is being linked to this GitLab project. For example, `https://jira.example.com`. | -| `api_url` | string | no | The base URL to the Jira instance API. Web URL value is used if not set. For example, `https://jira-api.example.com`. | -| `username` | string | no | The email or username to be used with Jira. For Jira Cloud use an email, for Jira Data Center and Jira Server use a username. Required when using Basic authentication (`jira_auth_type` is `0`) | -| `password` | string | yes | The Jira API token, password, or personal access token to be used with Jira. When your authentication method is Basic (`jira_auth_type` is `0`) use an API token for Jira Cloud, or a password for Jira Data Center or Jira Server. When your authentication method is Jira personal access token (`jira_auth_type` is `1`) use a personal access token. | +| `url` | string | yes | The URL to the Jira project which is being linked to this GitLab project (for example, `https://jira.example.com`). | +| `api_url` | string | no | The base URL to the Jira instance API. Web URL value is used if not set (for example, `https://jira-api.example.com`). | +| `username` | string | no | The email or username to be used with Jira. For Jira Cloud use an email, for Jira Data Center and Jira Server use a username. Required when using Basic authentication (`jira_auth_type` is `0`). | +| `password` | string | yes | The Jira API token, password, or personal access token to be used with Jira. When your authentication method is basic (`jira_auth_type` is `0`), use an API token for Jira Cloud or a password for Jira Data Center or Jira Server. When your authentication method is a Jira personal access token (`jira_auth_type` is `1`), use the personal access token. | | `active` | boolean | no | Activates or deactivates the integration. Defaults to `false` (deactivated). | | `jira_auth_type`| integer | no | The authentication method to be used with Jira. `0` means Basic Authentication. `1` means Jira personal access token. Defaults to `0`. | | `jira_issue_prefix` | string | no | Prefix to match Jira issue keys. | | `jira_issue_regex` | string | no | Regular expression to match Jira issue keys. | -| `jira_issue_transition_automatic` | boolean | no | Enable [automatic issue transitions](../integration/jira/issues.md#automatic-issue-transitions). Takes precedence over `jira_issue_transition_id` if enabled. Defaults to `false` | +| `jira_issue_transition_automatic` | boolean | no | Enable [automatic issue transitions](../integration/jira/issues.md#automatic-issue-transitions). Takes precedence over `jira_issue_transition_id` if enabled. Defaults to `false`. | | `jira_issue_transition_id` | string | no | The ID of one or more transitions for [custom issue transitions](../integration/jira/issues.md#custom-issue-transitions). Ignored if `jira_issue_transition_automatic` is enabled. Defaults to a blank string, which disables custom transitions. | -| `commit_events` | boolean | false | Enable notifications for commit events | -| `merge_requests_events` | boolean | false | Enable notifications for merge request events | -| `comment_on_event_enabled` | boolean | false | Enable comments inside Jira issues on each GitLab event (commit / merge request) | +| `commit_events` | boolean | false | Enable notifications for commit events. | +| `merge_requests_events` | boolean | false | Enable notifications for merge request events. | +| `comment_on_event_enabled` | boolean | false | Enable comments inside Jira issues on each GitLab event (commit / merge request). | -### Disable Jira integration +### Disable Jira Disable the Jira integration for a project. Integration settings are reset. @@ -1072,13 +977,41 @@ Disable the Jira integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/jira ``` -## Slack Slash Commands +### Get Jira settings + +Get the Jira integration settings for a project. + +```plaintext +GET /projects/:id/integrations/jira +``` + +## Slack slash commands -Ability to receive slash commands from a Slack chat instance. +### Set up Slack slash commands + +Set up Slack slash commands for a project. + +```plaintext +PUT /projects/:id/integrations/slack-slash-commands +``` + +Parameters: + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `token` | string | yes | The Slack token. | + +### Disable Slack slash commands + +Disable Slack slash commands for a project. Integration settings are reset. + +```plaintext +DELETE /projects/:id/integrations/slack-slash-commands +``` -### Get Slack Slash Command integration settings +### Get Slack Slash Commands settings -Get Slack Slash Command integration settings for a project. +Get the Slack slash commands settings for a project. ```plaintext GET /projects/:id/integrations/slack-slash-commands @@ -1109,69 +1042,43 @@ Example response: } ``` -### Create/Edit Slack Slash Commands integration +## Mattermost slash commands -Set Slack Slash Command for a project. +### Set up Mattermost slash commands + +Set up Mattermost slash commands for a project. ```plaintext -PUT /projects/:id/integrations/slack-slash-commands +PUT /projects/:id/integrations/mattermost-slash-commands ``` Parameters: -| Parameter | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `token` | string | yes | The Slack token | +| Parameter | Type | Required | Description | +| --------- | ------ | -------- | --------------------- | +| `token` | string | yes | The Mattermost token. | -### Disable Slack Slash Command integration +### Disable Mattermost slash commands -Disable the Slack Slash Command integration for a project. Integration settings are reset. +Disable Mattermost slash commands for a project. Integration settings are reset. ```plaintext -DELETE /projects/:id/integrations/slack-slash-commands +DELETE /projects/:id/integrations/mattermost-slash-commands ``` -## Mattermost Slash Commands - -Ability to receive slash commands from a Mattermost chat instance. - -### Get Mattermost Slash Command integration settings +### Get Mattermost slash commands settings -Get Mattermost Slash Command integration settings for a project. +Get the Mattermost slash commands settings for a project. ```plaintext GET /projects/:id/integrations/mattermost-slash-commands ``` -### Create/Edit Mattermost Slash Command integration - -Set Mattermost Slash Command for a project. - -```plaintext -PUT /projects/:id/integrations/mattermost-slash-commands -``` - -Parameters: - -| Parameter | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `token` | string | yes | The Mattermost token | - -### Disable Mattermost Slash Command integration - -Disable the Mattermost Slash Command integration for a project. Integration settings are reset. - -```plaintext -DELETE /projects/:id/integrations/mattermost-slash-commands -``` - ## Packagist -Update your project on Packagist (the main Composer repository) when commits or tags are pushed to GitLab. - -### Create/Edit Packagist integration +### Set up Packagist -Set Packagist integration for a project. +Set up the Packagist integration for a project. ```plaintext PUT /projects/:id/integrations/packagist @@ -1181,14 +1088,14 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `username` | string | yes | The username of a Packagist account | -| `token` | string | yes | API token to the Packagist server | -| `server` | boolean | no | URL of the Packagist server. Leave blank for default: <https://packagist.org> | -| `push_events` | boolean | false | Enable notifications for push events | -| `merge_requests_events` | boolean | false | Enable notifications for merge request events | -| `tag_push_events` | boolean | false | Enable notifications for tag push events | +| `username` | string | yes | The username of a Packagist account. | +| `token` | string | yes | API token to the Packagist server. | +| `server` | boolean | no | URL of the Packagist server. Leave blank for the default `<https://packagist.org>`. | +| `push_events` | boolean | false | Enable notifications for push events. | +| `merge_requests_events` | boolean | false | Enable notifications for merge request events. | +| `tag_push_events` | boolean | false | Enable notifications for tag push events. | -### Disable Packagist integration +### Disable Packagist Disable the Packagist integration for a project. Integration settings are reset. @@ -1196,21 +1103,19 @@ Disable the Packagist integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/packagist ``` -### Get Packagist integration settings +### Get Packagist settings -Get Packagist integration settings for a project. +Get the Packagist integration settings for a project. ```plaintext GET /projects/:id/integrations/packagist ``` -## Pipeline-Emails - -Get emails for GitLab CI/CD pipelines. +## Pipeline status emails -### Create/Edit Pipeline-Emails integration +### Set up pipeline status emails -Set Pipeline-Emails integration for a project. +Set up pipeline status emails for a project. ```plaintext PUT /projects/:id/integrations/pipelines-email @@ -1220,23 +1125,23 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `recipients` | string | yes | Comma-separated list of recipient email addresses | -| `notify_only_broken_pipelines` | boolean | no | Notify only broken pipelines | -| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is "default" | -| `notify_only_default_branch` | boolean | no | Send notifications only for the default branch ([introduced in GitLab 12.0](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/28271)) | -| `pipeline_events` | boolean | false | Enable notifications for pipeline events | +| `recipients` | string | yes | Comma-separated list of recipient email addresses. | +| `notify_only_broken_pipelines` | boolean | no | Notify only broken pipelines. | +| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. | +| `notify_only_default_branch` | boolean | no | Send notifications only for the default branch. | +| `pipeline_events` | boolean | false | Enable notifications for pipeline events. | -### Disable Pipeline-Emails integration +### Disable pipeline status emails -Disable the Pipeline-Emails integration for a project. Integration settings are reset. +Disable pipeline status emails for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/pipelines-email ``` -### Get Pipeline-Emails integration settings +### Get pipeline status emails settings -Get Pipeline-Emails integration settings for a project. +Get the pipeline status emails settings for a project. ```plaintext GET /projects/:id/integrations/pipelines-email @@ -1244,13 +1149,9 @@ GET /projects/:id/integrations/pipelines-email ## Pivotal Tracker -Add commit messages as comments to Pivotal Tracker stories. - -See also the [Pivotal Tracker integration documentation](../user/project/integrations/pivotal_tracker.md). +### Set up Pivotal Tracker -### Create/Edit Pivotal Tracker integration - -Set Pivotal Tracker integration for a project. +Set up the Pivotal Tracker integration for a project. ```plaintext PUT /projects/:id/integrations/pivotaltracker @@ -1260,10 +1161,10 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `token` | string | true | The Pivotal Tracker token | +| `token` | string | true | The Pivotal Tracker token. | | `restrict_to_branch` | boolean | false | Comma-separated list of branches to automatically inspect. Leave blank to include all branches. | -### Disable Pivotal Tracker integration +### Disable Pivotal Tracker Disable the Pivotal Tracker integration for a project. Integration settings are reset. @@ -1271,57 +1172,19 @@ Disable the Pivotal Tracker integration for a project. Integration settings are DELETE /projects/:id/integrations/pivotaltracker ``` -### Get Pivotal Tracker integration settings +### Get Pivotal Tracker settings -Get Pivotal Tracker integration settings for a project. +Get the Pivotal Tracker integration settings for a project. ```plaintext GET /projects/:id/integrations/pivotaltracker ``` -## Prometheus - -Prometheus is a powerful time-series monitoring service. - -### Create/Edit Prometheus integration - -Set Prometheus integration for a project. - -```plaintext -PUT /projects/:id/integrations/prometheus -``` - -Parameters: - -| Parameter | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `api_url` | string | true | Prometheus API Base URL. For example, `http://prometheus.example.com/`. | -| `google_iap_audience_client_id` | string | false | Client ID of the IAP secured resource (looks like IAP_CLIENT_ID.apps.googleusercontent.com) | -| `google_iap_service_account_json` | string | false | `credentials.json` file for your service account, like { `"type": "service_account", "project_id": ... }` | - -### Disable Prometheus integration - -Disable the Prometheus integration for a project. Integration settings are reset. - -```plaintext -DELETE /projects/:id/integrations/prometheus -``` - -### Get Prometheus integration settings - -Get Prometheus integration settings for a project. - -```plaintext -GET /projects/:id/integrations/prometheus -``` - ## Pushover -Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop. +### Set up Pushover -### Create/Edit Pushover integration - -Set Pushover integration for a project. +Set up the Pushover integration for a project. ```plaintext PUT /projects/:id/integrations/pushover @@ -1331,13 +1194,13 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `api_key` | string | true | Your application key | -| `user_key` | string | true | Your user key | -| `priority` | string | true | The priority | -| `device` | string | false | Leave blank for all active devices | -| `sound` | string | false | The sound of the notification | +| `api_key` | string | true | Your application key. | +| `user_key` | string | true | Your user key. | +| `priority` | string | true | The priority. | +| `device` | string | false | Leave blank for all active devices. | +| `sound` | string | false | The sound of the notification. | -### Disable Pushover integration +### Disable Pushover Disable the Pushover integration for a project. Integration settings are reset. @@ -1345,9 +1208,9 @@ Disable the Pushover integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/pushover ``` -### Get Pushover integration settings +### Get Pushover settings -Get Pushover integration settings for a project. +Get the Pushover integration settings for a project. ```plaintext GET /projects/:id/integrations/pushover @@ -1355,11 +1218,9 @@ GET /projects/:id/integrations/pushover ## Redmine -Redmine issue tracker - -### Create/Edit Redmine integration +### Set up Redmine -Set Redmine integration for a project. +Set up the Redmine integration for a project. ```plaintext PUT /projects/:id/integrations/redmine @@ -1369,11 +1230,11 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `new_issue_url` | string | true | New Issue URL | -| `project_url` | string | true | Project URL | -| `issues_url` | string | true | Issue URL | +| `new_issue_url` | string | true | New Issue URL. | +| `project_url` | string | true | Project URL. | +| `issues_url` | string | true | Issue URL. | -### Disable Redmine integration +### Disable Redmine Disable the Redmine integration for a project. Integration settings are reset. @@ -1381,21 +1242,19 @@ Disable the Redmine integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/redmine ``` -### Get Redmine integration settings +### Get Redmine settings -Get Redmine integration settings for a project. +Get the Redmine integration settings for a project. ```plaintext GET /projects/:id/integrations/redmine ``` -## Slack notifications +## GitLab for Slack app -Receive event notifications in Slack +### Set up the GitLab for Slack app -### Create/Edit Slack integration - -Set Slack integration for a project. +Set up the GitLab for Slack app for a project. ```plaintext PUT /projects/:id/integrations/slack @@ -1405,50 +1264,50 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `webhook` | string | true | `https://hooks.slack.com/services/...` | -| `username` | string | false | username | -| `channel` | string | false | Default channel to use if others are not configured | -| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines | -| `notify_only_default_branch` | boolean | false | DEPRECATED: This parameter has been replaced with `branches_to_be_notified` | -| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is "default" | -| `alert_channel` | string | false | The name of the channel to receive alert events notifications | -| `alert_events` | boolean | false | Enable notifications for alert events | -| `commit_events` | boolean | false | Enable notifications for commit events | -| `confidential_issue_channel` | string | false | The name of the channel to receive confidential issues events notifications | -| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events | -| `confidential_note_channel` | string | false | The name of the channel to receive confidential note events notifications | -| `confidential_note_events` | boolean | false | Enable notifications for confidential note events | -| `deployment_channel` | string | false | The name of the channel to receive deployment events notifications | -| `deployment_events` | boolean | false | Enable notifications for deployment events | -| `incident_channel` | string | false | The name of the channel to receive incidents events notifications | -| `incidents_events` | boolean | false | Enable notifications for incident events | -| `issue_channel` | string | false | The name of the channel to receive issues events notifications | -| `issues_events` | boolean | false | Enable notifications for issue events | -| `job_events` | boolean | false | Enable notifications for job events | -| `merge_request_channel` | string | false | The name of the channel to receive merge request events notifications | -| `merge_requests_events` | boolean | false | Enable notifications for merge request events | -| `note_channel` | string | false | The name of the channel to receive note events notifications | -| `note_events` | boolean | false | Enable notifications for note events | -| `pipeline_channel` | string | false | The name of the channel to receive pipeline events notifications | -| `pipeline_events` | boolean | false | Enable notifications for pipeline events | -| `push_channel` | string | false | The name of the channel to receive push events notifications | -| `push_events` | boolean | false | Enable notifications for push events | -| `tag_push_channel` | string | false | The name of the channel to receive tag push events notifications | -| `tag_push_events` | boolean | false | Enable notifications for tag push events | -| `wiki_page_channel` | string | false | The name of the channel to receive wiki page events notifications | -| `wiki_page_events` | boolean | false | Enable notifications for wiki page events | - -### Disable Slack integration - -Disable the Slack integration for a project. Integration settings are reset. +| `webhook` | string | true | `https://hooks.slack.com/services/...`. | +| `username` | string | false | username. | +| `channel` | string | false | Default channel to use if others are not configured. | +| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines. | +| `notify_only_default_branch` | boolean | false | DEPRECATED: This parameter has been replaced with `branches_to_be_notified`. | +| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. | +| `alert_channel` | string | false | The name of the channel to receive alert events notifications. | +| `alert_events` | boolean | false | Enable notifications for alert events. | +| `commit_events` | boolean | false | Enable notifications for commit events. | +| `confidential_issue_channel` | string | false | The name of the channel to receive confidential issues events notifications. | +| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events. | +| `confidential_note_channel` | string | false | The name of the channel to receive confidential note events notifications. | +| `confidential_note_events` | boolean | false | Enable notifications for confidential note events. | +| `deployment_channel` | string | false | The name of the channel to receive deployment events notifications. | +| `deployment_events` | boolean | false | Enable notifications for deployment events. | +| `incident_channel` | string | false | The name of the channel to receive incidents events notifications. | +| `incidents_events` | boolean | false | Enable notifications for incident events. | +| `issue_channel` | string | false | The name of the channel to receive issues events notifications. | +| `issues_events` | boolean | false | Enable notifications for issue events. | +| `job_events` | boolean | false | Enable notifications for job events. | +| `merge_request_channel` | string | false | The name of the channel to receive merge request events notifications. | +| `merge_requests_events` | boolean | false | Enable notifications for merge request events. | +| `note_channel` | string | false | The name of the channel to receive note events notifications. | +| `note_events` | boolean | false | Enable notifications for note events. | +| `pipeline_channel` | string | false | The name of the channel to receive pipeline events notifications. | +| `pipeline_events` | boolean | false | Enable notifications for pipeline events. | +| `push_channel` | string | false | The name of the channel to receive push events notifications. | +| `push_events` | boolean | false | Enable notifications for push events. | +| `tag_push_channel` | string | false | The name of the channel to receive tag push events notifications. | +| `tag_push_events` | boolean | false | Enable notifications for tag push events. | +| `wiki_page_channel` | string | false | The name of the channel to receive wiki page events notifications. | +| `wiki_page_events` | boolean | false | Enable notifications for wiki page events. | + +### Disable the GitLab for Slack app + +Disable the GitLab for Slack app for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/slack ``` -### Get Slack integration settings +### Get the GitLab for Slack app settings -Get Slack integration settings for a project. +Get the GitLab for Slack app settings for a project. ```plaintext GET /projects/:id/integrations/slack @@ -1456,11 +1315,9 @@ GET /projects/:id/integrations/slack ## Microsoft Teams -Group Chat Software - -### Create/Edit Microsoft Teams integration +### Set up Microsoft Teams -Set Microsoft Teams integration for a project. +Set up the Microsoft Teams integration for a project. ```plaintext PUT /projects/:id/integrations/microsoft-teams @@ -1470,21 +1327,21 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `webhook` | string | true | The Microsoft Teams webhook. For example, `https://outlook.office.com/webhook/...` | -| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines | -| `notify_only_default_branch` | boolean | false | DEPRECATED: This parameter has been replaced with `branches_to_be_notified` | -| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is "default" | -| `push_events` | boolean | false | Enable notifications for push events | -| `issues_events` | boolean | false | Enable notifications for issue events | -| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events | -| `merge_requests_events` | boolean | false | Enable notifications for merge request events | -| `tag_push_events` | boolean | false | Enable notifications for tag push events | -| `note_events` | boolean | false | Enable notifications for note events | -| `confidential_note_events` | boolean | false | Enable notifications for confidential note events | -| `pipeline_events` | boolean | false | Enable notifications for pipeline events | -| `wiki_page_events` | boolean | false | Enable notifications for wiki page events | - -### Disable Microsoft Teams integration +| `webhook` | string | true | The Microsoft Teams webhook (for example, `https://outlook.office.com/webhook/...`). | +| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines. | +| `notify_only_default_branch` | boolean | false | DEPRECATED: This parameter has been replaced with `branches_to_be_notified`. | +| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. | +| `push_events` | boolean | false | Enable notifications for push events. | +| `issues_events` | boolean | false | Enable notifications for issue events. | +| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events. | +| `merge_requests_events` | boolean | false | Enable notifications for merge request events. | +| `tag_push_events` | boolean | false | Enable notifications for tag push events. | +| `note_events` | boolean | false | Enable notifications for note events. | +| `confidential_note_events` | boolean | false | Enable notifications for confidential note events. | +| `pipeline_events` | boolean | false | Enable notifications for pipeline events. | +| `wiki_page_events` | boolean | false | Enable notifications for wiki page events. | + +### Disable Microsoft Teams Disable the Microsoft Teams integration for a project. Integration settings are reset. @@ -1492,9 +1349,9 @@ Disable the Microsoft Teams integration for a project. Integration settings are DELETE /projects/:id/integrations/microsoft-teams ``` -### Get Microsoft Teams integration settings +### Get Microsoft Teams settings -Get Microsoft Teams integration settings for a project. +Get the Microsoft Teams integration settings for a project. ```plaintext GET /projects/:id/integrations/microsoft-teams @@ -1502,11 +1359,9 @@ GET /projects/:id/integrations/microsoft-teams ## Mattermost notifications -Receive event notifications in Mattermost +### Set up Mattermost notifications -### Create/Edit Mattermost notifications integration - -Set Mattermost notifications integration for a project. +Set up Mattermost notifications for a project. ```plaintext PUT /projects/:id/integrations/mattermost @@ -1516,56 +1371,54 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `webhook` | string | true | The Mattermost webhook. For example, `http://mattermost_host/hooks/...` | -| `username` | string | false | username | -| `channel` | string | false | Default channel to use if others are not configured | -| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines | -| `notify_only_default_branch` | boolean | false | DEPRECATED: This parameter has been replaced with `branches_to_be_notified` | -| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is "default" | -| `push_events` | boolean | false | Enable notifications for push events | -| `issues_events` | boolean | false | Enable notifications for issue events | -| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events | -| `merge_requests_events` | boolean | false | Enable notifications for merge request events | -| `tag_push_events` | boolean | false | Enable notifications for tag push events | -| `note_events` | boolean | false | Enable notifications for note events | -| `confidential_note_events` | boolean | false | Enable notifications for confidential note events | -| `pipeline_events` | boolean | false | Enable notifications for pipeline events | -| `wiki_page_events` | boolean | false | Enable notifications for wiki page events | -| `push_channel` | string | false | The name of the channel to receive push events notifications | -| `issue_channel` | string | false | The name of the channel to receive issues events notifications | -| `confidential_issue_channel` | string | false | The name of the channel to receive confidential issues events notifications | -| `merge_request_channel` | string | false | The name of the channel to receive merge request events notifications | -| `note_channel` | string | false | The name of the channel to receive note events notifications | -| `confidential_note_channel` | string | false | The name of the channel to receive confidential note events notifications | -| `tag_push_channel` | string | false | The name of the channel to receive tag push events notifications | -| `pipeline_channel` | string | false | The name of the channel to receive pipeline events notifications | -| `wiki_page_channel` | string | false | The name of the channel to receive wiki page events notifications | - -### Disable Mattermost notifications integration - -Disable the Mattermost notifications integration for a project. Integration settings are reset. +| `webhook` | string | true | The Mattermost webhook (for example, `http://mattermost_host/hooks/...`). | +| `username` | string | false | username. | +| `channel` | string | false | Default channel to use if others are not configured. | +| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines. | +| `notify_only_default_branch` | boolean | false | DEPRECATED: This parameter has been replaced with `branches_to_be_notified`. | +| `branches_to_be_notified` | string | false | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. | +| `push_events` | boolean | false | Enable notifications for push events. | +| `issues_events` | boolean | false | Enable notifications for issue events. | +| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events. | +| `merge_requests_events` | boolean | false | Enable notifications for merge request events. | +| `tag_push_events` | boolean | false | Enable notifications for tag push events. | +| `note_events` | boolean | false | Enable notifications for note events. | +| `confidential_note_events` | boolean | false | Enable notifications for confidential note events. | +| `pipeline_events` | boolean | false | Enable notifications for pipeline events. | +| `wiki_page_events` | boolean | false | Enable notifications for wiki page events. | +| `push_channel` | string | false | The name of the channel to receive push events notifications. | +| `issue_channel` | string | false | The name of the channel to receive issues events notifications. | +| `confidential_issue_channel` | string | false | The name of the channel to receive confidential issues events notifications. | +| `merge_request_channel` | string | false | The name of the channel to receive merge request events notifications. | +| `note_channel` | string | false | The name of the channel to receive note events notifications. | +| `confidential_note_channel` | string | false | The name of the channel to receive confidential note events notifications. | +| `tag_push_channel` | string | false | The name of the channel to receive tag push events notifications. | +| `pipeline_channel` | string | false | The name of the channel to receive pipeline events notifications. | +| `wiki_page_channel` | string | false | The name of the channel to receive wiki page events notifications. | + +### Disable Mattermost notifications + +Disable Mattermost notifications for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/mattermost ``` -### Get Mattermost notifications integration settings +### Get Mattermost notifications settings -Get Mattermost notifications integration settings for a project. +Get the Mattermost notifications settings for a project. ```plaintext GET /projects/:id/integrations/mattermost ``` -## JetBrains TeamCity CI - -A continuous integration and build server +## JetBrains TeamCity -### Create/Edit JetBrains TeamCity CI integration +### Set up JetBrains TeamCity -Set JetBrains TeamCity CI integration for a project. +Set up the JetBrains TeamCity integration for a project. -> The build configuration in TeamCity must use the build format number `%build.vcs.number%`. Configure monitoring of all branches so merge requests build. That setting is in the VSC root advanced settings. +The build configuration in TeamCity must use the build number format `%build.vcs.number%`. Configure monitoring of all branches so merge requests build. This setting is in the VCS root advanced settings. ```plaintext PUT /projects/:id/integrations/teamcity @@ -1575,37 +1428,35 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `teamcity_url` | string | true | TeamCity root URL. For example, `https://teamcity.example.com` | -| `enable_ssl_verification` | boolean | false | Enable SSL verification. Defaults to true (enabled). | -| `build_type` | string | true | Build configuration ID | -| `username` | string | true | A user with permissions to trigger a manual build | -| `password` | string | true | The password of the user | -| `push_events` | boolean | false | Enable notifications for push events | -| `merge_requests_events` | boolean | false | Enable notifications for merge request events | +| `teamcity_url` | string | true | TeamCity root URL (for example, `https://teamcity.example.com`). | +| `enable_ssl_verification` | boolean | false | Enable SSL verification. Defaults to `true` (enabled). | +| `build_type` | string | true | Build configuration ID. | +| `username` | string | true | A user with permissions to trigger a manual build. | +| `password` | string | true | The password of the user. | +| `push_events` | boolean | false | Enable notifications for push events. | +| `merge_requests_events` | boolean | false | Enable notifications for merge request events. | -### Disable JetBrains TeamCity CI integration +### Disable JetBrains TeamCity -Disable the JetBrains TeamCity CI integration for a project. Integration settings are reset. +Disable the JetBrains TeamCity integration for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/teamcity ``` -### Get JetBrains TeamCity CI integration settings +### Get JetBrains TeamCity settings -Get JetBrains TeamCity CI integration settings for a project. +Get the JetBrains TeamCity integration settings for a project. ```plaintext GET /projects/:id/integrations/teamcity ``` -## Jenkins CI +## Jenkins -A continuous integration and build server +### Set up Jenkins -### Create/Edit Jenkins CI integration - -Set Jenkins CI integration for a project. +Set up the Jenkins integration for a project. ```plaintext PUT /projects/:id/integrations/jenkins @@ -1616,7 +1467,7 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `jenkins_url` | string | true | Jenkins URL like `http://jenkins.example.com`. | -| `enable_ssl_verification` | boolean | false | Enable SSL verification. Defaults to true (enabled). | +| `enable_ssl_verification` | boolean | false | Enable SSL verification. Defaults to `true` (enabled). | | `project_name` | string | true | The URL-friendly project name. Example: `my_project_name`. | | `username` | string | false | Username for authentication with the Jenkins server, if authentication is required by the server. | | `password` | string | false | Password for authentication with the Jenkins server, if authentication is required by the server. | @@ -1624,68 +1475,30 @@ Parameters: | `merge_requests_events` | boolean | false | Enable notifications for merge request events. | | `tag_push_events` | boolean | false | Enable notifications for tag push events. | -### Disable Jenkins CI integration +### Disable Jenkins -Disable the Jenkins CI integration for a project. Integration settings are reset. +Disable the Jenkins integration for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/jenkins ``` -### Get Jenkins CI integration settings +### Get Jenkins settings -Get Jenkins CI integration settings for a project. +Get the Jenkins integration settings for a project. ```plaintext GET /projects/:id/integrations/jenkins ``` -## Jenkins CI (Deprecated) integration - -A continuous integration and build server - -NOTE: -This integration was [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/1600) in GitLab 13.0. - -### Create/Edit Jenkins CI (Deprecated) integration - -Set Jenkins CI (Deprecated) integration for a project. - -```plaintext -PUT /projects/:id/integrations/jenkins-deprecated -``` - -Parameters: - -- `project_url` (**required**) - Jenkins project URL like `http://jenkins.example.com/job/my-project/` -- `multiproject_enabled` (optional) - Multi-project mode is configured in Jenkins GitLab Hook plugin -- `pass_unstable` (optional) - Unstable builds are treated as passing - -### Disable Jenkins CI (Deprecated) integration - -Disable the Jenkins CI (Deprecated) integration for a project. Integration settings are reset. - -```plaintext -DELETE /projects/:id/integrations/jenkins-deprecated -``` - -### Get Jenkins CI (Deprecated) integration settings - -Get Jenkins CI (Deprecated) integration settings for a project. - -```plaintext -GET /projects/:id/integrations/jenkins-deprecated -``` - -## MockCI - -Mock an external CI. See [`gitlab-org/gitlab-mock-ci-service`](https://gitlab.com/gitlab-org/gitlab-mock-ci-service) for an example of a companion mock integration. +## Mock CI This integration is only available when your environment is set to development. +See [`gitlab-org/gitlab-mock-ci-service`](https://gitlab.com/gitlab-org/gitlab-mock-ci-service) for an example of a companion mock integration. -### Create/Edit MockCI integration +### Set up Mock CI -Set MockCI integration for a project. +Set up the Mock CI integration for a project. ```plaintext PUT /projects/:id/integrations/mock-ci @@ -1695,20 +1508,20 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `mock_service_url` | string | true | `http://localhost:4004` | -| `enable_ssl_verification` | boolean | false | Enable SSL verification. Defaults to true (enabled). | +| `mock_service_url` | string | true | `http://localhost:4004`. | +| `enable_ssl_verification` | boolean | false | Enable SSL verification. Defaults to `true` (enabled). | -### Disable MockCI integration +### Disable Mock CI -Disable the MockCI integration for a project. Integration settings are reset. +Disable the Mock CI integration for a project. Integration settings are reset. ```plaintext DELETE /projects/:id/integrations/mock-ci ``` -### Get MockCI integration settings +### Get Mock CI settings -Get MockCI integration settings for a project. +Get the Mock CI integration settings for a project. ```plaintext GET /projects/:id/integrations/mock-ci @@ -1718,11 +1531,9 @@ GET /projects/:id/integrations/mock-ci > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/337855) in GitLab 15.10. -Update [Squash TM](https://www.squashtest.com/product-squash-tm?lang=en) requirements when GitLab issues are modified. +### Set up Squash TM -### Create/Edit Squash TM integration - -Set Squash TM integration settings for a project. +Set up the Squash TM integration settings for a project. ```plaintext PUT /projects/:id/integrations/squash-tm @@ -1735,7 +1546,7 @@ Parameters: | `url` | string | yes | URL of the Squash TM webhook. | | `token` | string | no | Optional token | -### Disable Squash TM integration +### Disable Squash TM Disable the Squash TM integration for a project. Integration settings are preserved. @@ -1743,9 +1554,9 @@ Disable the Squash TM integration for a project. Integration settings are preser DELETE /projects/:id/integrations/squash-tm ``` -### Get Squash TM integration settings +### Get Squash TM settings -Get Squash TM integration settings for a project. +Get the Squash TM integration settings for a project. ```plaintext GET /projects/:id/integrations/squash-tm @@ -1753,11 +1564,9 @@ GET /projects/:id/integrations/squash-tm ## YouTrack -YouTrack issue tracker - -### Create/Edit YouTrack integration +### Set up YouTrack -Set YouTrack integration for a project. +Set up the YouTrack integration for a project. ```plaintext PUT /projects/:id/integrations/youtrack @@ -1767,10 +1576,10 @@ Parameters: | Parameter | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `issues_url` | string | true | Issue URL | -| `project_url` | string | true | Project URL | +| `issues_url` | string | true | Issue URL. | +| `project_url` | string | true | Project URL. | -### Disable YouTrack integration +### Disable YouTrack Disable the YouTrack integration for a project. Integration settings are reset. @@ -1778,9 +1587,9 @@ Disable the YouTrack integration for a project. Integration settings are reset. DELETE /projects/:id/integrations/youtrack ``` -### Get YouTrack integration settings +### Get YouTrack settings -Get YouTrack integration settings for a project. +Get the YouTrack integration settings for a project. ```plaintext GET /projects/:id/integrations/youtrack diff --git a/doc/api/projects.md b/doc/api/projects.md index 232ef56a20a..55c8a4a721f 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -1330,7 +1330,8 @@ target the upstream project by default. "kind": "group", "full_path": "gitlab-org", "parent_id": null - } + }, + "repository_storage": "default" } ... diff --git a/doc/architecture/blueprints/ai_gateway/img/architecture.png b/doc/architecture/blueprints/ai_gateway/img/architecture.png Binary files differindex e63b4ba45d1..89e7263c30d 100644 --- a/doc/architecture/blueprints/ai_gateway/img/architecture.png +++ b/doc/architecture/blueprints/ai_gateway/img/architecture.png diff --git a/doc/architecture/blueprints/ai_gateway/index.md b/doc/architecture/blueprints/ai_gateway/index.md index 08cd8b691d4..8c5a13d2e76 100644 --- a/doc/architecture/blueprints/ai_gateway/index.md +++ b/doc/architecture/blueprints/ai_gateway/index.md @@ -32,7 +32,7 @@ translate the content of the redirected request where needed. ![architecture diagram](img/architecture.png) -[src of the architecture diagram](https://docs.google.com/drawings/d/1PYl5Q5oWHnQAuxM-Jcw0C3eYoGw8a9w8atFpoLhhEas/edit) +[Diagram source](https://docs.google.com/drawings/d/1PYl5Q5oWHnQAuxM-Jcw0C3eYoGw8a9w8atFpoLhhEas/edit) By using a hosted service under the control of GitLab we can ensure that we provide all GitLab instances with AI features in a scalable @@ -385,15 +385,19 @@ different. ## Authentication & Authorization -GitLab will provide the first layer of authorization: It authenticate -the user and check if the license allows using the feature the user is -trying to use. This can be done using the authentication and license +GitLab provides the first layer of authorization: It authenticates +the user and checks if the license allows using the feature the user is +trying to use. This can be done using the authentication, policy and license checks that are already built into GitLab. -Authenticating the GitLab-instance on the AI-gateway will be discussed -in[#177](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/issues/177). -Because the AI-gateway exposes proxied endpoints to AI providers, it -is important that the authentication tokens have limited validity. +Authenticating the GitLab-instance on the AI-gateway was discussed +in: + +- [Issue 177](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/issues/177) +- [Epic 10808](https://gitlab.com/groups/gitlab-org/-/epics/10808) + +The specific mechanism by which trust is delegated between end-users, GitLab instances, +and the AI-gateway is covered in the [AI gateway access token validation documentation](../../../development/cloud_connector/code_suggestions_for_sm.md#ai-gateway-access-token-validation). ## Embeddings diff --git a/doc/ci/pipelines/cicd_minutes.md b/doc/ci/pipelines/cicd_minutes.md index fa4a5e691a7..54d18b2d255 100644 --- a/doc/ci/pipelines/cicd_minutes.md +++ b/doc/ci/pipelines/cicd_minutes.md @@ -264,16 +264,16 @@ GitLab administrators can add a namespace to the reduced cost factor GitLab SaaS runners have different cost factors, depending on the runner type (Linux, Windows, macOS) and the virtual machine configuration. -| GitLab SaaS runner type | Machine Size | Cost factor | -|:-----------------------------|:---------------------|:------------| -| Linux OS amd64 | small | 1 | -| Linux OS amd64 | medium | 2 | -| Linux OS amd64 | large | 3 | -| Linux OS amd64 | xlarge | 6 | -| Linux OS amd64 | 2xlarge | 12 | -| Linux OS amd64 + GPU-enabled | medium, GPU standard | 7 | -| macOS M1 | medium | 6 (Beta) | -| Windows Server | - | 1 (Beta) | +| GitLab SaaS runner type | Machine Size | Cost factor | +|:-----------------------------|:-----------------------|:------------| +| Linux OS amd64 | `small` | 1 | +| Linux OS amd64 | `medium` | 2 | +| Linux OS amd64 | `large` | 3 | +| Linux OS amd64 | `xlarge` | 6 | +| Linux OS amd64 | `2xlarge` | 12 | +| Linux OS amd64 + GPU-enabled | `medium`, GPU standard | 7 | +| macOS M1 | `medium` | 6 (Beta) | +| Windows Server | - | 1 (Beta) | ### Monthly reset of compute usage diff --git a/doc/ci/runners/new_creation_workflow.md b/doc/ci/runners/new_creation_workflow.md index df2ef2ab3a8..400e0ec9ee3 100644 --- a/doc/ci/runners/new_creation_workflow.md +++ b/doc/ci/runners/new_creation_workflow.md @@ -72,9 +72,10 @@ To continue using registration tokens after GitLab 17.0: Plans to implement a UI setting to re-enable registration tokens are proposed in [issue 411923](https://gitlab.com/gitlab-org/gitlab/-/issues/411923) -## Runners registered with a registration token will continue to work after 18.0 +## Using runners registered with a runner registration token -Existing runners will not be affected by these changes, they will still work even after the legacy registration method is removed. +Existing runners will not be affected by these changes and will continue to +work after the legacy registration method is removed in GitLab 18.0. ## Changes to the `gitlab-runner register` command syntax diff --git a/doc/ci/runners/runners_scope.md b/doc/ci/runners/runners_scope.md index c6387a60495..6a845820580 100644 --- a/doc/ci/runners/runners_scope.md +++ b/doc/ci/runners/runners_scope.md @@ -75,7 +75,7 @@ the authentication token is stored in the `config.toml`. WARNING: The ability to pass a runner registration token, and support for certain configuration arguments was -[deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/380872) in GitLab 15.6 and will be removed in GitLab 17.0. Authentication tokens +[deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/380872) in GitLab 15.6 and will be removed in GitLab 18.0. Runner authentication tokens should be used instead. For more information, see [Migrating to the new runner registration workflow](new_creation_workflow.md). Prerequisite: @@ -466,7 +466,7 @@ The runner authentication token displays in the UI for only a short period of ti WARNING: The ability to pass a runner registration token, and support for certain configuration arguments was -[deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/380872) in GitLab 15.6 and will be removed in GitLab 17.0. Authentication tokens +[deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/380872) in GitLab 15.6 and will be removed in GitLab 18.0. Runner authentication tokens should be used instead. For more information, see [Migrating to the new runner registration workflow](new_creation_workflow.md). Prerequisite: diff --git a/doc/ci/secrets/convert-to-id-tokens.md b/doc/ci/secrets/convert-to-id-tokens.md index 18803d4de72..d2c9a55da1f 100644 --- a/doc/ci/secrets/convert-to-id-tokens.md +++ b/doc/ci/secrets/convert-to-id-tokens.md @@ -18,7 +18,7 @@ In GitLab 16.0 and later you can use ID tokens without any settings changes. Jobs that use `secrets:vault` automatically do not have `CI_JOB_JWT` tokens available, Jobs that don't use `secrets:vault` can still use `CI_JOB_JWT` tokens. -This tutorial will focus on v16 onwards, if you are running a slightly older version you will need to toggle the `Limit JSON Web Token (JWT) access` setting as appropriate. +This tutorial will focus on v16 onward, if you are running a slightly older version you will need to toggle the `Limit JSON Web Token (JWT) access` setting as appropriate. There isn't one standard method to migrate to [ID tokens](../secrets/id_token_authentication.md), so this tutorial includes two variations for how to convert your existing CI/CD secrets. Choose the method that is most appropriate for your use case: diff --git a/doc/ci/yaml/index.md b/doc/ci/yaml/index.md index 403152b32a9..86fdf5ea112 100644 --- a/doc/ci/yaml/index.md +++ b/doc/ci/yaml/index.md @@ -121,7 +121,7 @@ In this example: - `image: ruby:3.0` and `retry: 2` are the default keywords for all jobs in the pipeline. - The `rspec` job does not have `image` or `retry` defined, so it uses the defaults of `image: ruby:3.0` and `retry: 2`. -- The `rspec 2.7` job does not have `retry` defined, but it does have `image` explictly defined. +- The `rspec 2.7` job does not have `retry` defined, but it does have `image` explicitly defined. It uses the default `retry: 2`, but ignores the default `image` and uses the `image: ruby:2.7` defined in the job. diff --git a/doc/development/ai_architecture.md b/doc/development/ai_architecture.md index 28483b943d1..935cf89305c 100644 --- a/doc/development/ai_architecture.md +++ b/doc/development/ai_architecture.md @@ -13,9 +13,9 @@ GitLab has created a common set of tools to support our product groups and their AI is moving very quickly, and we need to be able to keep pace with changes in the area. We have built an [abstraction layer](../../ee/development/ai_features/index.md) to do this, allowing us to take a more "pluggable" approach to the underlying models, data stores, and other technologies. -The following diagram from the [architecture blueprint](../architecture/blueprints/ai_gateway/index.md) shows a simplified view of how the different components in GitLab interact. The abstraction layer helps avoid code duplication within the REST APIs within the `AI API` block. +The following diagram from the [architecture blueprint](../architecture/blueprints/ai_gateway/index.md) shows a simplified view of how the different components in GitLab interact. The abstraction layer helps avoid code duplication within the REST APIs. -![architecture diagram](img/architecture.png) +![architecture diagram](../architecture/blueprints/ai_gateway/img/architecture.png) ## SaaS-based AI abstraction layer @@ -33,8 +33,7 @@ By default, these actions are performed asynchronously via a Sidekiq job to prevent long-running requests in Puma. It should be used for non-latency sensitive actions due to the added latency by Sidekiq. -At the time of writing, the Abstraction Layer still directly calls the AI providers. This will be -changed [in the future](https://gitlab.com/gitlab-org/gitlab/-/issues/424614). +At the time of writing, the Abstraction Layer still directly calls the AI providers. [Epic 11484](https://gitlab.com/groups/gitlab-org/-/epics/11484) proposes to change this. When a certain action is latency sensitive, we can decide to call the AI-gateway directly. This avoids the latency added by Sidekiq. @@ -88,24 +87,24 @@ For optimal `probes` and `lists` values: - Use `lists` equal to `rows / 1000` for tables with up to 1 million rows and `sqrt(rows)` for larger datasets. - For `probes` start with `lists / 10` for tables up to 1 million rows and `sqrt(lists)` for larger datasets. -### Code Suggestions +## Code Suggestions -Code Suggestions is being integrated as part of the GitLab-Rails repository which will unify the architectures between Code Suggestions and AI features that use the abstraction layer, along with offering self-managed support for the other AI features. +Code Suggestions is being integrated as part of the GitLab-Rails repository which will unify the architectures between Code Suggestions and AI features that use the abstraction layer, along with offering [self-managed support](#self-managed-support) for the other AI features. The following table documents functionality that Code Suggestions offers today, and what those changes will look like as part of the unification: | Topic | Details | Where this happens today | Where this will happen going forward | | ----- | ------ | -------------- | ------------------ | | Request processing | | | | -| | Receives requests from IDEs (VSCode, GitLab WebIDE, MS Visual Studio, IntelliJ, JetBrains, VIM, Emacs, Sublime), including code before and after the cursor | AI Gateway | Abstraction Layer | -| | Authentication the current user, verifies they are authorized to use Code Suggestions for this project | AI Gateway | Abstraction layer | +| | Receives requests from IDEs (VSCode, GitLab WebIDE, MS Visual Studio, IntelliJ, JetBrains, VIM, Emacs, Sublime), including code before and after the cursor | GitLab Rails | GitLab Rails | +| | Authenticates the current user, verifies they are authorized to use Code Suggestions for this project | GitLab Rails + AI Gateway | GitLab Rails + AI Gateway | | | Preprocesses the request to add context, such as including imports via TreeSitter | AI Gateway | Undecided | | | Routes the request to the AI Provider | AI Gateway | AI Gateway | -| | Returns the response to the IDE | AI Gateway | Abstraction Layer | -| | Logs the request, including timestamp, response time, model, etc | AI Gateway | Both | +| | Returns the response to the IDE | GitLab Rails | GitLab Rails | +| | Logs the request, including timestamp, response time, model, etc | Both | Both | | Telemetry | | | | | | User acceptance or rejection in the IDE | AI Gateway | [Both](https://gitlab.com/gitlab-org/gitlab/-/issues/418282) | -| | Number of unique users per day | [Abstraction Layer](https://app.periscopedata.com/app/gitlab/1143612/Code-Suggestions-Usage) | Undecided | +| | Number of unique users per day | [GitLab Rails](https://app.periscopedata.com/app/gitlab/1143612/Code-Suggestions-Usage), AI gateway | Undecided | | | Error rate, model usage, response time, IDE usage | [AI Gateway](https://log.gprd.gitlab.net/app/dashboards#/view/6c947f80-7c07-11ed-9f43-e3784d7fe3ca?_g=(refreshInterval:(pause:!t,value:0),time:(from:now-6h,to:now))) | Both | | | Suggestions per language | AI Gateway |[Both](https://gitlab.com/groups/gitlab-org/-/epics/11017) | | Monitoring | | Both | Both | @@ -115,7 +114,15 @@ The following table documents functionality that Code Suggestions offers today, | Internal Models | | | | | | Currently unmaintained, the ability to run models in our own instance, running them inside Triton, and routing requests to our own models | AI Gateway | AI Gateway | -#### Code Suggestions Latency +### Self-managed support + +Code Suggestions for self-managed users was introduced as part of the [Cloud Connector MVC](https://gitlab.com/groups/gitlab-org/-/epics/10516). + +For more information on the technical solution for this project see the [Cloud Connector MVC documentation](cloud_connector/code_suggestions_for_sm.md). + +The intention is to evolve this solution to service other AI features under the Cloud Connector product umbrella. + +### Code Suggestions Latency Code Suggestions acceptance rates are _highly_ sensitive to latency. While writing code with an AI assistant, a user will pause only for a short duration before continuing on with manually typing out a block of code. As soon as the user has pressed a subsequent keypress, the existing suggestion will be invalidated and a new request will need to be issued to the Code Suggestions endpoint. In turn, this request will also be highly sensitive to latency. diff --git a/doc/development/ai_features/index.md b/doc/development/ai_features/index.md index e1d3ae36570..fc6ce1afbfc 100644 --- a/doc/development/ai_features/index.md +++ b/doc/development/ai_features/index.md @@ -134,17 +134,26 @@ Gitlab::CurrentSettings.update(openai_api_key: "<open-ai-key>") Gitlab::CurrentSettings.update!(anthropic_api_key: <insert API key>) ``` -#### Populating embeddings and using embeddings fixture +### Populating embeddings and using embeddings fixture + +Currently we have embeddings generate both with OpenAI and VertexAI. Bellow sections explain how to populate +embeddings in the DB or extract embeddings to be used in specs. + +FLAG: +We are moving towards having VertexAI embeddings only, so eventually the OpenAI embeddings support will be drop +as well as the section bellow will be removed. + +#### OpenAI embeddings To seed your development database with the embeddings for GitLab Documentation, -you may use the pre-generated embeddings and a Rake test. +you may use the pre-generated embeddings and a Rake task. ```shell RAILS_ENV=development bundle exec rake gitlab:llm:embeddings:seed_pre_generated ``` The DBCleaner gem we use clear the database tables before each test runs. -Instead of fully populating the table `tanuki_bot_mvc` where we store embeddings for the documentations, +Instead of fully populating the table `tanuki_bot_mvc` where we store OpenAI embeddings for the documentations, we can add a few selected embeddings to the table from a pre-generated fixture. For instance, to test that the question "How can I reset my password" is correctly @@ -157,6 +166,31 @@ You can add or remove the questions needed to be tested in the Rake task and run RAILS_ENV=development bundle exec rake gitlab:llm:embeddings:extract_embeddings ``` +#### VertexAI embeddings + +To seed your development database with the embeddings for GitLab Documentation, +you may use the pre-generated embeddings and a Rake task. + +```shell +RAILS_ENV=development bundle exec rake gitlab:llm:embeddings:vertex:seed +``` + +The DBCleaner gem we use clear the database tables before each test runs. +Instead of fully populating the table `vertex_gitlab_docs` where we store VertexAI embeddings for the documentations, +we can add a few selected embeddings to the table from a pre-generated fixture. + +For instance, to test that the question "How can I reset my password" is correctly +retrieving the relevant embeddings and answered, we can extract the top N closet embeddings +to the question into a fixture and only restore a small number of embeddings quickly. +To faciliate an extraction process, a Rake task been written. +You can add or remove the questions needed to be tested in the Rake task and run the task to generate a new fixture. + +```shell +RAILS_ENV=development bundle exec rake gitlab:llm:embeddings:vertex:extract_embeddings +``` + +#### Using embeddings in specs + In the specs where you need to use the embeddings, use the RSpec config hook `:ai_embedding_fixtures` on a context. diff --git a/doc/development/fe_guide/graphql.md b/doc/development/fe_guide/graphql.md index 62183c7b349..2b3a5ea8bfd 100644 --- a/doc/development/fe_guide/graphql.md +++ b/doc/development/fe_guide/graphql.md @@ -1423,7 +1423,7 @@ wrapper = mount(SomeComponent, { #### Testing subscriptions -When testing subscriptions, be aware that default behavior for subscription in `vue-apollo@4` is to re-subscribe and immediatelly issue new request on error (unless value of `skip` restricts us from doing that) +When testing subscriptions, be aware that default behavior for subscription in `vue-apollo@4` is to re-subscribe and immediately issue new request on error (unless value of `skip` restricts us from doing that) ```javascript import waitForPromises from 'helpers/wait_for_promises'; diff --git a/doc/development/img/architecture.png b/doc/development/img/architecture.png Binary files differdeleted file mode 100644 index e63b4ba45d1..00000000000 --- a/doc/development/img/architecture.png +++ /dev/null diff --git a/doc/integration/mattermost/index.md b/doc/integration/mattermost/index.md index 389568ccf6d..cf7178c7540 100644 --- a/doc/integration/mattermost/index.md +++ b/doc/integration/mattermost/index.md @@ -139,7 +139,7 @@ Save the changes and then run `sudo gitlab-ctl reconfigure`. If there are no err ## Specify numeric user and group identifiers -The Linux pacakage creates a user and group `mattermost`. You can specify the +The Linux package creates a user and group `mattermost`. You can specify the numeric identifiers for these users in `/etc/gitlab/gitlab.rb` as follows: ```ruby diff --git a/doc/user/application_security/dependency_scanning/index.md b/doc/user/application_security/dependency_scanning/index.md index 532d9506270..55a29d5e671 100644 --- a/doc/user/application_security/dependency_scanning/index.md +++ b/doc/user/application_security/dependency_scanning/index.md @@ -1353,7 +1353,7 @@ The `go.sum` file contains an entry of every module that was considered while ge Multiple versions of a module are included in the `go.sum` file, but the [MVS](https://go.dev/ref/mod#minimal-version-selection) algorithm used by `go build` only selects one. As a result, when dependency scanning uses `go.sum`, it might report false positives. -To prevent false positives, gemnasium only uses `go.sum` if it is unable to generate the build list for the Go project. If `go.sum` is selected, a warning occurs: +To prevent false positives, Gemnasium only uses `go.sum` if it is unable to generate the build list for the Go project. If `go.sum` is selected, a warning occurs: ```shell [WARN] [Gemnasium] [2022-09-14T20:59:38Z] ▶ Selecting "go.sum" parser for "/test-projects/gitlab-shell/go.sum". False positives may occur. See https://gitlab.com/gitlab-org/gitlab/-/issues/321081. diff --git a/doc/user/application_security/policies/index.md b/doc/user/application_security/policies/index.md index e3bea7bd6ca..a86d9b63c63 100644 --- a/doc/user/application_security/policies/index.md +++ b/doc/user/application_security/policies/index.md @@ -143,14 +143,14 @@ The workaround is to amend your group or instance push rules to allow branches f - Confirm that scanners are properly configured and producing results for the latest branch. Security Policies are designed to require approval when there are no results (no security report), as this ensures that no vulnerabilities are introduced. We cannot know if there are any vulnerabilities unless the scans enforced by the policy complete successfully and are evaluated. - For scan result policies, we require artifacts for each scanner defined in the policy for both the source and target branch. To ensure scan result policies capture the necessary results, confirm your scan execution is properly implemented and enforced. If using scan execution policies, enforcing on `all branches` often address this need. -- When running scan execution policies based on a SAST action, ensure target repositories contain proper code files. SAST runs different analyzers [based on the types of files in the repo](../sast/index.md#supported-languages-and-frameworks), and if no supported files are found it will not run any jobs. See the [SAST CI template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/SAST.gitlab-ci.yml) for more details. +- When running scan execution policies based on a SAST action, ensure target repositories contain proper code files. SAST runs different analyzers [based on the types of files in the repository](../sast/index.md#supported-languages-and-frameworks), and if no supported files are found it will not run any jobs. See the [SAST CI template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/SAST.gitlab-ci.yml) for more details. - Check for any branch configuration conflicts. If your policy is configured to enforce rules on `main` but some projects within the scope are using `master` as their default branch, the policy is not applied for the latter. You can define policies to enforce rules generically on `default` branches regardless of the name used in the project or on `all protected branches` to address this issue. - Scan result policies created at the group or sub-group level can take some time to apply to all the merge requests in the group. - Scheduled scan execution policies run with a minimum 15 minute cadence. Learn more [about the schedule rule type](../policies/scan-execution-policies.md#schedule-rule-type). - When scheduling pipelines, keep in mind that CRON scheduling is based on UTC on GitLab SaaS and is based on your server time for self managed instances. When testing new policies, it may appear pipelines are not running properly when in fact they are scheduled in your server's timezone. - When enforcing scan execution policies, security policies use a bot in the target project that will trigger scheduled pipelines to ensure enforcement. When the bot is missing, it will be automatically created, and the following scheduled scan will use it. - You should not link a security policy project to a development project and to the group or sub-group the development project belongs to at the same time. Linking this way will result in approval rules from the Scan Result Policy not being applied to merge requests in the development project. -- When creating a Scan Result Policy, neither the array `severity_levels` nor the array `vulnerability_states` in the [scan_finding rule](../policies/scan-result-policies.md#scan_finding-rule-type) can be left empty; for a working rule, at least one entry must exist. +- When creating a Scan Result Policy, neither the array `severity_levels` nor the array `vulnerability_states` in the [`scan_finding` rule](../policies/scan-result-policies.md#scan_finding-rule-type) can be left empty; for a working rule, at least one entry must exist. - When configuring pipeline and scan result policies, it's important to remember that security scans performed in manual jobs aren't verified to determine whether MR approval is required. When you run a manual job with security scans, it won't ensure approval even if vulnerabilities are introduced. If you are still experiencing issues, you can [view recent reported bugs](https://gitlab.com/gitlab-org/gitlab/-/issues/?sort=popularity&state=opened&label_name%5B%5D=group%3A%3Asecurity%20policies&label_name%5B%5D=type%3A%3Abug&first_page_size=20) and raise new unreported issues. diff --git a/doc/user/application_security/policies/scan-result-policies.md b/doc/user/application_security/policies/scan-result-policies.md index a42b3f02c26..6f7cf9cac82 100644 --- a/doc/user/application_security/policies/scan-result-policies.md +++ b/doc/user/application_security/policies/scan-result-policies.md @@ -39,7 +39,7 @@ A project can have multiple pipeline types configured. A single commit can initi pipelines, each of which may contain a security scan. - In GitLab 16.3 and later, the results of all completed pipelines for the latest commit in -the MR's source and target branch are evaluated and used to enforce the scan result policy. +the merge request's source and target branch are evaluated and used to enforce the scan result policy. Parent-child pipelines and on-demand DAST pipelines are not considered. - In GitLab 16.2 and earlier, only the results of the latest completed pipeline were evaluated when enforcing scan result policies. diff --git a/doc/user/group/troubleshooting.md b/doc/user/group/troubleshooting.md index 6de90053c21..08343f604f1 100644 --- a/doc/user/group/troubleshooting.md +++ b/doc/user/group/troubleshooting.md @@ -99,4 +99,4 @@ This error typically occurs when the user you're trying to remove is part of an - Remove the invited group membership from your project or group members page. - Recommended. Remove the user directly from the invited group, if you have access to the group. -The feature request to **Update billable_members endpoint to include invited group** is currently being worked on. For more information, see [issue 386583](https://gitlab.com/gitlab-org/gitlab/-/issues/386583) +The feature request to **Update `billable_members` endpoint to include invited group** is currently being worked on. For more information, see [issue 386583](https://gitlab.com/gitlab-org/gitlab/-/issues/386583) diff --git a/doc/user/profile/preferences.md b/doc/user/profile/preferences.md index f057e62694b..85cb03e2d3d 100644 --- a/doc/user/profile/preferences.md +++ b/doc/user/profile/preferences.md @@ -49,7 +49,7 @@ To view the updated syntax highlighting theme, refresh your project's page. To customize the syntax highlighting theme, you can also [use the Application settings API](../../api/settings.md#list-of-settings-that-can-be-accessed-via-api-calls). Use `default_syntax_highlighting_theme` to change the syntax highlighting colors on a more granular level. If these steps do not work, your programming language might not be supported by the syntax highlighters. -For more information, view [Rouge Ruby Library](https://github.com/rouge-ruby/rouge) for guidance on code files and Snippets. View [Moncaco Editor](https://microsoft.github.io/monaco-editor/) and [Monarch](https://microsoft.github.io/monaco-editor/monarch.html) for guidance on the Web IDE. +For more information, view [Rouge Ruby Library](https://github.com/rouge-ruby/rouge) for guidance on code files and Snippets. View [Monaco Editor](https://microsoft.github.io/monaco-editor/) and [Monarch](https://microsoft.github.io/monaco-editor/monarch.html) for guidance on the Web IDE. ## Change the diff colors @@ -105,17 +105,17 @@ To change the default content on your group overview page: 1. On the left sidebar, select your avatar. 1. Select **Preferences**. 1. Go to the **Behavior** section. -1. For **Group overivew content**, select an option. +1. For **Group overview content**, select an option. 1. Select **Save changes**. ### Customize default content on your project overview page -Your project overview page is the page you view when you select **Project overview** on the left sidebar. You can set your main project overview page to the Activity page, the Readme file, and other content. +Your project overview page is the page you view when you select **Project overview** on the left sidebar. You can set your main project overview page to the Activity page, the README file, and other content. 1. On the left sidebar, select your avatar. 1. Select **Preferences**. 1. Go to the **Behavior** section. -1. For **Project overivew content**, select an option. +1. For **Project overview content**, select an option. 1. Select **Save changes**. ### Hide shortcut buttons diff --git a/doc/user/project/integrations/index.md b/doc/user/project/integrations/index.md index 5809f62e933..9343cc798e0 100644 --- a/doc/user/project/integrations/index.md +++ b/doc/user/project/integrations/index.md @@ -120,7 +120,7 @@ To use custom settings for a project or group integration: | Buildkite | Run CI/CD pipelines with Buildkite. | **{check-circle}** Yes | | Campfire | Connect to chat. | **{dotted-circle}** No | | [ClickUp](clickup.md) | Use ClickUp as the issue tracker. | **{dotted-circle}** No | -| [Confluence Workspace](../../../api/integrations.md#confluence-integration) | Use Confluence Cloud Workspace as an internal wiki. | **{dotted-circle}** No | +| [Confluence Workspace](../../../api/integrations.md#confluence-workspace) | Use Confluence Cloud Workspace as an internal wiki. | **{dotted-circle}** No | | [Custom issue tracker](custom_issue_tracker.md) | Use a custom issue tracker. | **{dotted-circle}** No | | [Datadog](../../../integration/datadog.md) | Trace your GitLab pipelines with Datadog. | **{check-circle}** Yes | | [Discord Notifications](discord_notifications.md) | Send notifications about project events to a Discord channel. | **{dotted-circle}** No | diff --git a/doc/user/project/repository/index.md b/doc/user/project/repository/index.md index e97892458b4..96b92a057cf 100644 --- a/doc/user/project/repository/index.md +++ b/doc/user/project/repository/index.md @@ -100,7 +100,7 @@ from the GitLab user interface. Prerequisites: -- The [Jetbrains Toolbox App](https://www.jetbrains.com/toolbox-app/) must be also be installed. +- The [JetBrains Toolbox App](https://www.jetbrains.com/toolbox-app/) must be also be installed. To do this: diff --git a/lib/api/entities/basic_project_details.rb b/lib/api/entities/basic_project_details.rb index f89e5adca6d..fa247370606 100644 --- a/lib/api/entities/basic_project_details.rb +++ b/lib/api/entities/basic_project_details.rb @@ -41,6 +41,10 @@ module API expose :namespace, using: 'API::Entities::NamespaceBasic' expose :custom_attributes, using: 'API::Entities::CustomAttribute', if: :with_custom_attributes + expose :repository_storage, documentation: { type: 'string', example: 'default' }, if: ->(project, options) { + Ability.allowed?(options[:current_user], :change_repository_storage, project) + } + # rubocop: disable CodeReuse/ActiveRecord def self.preload_relation(projects_relation, options = {}) # Preloading topics, should be done with using only `:topics`, diff --git a/lib/api/entities/project.rb b/lib/api/entities/project.rb index 0f947c85633..f117fb71354 100644 --- a/lib/api/entities/project.rb +++ b/lib/api/entities/project.rb @@ -159,9 +159,6 @@ module API } expose :autoclose_referenced_issues, documentation: { type: 'boolean' } - expose :repository_storage, documentation: { type: 'string', example: 'default' }, if: ->(project, options) { - Ability.allowed?(options[:current_user], :change_repository_storage, project) - } # rubocop: disable CodeReuse/ActiveRecord def self.preload_resource(project) diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 268b3861a21..9f00cead4d7 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -38389,6 +38389,9 @@ msgstr "" msgid "Provider" msgstr "" +msgid "Provider ID" +msgstr "" + msgid "Provision instructions" msgstr "" diff --git a/spec/frontend/diffs/components/app_spec.js b/spec/frontend/diffs/components/app_spec.js index e10aad6214c..212def72b90 100644 --- a/spec/frontend/diffs/components/app_spec.js +++ b/spec/frontend/diffs/components/app_spec.js @@ -6,6 +6,7 @@ import Vue, { nextTick } from 'vue'; import Vuex from 'vuex'; import setWindowLocation from 'helpers/set_window_location_helper'; import { TEST_HOST } from 'spec/test_constants'; + import App from '~/diffs/components/app.vue'; import CommitWidget from '~/diffs/components/commit_widget.vue'; import CompareVersions from '~/diffs/components/compare_versions.vue'; @@ -17,6 +18,8 @@ import DiffsFileTree from '~/diffs/components/diffs_file_tree.vue'; import CollapsedFilesWarning from '~/diffs/components/collapsed_files_warning.vue'; import HiddenFilesWarning from '~/diffs/components/hidden_files_warning.vue'; +import eventHub from '~/diffs/event_hub'; + import axios from '~/lib/utils/axios_utils'; import { HTTP_STATUS_OK } from '~/lib/utils/http_status'; import { Mousetrap } from '~/lib/mousetrap'; @@ -760,4 +763,29 @@ describe('diffs/components/app', () => { ); }); }); + + describe('autoscroll', () => { + let loadSpy; + + beforeEach(() => { + createComponent(); + loadSpy = jest.spyOn(wrapper.vm, 'loadCollapsedDiff').mockResolvedValue('resolved'); + }); + + it('does nothing if the location hash does not include a file hash', () => { + window.location.hash = 'not_a_file_hash'; + + eventHub.$emit('doneLoadingBatches'); + + expect(loadSpy).not.toHaveBeenCalled(); + }); + + it('requests that the correct file be loaded', () => { + window.location.hash = '1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_0_1'; + + eventHub.$emit('doneLoadingBatches'); + + expect(loadSpy).toHaveBeenCalledWith({ file: store.state.diffs.diffFiles[0] }); + }); + }); }); diff --git a/spec/frontend/diffs/components/diff_file_header_spec.js b/spec/frontend/diffs/components/diff_file_header_spec.js index b089825090b..b0d98e0e4a6 100644 --- a/spec/frontend/diffs/components/diff_file_header_spec.js +++ b/spec/frontend/diffs/components/diff_file_header_spec.js @@ -8,8 +8,12 @@ import { mockTracking, triggerEvent } from 'helpers/tracking_helper'; import DiffFileHeader from '~/diffs/components/diff_file_header.vue'; import { DIFF_FILE_AUTOMATIC_COLLAPSE, DIFF_FILE_MANUAL_COLLAPSE } from '~/diffs/constants'; -import { reviewFile } from '~/diffs/store/actions'; -import { SET_DIFF_FILE_VIEWED, SET_MR_FILE_REVIEWS } from '~/diffs/store/mutation_types'; +import { reviewFile, setFileForcedOpen } from '~/diffs/store/actions'; +import { + SET_DIFF_FILE_VIEWED, + SET_MR_FILE_REVIEWS, + SET_FILE_FORCED_OPEN, +} from '~/diffs/store/mutation_types'; import { diffViewerModes } from '~/ide/constants'; import { scrollToElement } from '~/lib/utils/common_utils'; import { truncateSha } from '~/lib/utils/text_utility'; @@ -67,6 +71,7 @@ describe('DiffFileHeader component', () => { toggleFullDiff: jest.fn(), setCurrentFileHash: jest.fn(), setFileCollapsedByUser: jest.fn(), + setFileForcedOpen: jest.fn(), reviewFile: jest.fn(), }, }, @@ -138,6 +143,19 @@ describe('DiffFileHeader component', () => { expect(wrapper.emitted().toggleFile).toBeDefined(); }); + it('when header is clicked it triggers the action that removes the value that forces a file to be uncollapsed', () => { + createComponent(); + findHeader().trigger('click'); + + return testAction( + setFileForcedOpen, + { filePath: diffFile.file_path, forced: false }, + {}, + [{ type: SET_FILE_FORCED_OPEN, payload: { filePath: diffFile.file_path, forced: false } }], + [], + ); + }); + it('when collapseIcon is clicked emits toggleFile', async () => { createComponent({ props: { collapsible: true } }); findCollapseButton().vm.$emit('click', new Event('click')); @@ -643,6 +661,44 @@ describe('DiffFileHeader component', () => { expect(Boolean(wrapper.emitted().toggleFile)).toBe(fires); }, ); + + it('removes the property that forces a file to be shown when the file review is toggled', () => { + createComponent({ + props: { + diffFile: { + ...diffFile, + viewer: { + ...diffFile.viewer, + automaticallyCollapsed: false, + manuallyCollapsed: null, + }, + }, + showLocalFileReviews: true, + addMergeRequestButtons: true, + expanded: false, + }, + }); + + findReviewFileCheckbox().vm.$emit('change', true); + + testAction( + setFileForcedOpen, + { filePath: diffFile.file_path, forced: false }, + {}, + [{ type: SET_FILE_FORCED_OPEN, payload: { filePath: diffFile.file_path, forced: false } }], + [], + ); + + findReviewFileCheckbox().vm.$emit('change', false); + + testAction( + setFileForcedOpen, + { filePath: diffFile.file_path, forced: false }, + {}, + [{ type: SET_FILE_FORCED_OPEN, payload: { filePath: diffFile.file_path, forced: false } }], + [], + ); + }); }); it('should render the comment on files button', () => { diff --git a/spec/frontend/diffs/components/diff_file_spec.js b/spec/frontend/diffs/components/diff_file_spec.js index 53f135471b7..13efd3584b4 100644 --- a/spec/frontend/diffs/components/diff_file_spec.js +++ b/spec/frontend/diffs/components/diff_file_spec.js @@ -324,6 +324,22 @@ describe('DiffFile', () => { }); describe('collapsing', () => { + describe('forced open', () => { + it('should have content even when it is automatically collapsed', () => { + makeFileAutomaticallyCollapsed(store); + + expect(findDiffContentArea(wrapper).element.children.length).toBe(1); + expect(wrapper.classes('has-body')).toBe(true); + }); + + it('should have content even when it is manually collapsed', () => { + makeFileManuallyCollapsed(store); + + expect(findDiffContentArea(wrapper).element.children.length).toBe(1); + expect(wrapper.classes('has-body')).toBe(true); + }); + }); + describe(`\`${EVT_EXPAND_ALL_FILES}\` event`, () => { beforeEach(() => { jest.spyOn(wrapper.vm, 'handleToggle').mockImplementation(() => {}); diff --git a/spec/frontend/diffs/store/actions_spec.js b/spec/frontend/diffs/store/actions_spec.js index 387407a7e4d..18e81232b5c 100644 --- a/spec/frontend/diffs/store/actions_spec.js +++ b/spec/frontend/diffs/store/actions_spec.js @@ -1627,6 +1627,7 @@ describe('DiffsStoreActions', () => { name: updatedViewerName, automaticallyCollapsed: false, manuallyCollapsed: false, + forceOpen: false, }; const testData = [{ rich_text: 'test' }, { rich_text: 'file2' }]; let renamedFile; @@ -1673,7 +1674,7 @@ describe('DiffsStoreActions', () => { }); }); - describe('setFileUserCollapsed', () => { + describe('setFileCollapsedByUser', () => { it('commits SET_FILE_COLLAPSED', () => { return testAction( diffActions.setFileCollapsedByUser, @@ -1690,6 +1691,17 @@ describe('DiffsStoreActions', () => { }); }); + describe('setFileForcedOpen', () => { + it('commits SET_FILE_FORCED_OPEN', () => { + return testAction(diffActions.setFileForcedOpen, { filePath: 'test', forced: true }, null, [ + { + type: types.SET_FILE_FORCED_OPEN, + payload: { filePath: 'test', forced: true }, + }, + ]); + }); + }); + describe('setExpandedDiffLines', () => { beforeEach(() => { utils.idleCallback.mockImplementation((cb) => { diff --git a/spec/frontend/diffs/store/mutations_spec.js b/spec/frontend/diffs/store/mutations_spec.js index e87c5d0a9b1..fdcf7c3eeab 100644 --- a/spec/frontend/diffs/store/mutations_spec.js +++ b/spec/frontend/diffs/store/mutations_spec.js @@ -1055,4 +1055,14 @@ describe('DiffsStoreMutations', () => { expect(state.diffFiles[0].drafts[0]).toEqual('test'); }); }); + + describe('SET_FILE_FORCED_OPEN', () => { + it('sets the forceOpen property of a diff file viewer correctly', () => { + const state = { diffFiles: [{ file_path: 'abc', viewer: { forceOpen: 'not-a-boolean' } }] }; + + mutations[types.SET_FILE_FORCED_OPEN](state, { filePath: 'abc', force: true }); + + expect(state.diffFiles[0].viewer.forceOpen).toBe(true); + }); + }); }); diff --git a/spec/frontend/diffs/utils/merge_request_spec.js b/spec/frontend/diffs/utils/merge_request_spec.js index 11c0efb9a9c..f5145b3c4c7 100644 --- a/spec/frontend/diffs/utils/merge_request_spec.js +++ b/spec/frontend/diffs/utils/merge_request_spec.js @@ -1,6 +1,7 @@ import { updateChangesTabCount, getDerivedMergeRequestInformation, + extractFileHash, } from '~/diffs/utils/merge_request'; import { ZERO_CHANGES_ALT_DISPLAY } from '~/diffs/constants'; import { diffMetadata } from '../mock_data/diff_metadata'; @@ -128,4 +129,19 @@ describe('Merge Request utilities', () => { }); }); }); + + describe('extractFileHash', () => { + const sha1Like = 'abcdef1234567890abcdef1234567890abcdef12'; + const sha1LikeToo = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; + + it('returns undefined when a SHA1-like string cannot be found in the input', () => { + expect(extractFileHash({ input: 'something' })).toBe(undefined); + }); + + it('returns the first matching string of SHA1-like characters in the input', () => { + const fullString = `#${sha1Like}_34_42--${sha1LikeToo}`; + + expect(extractFileHash({ input: fullString })).toBe(sha1Like); + }); + }); }); diff --git a/spec/helpers/sidekiq_helper_spec.rb b/spec/helpers/sidekiq_helper_spec.rb deleted file mode 100644 index 594996bac95..00000000000 --- a/spec/helpers/sidekiq_helper_spec.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe SidekiqHelper, feature_category: :shared do - describe 'parse_sidekiq_ps' do - it 'parses line with time' do - line = '55137 10,0 2,1 S+ 2:30pm sidekiq 4.1.4 gitlab [0 of 25 busy] ' - parts = helper.parse_sidekiq_ps(line) - - expect(parts).to eq(['55137', '10,0', '2,1', 'S+', '2:30pm', 'sidekiq 4.1.4 gitlab [0 of 25 busy]']) - end - - it 'parses line with date' do - line = '55137 10,0 2,1 S+ Aug 4 sidekiq 4.1.4 gitlab [0 of 25 busy] ' - parts = helper.parse_sidekiq_ps(line) - - expect(parts).to eq(['55137', '10,0', '2,1', 'S+', 'Aug 4', 'sidekiq 4.1.4 gitlab [0 of 25 busy]']) - end - - it 'parses line with two digit date' do - line = '55137 10,0 2,1 S+ Aug 04 sidekiq 4.1.4 gitlab [0 of 25 busy] ' - parts = helper.parse_sidekiq_ps(line) - - expect(parts).to eq(['55137', '10,0', '2,1', 'S+', 'Aug 04', 'sidekiq 4.1.4 gitlab [0 of 25 busy]']) - end - - it 'parses line with dot as float separator' do - line = '55137 10.0 2.1 S+ 2:30pm sidekiq 4.1.4 gitlab [0 of 25 busy] ' - parts = helper.parse_sidekiq_ps(line) - - expect(parts).to eq(['55137', '10.0', '2.1', 'S+', '2:30pm', 'sidekiq 4.1.4 gitlab [0 of 25 busy]']) - end - - it 'parses OSX output' do - line = ' 1641 1.5 3.8 S+ 4:04PM sidekiq 4.2.1 gitlab [0 of 25 busy]' - parts = helper.parse_sidekiq_ps(line) - - expect(parts).to eq(['1641', '1.5', '3.8', 'S+', '4:04PM', 'sidekiq 4.2.1 gitlab [0 of 25 busy]']) - end - - it 'parses Ubuntu output' do - # Ubuntu Linux 16.04 LTS / procps-3.3.10-4ubuntu2 - line = ' 938 1.4 2.5 Sl+ 21:23:21 sidekiq 4.2.1 gitlab [0 of 25 busy] ' - parts = helper.parse_sidekiq_ps(line) - - expect(parts).to eq(['938', '1.4', '2.5', 'Sl+', '21:23:21', 'sidekiq 4.2.1 gitlab [0 of 25 busy]']) - end - - it 'parses Debian output' do - # Debian Linux Wheezy/Jessie - line = '17725 1.0 12.1 Ssl 19:20:15 sidekiq 4.2.1 gitlab-rails [0 of 25 busy] ' - parts = helper.parse_sidekiq_ps(line) - - expect(parts).to eq(['17725', '1.0', '12.1', 'Ssl', '19:20:15', 'sidekiq 4.2.1 gitlab-rails [0 of 25 busy]']) - end - - it 'parses OpenBSD output' do - # OpenBSD 6.1 - line = '49258 0.5 2.3 R/0 Fri10PM ruby23: sidekiq 4.2.7 gitlab [0 of 25 busy] (ruby23)' - parts = helper.parse_sidekiq_ps(line) - - expect(parts).to eq(['49258', '0.5', '2.3', 'R/0', 'Fri10PM', 'ruby23: sidekiq 4.2.7 gitlab [0 of 25 busy] (ruby23)']) - end - - it 'does fail gracefully on line not matching the format' do - line = '55137 10.0 2.1 S+ 2:30pm something' - parts = helper.parse_sidekiq_ps(line) - - expect(parts).to eq(['?', '?', '?', '?', '?', '?']) - end - end -end diff --git a/spec/helpers/sorting_helper_spec.rb b/spec/helpers/sorting_helper_spec.rb index f4974c8b7b2..0f53cc98415 100644 --- a/spec/helpers/sorting_helper_spec.rb +++ b/spec/helpers/sorting_helper_spec.rb @@ -76,20 +76,6 @@ RSpec.describe SortingHelper do end end - describe '#issuable_sort_option_title' do - it 'returns correct title for issuable_sort_option_overrides key' do - expect(issuable_sort_option_title('created_asc')).to eq('Created date') - end - - it 'returns correct title for a valid sort value' do - expect(issuable_sort_option_title('priority')).to eq('Priority') - end - - it 'returns nil for invalid sort value' do - expect(issuable_sort_option_title('invalid_key')).to eq(nil) - end - end - describe '#issuable_sort_direction_button' do before do set_sorting_url 'test_label' @@ -209,17 +195,6 @@ RSpec.describe SortingHelper do stub_controller_path 'forks' end - describe '#forks_sort_options_hash' do - it 'returns a hash of available sorting options' do - expect(forks_sort_options_hash).to include({ - sort_value_recently_created => sort_title_created_date, - sort_value_oldest_created => sort_title_created_date, - sort_value_latest_activity => sort_title_latest_activity, - sort_value_oldest_activity => sort_title_latest_activity - }) - end - end - describe '#forks_reverse_sort_options_hash' do context 'for each sort option' do using RSpec::Parameterized::TableSyntax diff --git a/spec/lib/api/entities/basic_project_details_spec.rb b/spec/lib/api/entities/basic_project_details_spec.rb index 425252ea315..6e75f08d937 100644 --- a/spec/lib/api/entities/basic_project_details_spec.rb +++ b/spec/lib/api/entities/basic_project_details_spec.rb @@ -61,4 +61,32 @@ RSpec.describe API::Entities::BasicProjectDetails, feature_category: :api do end end end + + describe '#repository_storage' do + let_it_be(:project) { build(:project, :public) } + + context 'with anonymous user' do + let_it_be(:current_user) { nil } + + it 'is not included' do + expect(output).not_to include(:repository_storage) + end + end + + context 'with normal user' do + let_it_be(:current_user) { create(:user) } + + it 'is not included' do + expect(output).not_to include(:repository_storage) + end + end + + context 'with admin user' do + let_it_be(:current_user) { create(:user, :admin) } + + it 'is included', :enable_admin_mode do + expect(output).to include repository_storage: project.repository_storage + end + end + end end |