Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-06-28 00:20:09 +00:00
parent 59d0f7a222
commit c42a1fd36f
15 changed files with 511 additions and 484 deletions

View File

@ -350,7 +350,7 @@
{"name":"kubeclient","version":"4.11.0","platform":"ruby","checksum":"4985fcd749fb8c364a668a8350a49821647f03aa52d9ee6cbc582beb8e883fcc"},
{"name":"language_server-protocol","version":"3.17.0.3","platform":"ruby","checksum":"3d5c58c02f44a20d972957a9febe386d7e7468ab3900ce6bd2b563dd910c6b3f"},
{"name":"launchy","version":"2.5.0","platform":"ruby","checksum":"954243c4255920982ce682f89a42e76372dba94770bf09c23a523e204bdebef5"},
{"name":"lefthook","version":"1.6.14","platform":"ruby","checksum":"78b51e17e9729c4ae0d9f9dfa0c67c7d9fa3f6651deb71419b4b4116f2367ce5"},
{"name":"lefthook","version":"1.6.18","platform":"ruby","checksum":"b66c42a4de398c9bbe9bdb0ee3fc669f124244aced56d21e2e074f2980343173"},
{"name":"letter_opener","version":"1.7.0","platform":"ruby","checksum":"095bc0d58e006e5b43ea7d219e64ecf2de8d1f7d9dafc432040a845cf59b4725"},
{"name":"letter_opener_web","version":"2.0.0","platform":"ruby","checksum":"33860ad41e1785d75456500e8ca8bba8ed71ee6eaf08a98d06bbab67c5577b6f"},
{"name":"libyajl2","version":"2.1.0","platform":"ruby","checksum":"aa5df6c725776fc050c8418450de0f7c129cb7200b811907c4c0b3b5c0aea0ef"},

View File

@ -1026,7 +1026,7 @@ GEM
language_server-protocol (3.17.0.3)
launchy (2.5.0)
addressable (~> 2.7)
lefthook (1.6.14)
lefthook (1.6.18)
letter_opener (1.7.0)
launchy (~> 2.2)
letter_opener_web (2.0.0)

View File

@ -15,6 +15,7 @@ import IssuableList from '~/vue_shared/issuable/list/components/issuable_list_ro
import { DEFAULT_PAGE_SIZE, mergeRequestListTabs } from '~/vue_shared/issuable/list/constants';
import {
OPERATORS_IS,
OPERATORS_IS_NOT,
TOKEN_TITLE_AUTHOR,
TOKEN_TYPE_AUTHOR,
TOKEN_TITLE_DRAFT,
@ -29,6 +30,8 @@ import {
TOKEN_TYPE_REVIEWER,
TOKEN_TITLE_MILESTONE,
TOKEN_TYPE_MILESTONE,
TOKEN_TITLE_LABEL,
TOKEN_TYPE_LABEL,
} from '~/vue_shared/components/filtered_search_bar/constants';
import {
convertToApiParams,
@ -53,6 +56,7 @@ import setSortPreferenceMutation from '~/issues/list/queries/set_sort_preference
import { i18n } from '../constants';
import getMergeRequestsQuery from '../queries/get_merge_requests.query.graphql';
import getMergeRequestsCountsQuery from '../queries/get_merge_requests_counts.query.graphql';
import searchLabelsQuery from '../queries/search_labels.query.graphql';
import MergeRequestStatistics from './merge_request_statistics.vue';
import MergeRequestMoreActionsDropdown from './more_actions_dropdown.vue';
@ -61,6 +65,8 @@ const BranchToken = () =>
import('~/vue_shared/components/filtered_search_bar/tokens/branch_token.vue');
const MilestoneToken = () =>
import('~/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue');
const LabelToken = () =>
import('~/vue_shared/components/filtered_search_bar/tokens/label_token.vue');
export default {
i18n,
@ -75,6 +81,7 @@ export default {
inject: [
'fullPath',
'hasAnyMergeRequests',
'hasScopedLabelsFeature',
'initialSort',
'isPublicVisibilityRestricted',
'isSignedIn',
@ -269,6 +276,15 @@ export default {
isProject: true,
fetchBranches: this.fetchBranches,
},
{
type: TOKEN_TYPE_LABEL,
title: TOKEN_TITLE_LABEL,
icon: 'labels',
token: LabelToken,
operators: OPERATORS_IS_NOT,
fetchLabels: this.fetchLabels,
recentSuggestionsStorageKey: `${this.fullPath}-merge_requests-recent-tokens-label`,
},
];
},
showPaginationControls() {
@ -330,6 +346,23 @@ export default {
});
});
},
fetchLabelsWithFetchPolicy(search, fetchPolicy = fetchPolicies.CACHE_FIRST) {
return this.$apollo
.query({
query: searchLabelsQuery,
variables: { fullPath: this.fullPath, search },
fetchPolicy,
})
.then(({ data }) => data.project.labels.nodes)
.then((labels) =>
// TODO remove once we can search by title-only on the backend
// https://gitlab.com/gitlab-org/gitlab/-/issues/346353
labels.filter((label) => label.title.toLowerCase().includes(search.toLowerCase())),
);
},
fetchLabels(search) {
return this.fetchLabelsWithFetchPolicy(search);
},
getStatus(mergeRequest) {
if (mergeRequest.state === STATUS_CLOSED) {
return this.$options.i18n.closed;
@ -428,6 +461,7 @@ export default {
:namespace="fullPath"
recent-searches-storage-key="merge_requests"
:search-tokens="searchTokens"
:has-scoped-labels-feature="hasScopedLabelsFeature"
:initial-filter-value="filterTokens"
:sort-options="sortOptions"
:initial-sort-by="sortKey"

View File

@ -19,6 +19,7 @@ export async function mountMergeRequestListsApp() {
const {
fullPath,
hasAnyMergeRequests,
hasScopedLabelsFeature,
initialSort,
isPublicVisibilityRestricted,
isSignedIn,
@ -45,6 +46,7 @@ export async function mountMergeRequestListsApp() {
provide: {
fullPath,
hasAnyMergeRequests: parseBoolean(hasAnyMergeRequests),
hasScopedLabelsFeature: parseBoolean(hasScopedLabelsFeature),
initialSort,
isPublicVisibilityRestricted: parseBoolean(isPublicVisibilityRestricted),
isSignedIn: parseBoolean(isSignedIn),

View File

@ -13,6 +13,7 @@ query getMergeRequests(
$reviewerWildcardId: ReviewerWildcardId
$authorUsername: String
$draft: Boolean
$labelName: [String!]
$milestoneTitle: String
$milestoneWildcardId: MilestoneWildcardId
$sourceBranches: [String!]
@ -33,6 +34,7 @@ query getMergeRequests(
reviewerWildcardId: $reviewerWildcardId
authorUsername: $authorUsername
draft: $draft
labelName: $labelName
milestoneTitle: $milestoneTitle
milestoneWildcardId: $milestoneWildcardId
sourceBranches: $sourceBranches

View File

@ -0,0 +1,15 @@
query searchLabelsForMergeRequests($fullPath: ID!, $search: String) {
project(fullPath: $fullPath) @persist {
id
labels(searchTerm: $search, includeAncestorGroups: true) {
__persist
nodes {
__persist
id
color
textColor
title
}
}
}
}

View File

@ -31,3 +31,5 @@ module Users
end
end
end
Users::AutoBanService.prepend_mod

View File

@ -1626,7 +1626,36 @@ Input type: `AiSelfHostedModelCreateInput`
| ---- | ---- | ----------- |
| <a id="mutationaiselfhostedmodelcreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
| <a id="mutationaiselfhostedmodelcreateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
| <a id="mutationaiselfhostedmodelcreateselfhostedmodel"></a>`selfHostedModel` | [`AiSelfHostedModel`](#aiselfhostedmodel) | Created self-hosted model. |
| <a id="mutationaiselfhostedmodelcreateselfhostedmodel"></a>`selfHostedModel` | [`AiSelfHostedModel`](#aiselfhostedmodel) | Self-hosted model after mutation. |
### `Mutation.aiSelfHostedModelUpdate`
Updates a self-hosted model.
DETAILS:
**Introduced** in GitLab 17.2.
**Status**: Experiment.
Input type: `AiSelfHostedModelUpdateInput`
#### Arguments
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="mutationaiselfhostedmodelupdateapitoken"></a>`apiToken` | [`String`](#string) | API token to access the self-hosted model, if any. |
| <a id="mutationaiselfhostedmodelupdateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
| <a id="mutationaiselfhostedmodelupdateendpoint"></a>`endpoint` | [`String!`](#string) | Endpoint of the self-hosted model. |
| <a id="mutationaiselfhostedmodelupdateid"></a>`id` | [`AiSelfHostedModelID!`](#aiselfhostedmodelid) | Global ID of the self-hosted model to update. |
| <a id="mutationaiselfhostedmodelupdatemodel"></a>`model` | [`AiAcceptedSelfHostedModels!`](#aiacceptedselfhostedmodels) | AI model deployed. |
| <a id="mutationaiselfhostedmodelupdatename"></a>`name` | [`String!`](#string) | Deployment name of the self-hosted model. |
#### Fields
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="mutationaiselfhostedmodelupdateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
| <a id="mutationaiselfhostedmodelupdateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
| <a id="mutationaiselfhostedmodelupdateselfhostedmodel"></a>`selfHostedModel` | [`AiSelfHostedModel`](#aiselfhostedmodel) | Self-hosted model after mutation. |
### `Mutation.alertSetAssignees`

View File

@ -93,11 +93,11 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `app_store_issuer_id` | string | true | Apple App Store Connect issuer ID. |
| `app_store_key_id` | string | true | Apple App Store Connect key ID. |
| `app_store_private_key_file_name` | string | true | Apple App Store Connect private key filename. |
| `app_store_private_key` | string | true | Apple App Store Connect private key. |
| `app_store_protected_refs` | boolean | false | Set variables on protected branches and tags only. |
| `app_store_issuer_id` | string | yes | Apple App Store Connect issuer ID. |
| `app_store_key_id` | string | yes | Apple App Store Connect key ID. |
| `app_store_private_key_file_name` | string | yes | Apple App Store Connect private key filename. |
| `app_store_private_key` | string | yes | Apple App Store Connect private key. |
| `app_store_protected_refs` | boolean | no | Set variables on protected branches and tags only. |
### Disable Apple App Store Connect
@ -129,8 +129,8 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `api_key` | string | true | User API token. The user must have access to the task. All comments are attributed to this user. |
| `restrict_to_branch` | string | false | Comma-separated list of branches to be automatically inspected. Leave blank to include all branches. |
| `api_key` | string | yes | User API token. The user must have access to the task. All comments are attributed to this user. |
| `restrict_to_branch` | string | no | Comma-separated list of branches to be automatically inspected. Leave blank to include all branches. |
### Disable Asana
@ -162,8 +162,8 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `token` | string | true | The authentication token. |
| `subdomain` | string | false | The subdomain setting. |
| `token` | string | yes | The authentication token. |
| `subdomain` | string | no | The subdomain setting. |
### Disable Assembla
@ -197,11 +197,11 @@ 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 (for example, `KEY`). |
| `username` | string | true | User with API access to the Bamboo server. |
| `password` | string | true | Password of the user. |
| `bamboo_url` | string | yes | Bamboo root URL (for example, `https://bamboo.example.com`). |
| `enable_ssl_verification` | boolean | no | Enable SSL verification. Defaults to `true` (enabled). |
| `build_key` | string | yes | Bamboo build plan key (for example, `KEY`). |
| `username` | string | yes | User with API access to the Bamboo server. |
| `password` | string | yes | Password of the user. |
### Disable Atlassian Bamboo
@ -233,9 +233,9 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `new_issue_url` | string | true | URL of the new issue. |
| `issues_url` | string | true | URL of the issue. |
| `project_url` | string | true | URL of the project. |
| `new_issue_url` | string | yes | URL of the new issue. |
| `issues_url` | string | yes | URL of the issue. |
| `project_url` | string | yes | URL of the project. |
### Disable Bugzilla
@ -267,12 +267,12 @@ 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 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. |
| `token` | string | yes | Buildkite project GitLab token. |
| `project_url` | string | yes | Pipeline URL (for example, `https://buildkite.com/example/pipeline`). |
| `enable_ssl_verification` | boolean | no | **Deprecated:** This parameter has no effect because SSL verification is always enabled. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
### Disable Buildkite
@ -307,9 +307,9 @@ Parameters:
| Parameter | Type | Required | Description |
|---------------|---------|----------|---------------------------------------------------------------------------------------------|
| `token` | string | true | API authentication token from Campfire Classic. To get the token, sign in to Campfire Classic and select **My info**. |
| `subdomain` | string | false | `.campfirenow.com` subdomain when you're signed in. |
| `room` | string | false | ID portion of the Campfire Classic room URL. |
| `token` | string | yes | API authentication token from Campfire Classic. To get the token, sign in to Campfire Classic and select **My info**. |
| `subdomain` | string | no | `.campfirenow.com` subdomain when you're signed in. |
| `room` | string | no | ID portion of the Campfire Classic room URL. |
### Disable Campfire Classic
@ -343,8 +343,8 @@ Parameters:
| Parameter | Type | Required | Description |
| ------------- | ------ | -------- | -------------- |
| `issues_url` | string | true | URL of the issue. |
| `project_url` | string | true | URL of the project. |
| `issues_url` | string | yes | URL of the issue. |
| `project_url` | string | yes | URL of the project. |
### Disable ClickUp
@ -376,7 +376,7 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `confluence_url` | string | true | URL of the Confluence Workspace hosted on `atlassian.net`. |
| `confluence_url` | string | yes | URL of the Confluence Workspace hosted on `atlassian.net`. |
### Disable Confluence Workspace
@ -408,9 +408,9 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `new_issue_url` | string | true | URL of the new issue. |
| `issues_url` | string | true | URL of the issue. |
| `project_url` | string | true | URL of the project. |
| `new_issue_url` | string | yes | URL of the new issue. |
| `issues_url` | string | yes | URL of the issue. |
| `project_url` | string | yes | URL of the project. |
### Disable a custom issue tracker
@ -442,13 +442,13 @@ Parameters:
| Parameter | Type | Required | Description |
|------------------------|---------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `api_key` | string | true | API key used for authentication with Datadog. |
| `api_url` | string | false | (Advanced) The full URL for your Datadog site. |
| `datadog_env` | string | false | For self-managed deployments, set the `env%` tag for all the data sent to Datadog. |
| `datadog_service` | string | false | Tag all data from this GitLab instance in Datadog. Can be used when managing several self-managed deployments. |
| `datadog_site` | string | false | The Datadog site to send data to. To send data to the EU site, use `datadoghq.eu`. |
| `datadog_tags` | string | false | Custom tags in Datadog. Specify one tag per line in the format `key:value\nkey2:value2` |
| `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). |
| `api_key` | string | yes | API key used for authentication with Datadog. |
| `api_url` | string | no | (Advanced) The full URL for your Datadog site. |
| `datadog_env` | string | no | For self-managed deployments, set the `env%` tag for all the data sent to Datadog. |
| `datadog_service` | string | no | Tag all data from this GitLab instance in Datadog. Can be used when managing several self-managed deployments. |
| `datadog_site` | string | no | The Datadog site to send data to. To send data to the EU site, use `datadoghq.eu`. |
| `datadog_tags` | string | no | Custom tags in Datadog. Specify one tag per line in the format `key:value\nkey2:value2` |
| `archive_trace_events` | boolean | no | 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
@ -480,9 +480,9 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `diffblue_license_key` | string | true | Diffblue Cover license key. |
| `diffblue_access_token_name` | string | true | Access token name used by Diffblue Cover in pipelines. |
| `diffblue_access_token_secret` | string | true | Access token secret used by Diffblue Cover in pipelines. |
| `diffblue_license_key` | string | yes | Diffblue Cover license key. |
| `diffblue_access_token_name` | string | yes | Access token name used by Diffblue Cover in pipelines. |
| `diffblue_access_token_secret` | string | yes | Access token secret used by Diffblue Cover in pipelines. |
### Disable Diffblue Cover
@ -516,33 +516,33 @@ 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 notifications for confidential issue events. |
| `confidential_note_events` | boolean | false | Enable notifications for confidential note events. |
| `confidential_note_channel` | string | false | The webhook override to receive notifications for confidential note events. |
| `deployment_events` | boolean | false | Enable notifications for deployment events. |
| `deployment_channel` | string | false | The webhook override to receive notifications for deployment events. |
| `group_confidential_mentions_events` | boolean | false | Enable notifications for group confidential mention events. |
| `group_confidential_mentions_channel` | string | false | The webhook override to receive notifications for group confidential mention events. |
| `group_mentions_events` | boolean | false | Enable notifications for group mention events. |
| `group_mentions_channel` | string | false | The webhook override to receive notifications for group mention events. |
| `issues_events` | boolean | false | Enable notifications for issue events. |
| `issue_channel` | string | false | The webhook override to receive notifications for issue events. |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events. |
| `merge_request_channel` | string | false | The webhook override to receive notifications for merge request events. |
| `note_events` | boolean | false | Enable notifications for note events. |
| `note_channel` | string | false | The webhook override to receive notifications for note events. |
| `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 notifications for pipeline events. |
| `push_events` | boolean | false | Enable notifications for push events. |
| `push_channel` | string | false | The webhook override to receive notifications for push events. |
| `tag_push_events` | boolean | false | Enable notifications for tag push events. |
| `tag_push_channel` | string | false | The webhook override to receive notifications for tag push events. |
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events. |
| `wiki_page_channel` | string | false | The webhook override to receive notifications for wiki page events. |
| `webhook` | string | yes | Discord webhook (for example, `https://discord.com/api/webhooks/...`). |
| `branches_to_be_notified` | string | no | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. |
| `confidential_issues_events` | boolean | no | Enable notifications for confidential issue events. |
| `confidential_issue_channel` | string | no | The webhook override to receive notifications for confidential issue events. |
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `confidential_note_channel` | string | no | The webhook override to receive notifications for confidential note events. |
| `deployment_events` | boolean | no | Enable notifications for deployment events. |
| `deployment_channel` | string | no | The webhook override to receive notifications for deployment events. |
| `group_confidential_mentions_events` | boolean | no | Enable notifications for group confidential mention events. |
| `group_confidential_mentions_channel` | string | no | The webhook override to receive notifications for group confidential mention events. |
| `group_mentions_events` | boolean | no | Enable notifications for group mention events. |
| `group_mentions_channel` | string | no | The webhook override to receive notifications for group mention events. |
| `issues_events` | boolean | no | Enable notifications for issue events. |
| `issue_channel` | string | no | The webhook override to receive notifications for issue events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `merge_request_channel` | string | no | The webhook override to receive notifications for merge request events. |
| `note_events` | boolean | no | Enable notifications for note events. |
| `note_channel` | string | no | The webhook override to receive notifications for note events. |
| `notify_only_broken_pipelines` | boolean | no | Send notifications for broken pipelines. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `pipeline_channel` | string | no | The webhook override to receive notifications for pipeline events. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `push_channel` | string | no | The webhook override to receive notifications for push events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `tag_push_channel` | string | no | The webhook override to receive notifications for tag push events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
| `wiki_page_channel` | string | no | The webhook override to receive notifications for wiki page events. |
### Disable Discord Notifications
@ -574,12 +574,12 @@ 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 | yes | Drone CI project specific token. |
| `drone_url` | string | yes | `http://drone.example.com`. |
| `enable_ssl_verification` | boolean | no | Enable SSL verification. Defaults to `true` (enabled). |
| `push_events` | boolean | no | Enable notifications for push events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
### Disable Drone
@ -611,12 +611,12 @@ 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 | yes | Emails separated by whitespace. |
| `disable_diffs` | boolean | no | Disable code diffs. |
| `send_from_committer_email` | boolean | no | Send from committer. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `branches_to_be_notified` | string | no | 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
@ -648,9 +648,9 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `new_issue_url` | string | true | URL of the new issue. |
| `project_url` | string | true | URL of the project. |
| `issues_url` | string | true | URL of the issue. |
| `new_issue_url` | string | yes | URL of the new issue. |
| `project_url` | string | yes | URL of the project. |
| `issues_url` | string | yes | URL of the issue. |
### Disable EWM
@ -682,7 +682,7 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `external_wiki_url` | string | true | URL of the external wiki. |
| `external_wiki_url` | string | yes | URL of the external wiki. |
### Disable an external wiki
@ -741,7 +741,7 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- |-----------------------------------------------|
| `token` | string | true | GitGuardian API token with `scan` scope. |
| `token` | string | yes | GitGuardian API token with `scan` scope. |
### Disable GitGuardian
@ -777,9 +777,9 @@ 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 the hostname of your GitLab instance to the [status check name](../user/project/integrations/github.md#static-or-dynamic-status-check-names). |
| `token` | string | yes | GitHub API token with `repo:status` OAuth scope. |
| `repository_url` | string | yes | GitHub repository URL. |
| `static_context` | boolean | no | Append the hostname of your GitLab instance to the [status check name](../user/project/integrations/github.md#static-or-dynamic-status-check-names). |
### Disable GitHub
@ -816,23 +816,23 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `channel` | string | false | Default channel to use if no other channel is 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_events` | boolean | false | Enable notifications for alert 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. |
| `note_events` | boolean | false | Enable notifications for note events. |
| `confidential_note_events` | boolean | false | Enable notifications for confidential note events. |
| `deployment_events` | boolean | false | Enable notifications for deployment events. |
| `incidents_events` | boolean | false | Enable notifications for incident events. |
| `pipeline_events` | boolean | false | Enable notifications for pipeline events. |
| `push_events` | boolean | false | Enable notifications for push events. |
| `tag_push_events` | boolean | false | Enable notifications for tag push events. |
| `vulnerability_events` | boolean | false | Enable notifications for vulnerability events. |
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events. |
| `channel` | string | no | Default channel to use if no other channel is configured. |
| `notify_only_broken_pipelines` | boolean | no | Send notifications for broken pipelines. |
| `notify_only_default_branch` | boolean | no | **Deprecated:** This parameter has been replaced with `branches_to_be_notified`. |
| `branches_to_be_notified` | string | no | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. |
| `alert_events` | boolean | no | Enable notifications for alert events. |
| `issues_events` | boolean | no | Enable notifications for issue events. |
| `confidential_issues_events` | boolean | no | Enable notifications for confidential issue events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `note_events` | boolean | no | Enable notifications for note events. |
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `deployment_events` | boolean | no | Enable notifications for deployment events. |
| `incidents_events` | boolean | no | Enable notifications for incident events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `vulnerability_events` | boolean | no | Enable notifications for vulnerability events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
### Disable GitLab for Slack app
@ -864,19 +864,19 @@ 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 | yes | The Hangouts Chat webhook (for example, `https://chat.googleapis.com/v1/spaces...`). |
| `notify_only_broken_pipelines` | boolean | no | Send notifications for broken pipelines. |
| `notify_only_default_branch` | boolean | no | **Deprecated:** This parameter has been replaced with `branches_to_be_notified`. |
| `branches_to_be_notified` | string | no | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `issues_events` | boolean | no | Enable notifications for issue events. |
| `confidential_issues_events` | boolean | no | Enable notifications for confidential issue events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `note_events` | boolean | no | Enable notifications for note events. |
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
### Disable Google Chat
@ -918,9 +918,9 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `artifact_registry_project_id` | string | true | ID of the Google Cloud project. |
| `artifact_registry_location` | string | true | Location of the Artifact Registry repository. |
| `artifact_registry_repositories` | string | true | Repository of Artifact Registry. |
| `artifact_registry_project_id` | string | yes | ID of the Google Cloud project. |
| `artifact_registry_location` | string | yes | Location of the Artifact Registry repository. |
| `artifact_registry_repositories` | string | yes | Repository of Artifact Registry. |
### Disable Google Artifact Management
@ -962,10 +962,10 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `workload_identity_federation_project_id` | string | true | Google Cloud project ID for the Workload Identity Federation. |
| `workload_identity_federation_project_number` | integer | true | Google Cloud project number for the Workload Identity Federation. |
| `workload_identity_pool_id` | string | true | ID of the Workload Identity Pool. |
| `workload_identity_pool_provider_id` | string | true | ID of the Workload Identity Pool provider. |
| `workload_identity_federation_project_id` | string | yes | Google Cloud project ID for the Workload Identity Federation. |
| `workload_identity_federation_project_number` | integer | yes | Google Cloud project number for the Workload Identity Federation. |
| `workload_identity_pool_id` | string | yes | ID of the Workload Identity Pool. |
| `workload_identity_pool_provider_id` | string | yes | ID of the Workload Identity Pool provider. |
### Disable Google Cloud Identity and Access Management
@ -997,10 +997,10 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `package_name` | string | true | Package name of the app in Google Play. |
| `service_account_key` | string | true | Google Play service account key. |
| `service_account_key_file_name` | string | true | File name of the Google Play service account key. |
| `google_play_protected_refs` | boolean | false | Set variables on protected branches and tags only. |
| `package_name` | string | yes | Package name of the app in Google Play. |
| `service_account_key` | string | yes | Google Play service account key. |
| `service_account_key_file_name` | string | yes | File name of the Google Play service account key. |
| `google_play_protected_refs` | boolean | no | Set variables on protected branches and tags only. |
### Disable Google Play
@ -1032,10 +1032,10 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `url` | string | true | The base URL to the Harbor instance linked to the GitLab project. For example, `https://demo.goharbor.io`. |
| `project_name` | string | true | The name of the project in the Harbor instance. For example, `testproject`. |
| `username` | string | true | The username created in the Harbor interface. |
| `password` | string | true | The password of the user. |
| `url` | string | yes | The base URL to the Harbor instance linked to the GitLab project. For example, `https://demo.goharbor.io`. |
| `project_name` | string | yes | The name of the project in the Harbor instance. For example, `testproject`. |
| `username` | string | yes | The username created in the Harbor interface. |
| `password` | string | yes | The password of the user. |
### Disable Harbor
@ -1067,11 +1067,11 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `recipients` | string | true | Recipients or channels separated by whitespaces. |
| `default_irc_uri` | string | false | `irc://irc.network.net:6697/`. |
| `server_host` | string | false | localhost. |
| `server_port` | integer | false | 6659. |
| `colorize_messages` | boolean | false | Colorize messages. |
| `recipients` | string | yes | Recipients or channels separated by whitespaces. |
| `default_irc_uri` | string | no | `irc://irc.network.net:6697/`. |
| `server_host` | string | no | localhost. |
| `server_port` | integer | no | 6659. |
| `colorize_messages` | boolean | no | Colorize messages. |
### Disable irker
@ -1103,14 +1103,14 @@ 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). |
| `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. |
| `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. |
| `jenkins_url` | string | yes | Jenkins URL like `http://jenkins.example.com`. |
| `enable_ssl_verification` | boolean | no | Enable SSL verification. Defaults to `true` (enabled). |
| `project_name` | string | yes | The URL-friendly project name. Example: `my_project_name`. |
| `username` | string | no | Username for authentication with the Jenkins server, if authentication is required by the server. |
| `password` | string | no | Password for authentication with the Jenkins server, if authentication is required by the server. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
### Disable Jenkins
@ -1145,13 +1145,13 @@ 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 | yes | TeamCity root URL (for example, `https://teamcity.example.com`). |
| `enable_ssl_verification` | boolean | no | Enable SSL verification. Defaults to `true` (enabled). |
| `build_type` | string | yes | Build configuration ID. |
| `username` | string | yes | A user with permissions to trigger a manual build. |
| `password` | string | yes | The password of the user. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
### Disable JetBrains TeamCity
@ -1193,11 +1193,11 @@ Parameters:
| `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_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 in Jira issues on each GitLab event (commit or merge request). |
| `issues_enabled` | boolean | false | Enable viewing Jira issues in GitLab. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/267015) in GitLab 17.0. |
| `project_keys` | array of strings | false | Keys of Jira projects. When `issues_enabled` is `true`, this setting specifies which Jira projects to view issues from in GitLab. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/267015) in GitLab 17.0. |
| `commit_events` | boolean | no | Enable notifications for commit events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `comment_on_event_enabled` | boolean | no | Enable comments in Jira issues on each GitLab event (commit or merge request). |
| `issues_enabled` | boolean | no | Enable viewing Jira issues in GitLab. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/267015) in GitLab 17.0. |
| `project_keys` | array of strings | no | Keys of Jira projects. When `issues_enabled` is `true`, this setting specifies which Jira projects to view issues from in GitLab. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/267015) in GitLab 17.0. |
### Disable Jira
@ -1229,32 +1229,32 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `webhook` | string | true | Mattermost notifications webhook (for example, `http://mattermost.example.com/hooks/...`). |
| `username` | string | false | Mattermost notifications username. |
| `channel` | string | false | Default channel to use if no other channel is 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`. |
| `labels_to_be_notified` | string | false | Labels to send notifications for. Leave blank to receive notifications for all events. |
| `labels_to_be_notified_behavior` | string | false | Labels to be notified for. Valid options are `match_any` and `match_all`. The default value is `match_any`. |
| `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 notifications for push events. |
| `issue_channel` | string | false | The name of the channel to receive notifications for issue events. |
| `confidential_issue_channel` | string | false | The name of the channel to receive notifications for confidential issue events. |
| `merge_request_channel` | string | false | The name of the channel to receive notifications for merge request events. |
| `note_channel` | string | false | The name of the channel to receive notifications for note events. |
| `confidential_note_channel` | string | false | The name of the channel to receive notifications for confidential note events. |
| `tag_push_channel` | string | false | The name of the channel to receive notifications for tag push events. |
| `pipeline_channel` | string | false | The name of the channel to receive notifications for pipeline events. |
| `wiki_page_channel` | string | false | The name of the channel to receive notifications for wiki page events. |
| `webhook` | string | yes | Mattermost notifications webhook (for example, `http://mattermost.example.com/hooks/...`). |
| `username` | string | no | Mattermost notifications username. |
| `channel` | string | no | Default channel to use if no other channel is configured. |
| `notify_only_broken_pipelines` | boolean | no | Send notifications for broken pipelines. |
| `notify_only_default_branch` | boolean | no | **Deprecated:** This parameter has been replaced with `branches_to_be_notified`. |
| `branches_to_be_notified` | string | no | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. |
| `labels_to_be_notified` | string | no | Labels to send notifications for. Leave blank to receive notifications for all events. |
| `labels_to_be_notified_behavior` | string | no | Labels to be notified for. Valid options are `match_any` and `match_all`. The default value is `match_any`. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `issues_events` | boolean | no | Enable notifications for issue events. |
| `confidential_issues_events` | boolean | no | Enable notifications for confidential issue events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `note_events` | boolean | no | Enable notifications for note events. |
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
| `push_channel` | string | no | The name of the channel to receive notifications for push events. |
| `issue_channel` | string | no | The name of the channel to receive notifications for issue events. |
| `confidential_issue_channel` | string | no | The name of the channel to receive notifications for confidential issue events. |
| `merge_request_channel` | string | no | The name of the channel to receive notifications for merge request events. |
| `note_channel` | string | no | The name of the channel to receive notifications for note events. |
| `confidential_note_channel` | string | no | The name of the channel to receive notifications for confidential note events. |
| `tag_push_channel` | string | no | The name of the channel to receive notifications for tag push events. |
| `pipeline_channel` | string | no | The name of the channel to receive notifications for pipeline events. |
| `wiki_page_channel` | string | no | The name of the channel to receive notifications for wiki page events. |
### Disable Mattermost notifications
@ -1318,20 +1318,20 @@ 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. |
| `use_inherited_settings` | boolean | false | Indicates whether to inherit defaults or not. |
| `webhook` | string | yes | The Microsoft Teams webhook (for example, `https://outlook.office.com/webhook/...`). |
| `notify_only_broken_pipelines` | boolean | no | Send notifications for broken pipelines. |
| `notify_only_default_branch` | boolean | no | **Deprecated:** This parameter has been replaced with `branches_to_be_notified`. |
| `branches_to_be_notified` | string | no | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `issues_events` | boolean | no | Enable notifications for issue events. |
| `confidential_issues_events` | boolean | no | Enable notifications for confidential issue events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `note_events` | boolean | no | Enable notifications for note events. |
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit defaults or not. |
### Disable Microsoft Teams notifications
@ -1366,8 +1366,8 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `mock_service_url` | string | true | URL of the Mock CI integration. |
| `enable_ssl_verification` | boolean | false | Enable SSL verification. Defaults to `true` (enabled). |
| `mock_service_url` | string | yes | URL of the Mock CI integration. |
| `enable_ssl_verification` | boolean | no | Enable SSL verification. Defaults to `true` (enabled). |
### Disable Mock CI
@ -1402,9 +1402,9 @@ Parameters:
| `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. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
### Disable Packagist
@ -1438,8 +1438,8 @@ Parameters:
| Parameter | Type | Required | Description |
|-----------------|--------|----------|-----------------------|
| `issues_url` | string | true | URL of the issue. |
| `project_url` | string | true | URL of the project. |
| `issues_url` | string | yes | URL of the issue. |
| `project_url` | string | yes | URL of the project. |
### Disable Phorge
@ -1473,9 +1473,9 @@ Parameters:
| --------- | ---- | -------- | ----------- |
| `recipients` | string | yes | Comma-separated list of recipient email addresses. |
| `notify_only_broken_pipelines` | boolean | no | 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`. |
| `branches_to_be_notified` | string | no | 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 for the default branch. |
| `pipeline_events` | boolean | false | Enable notifications for pipeline events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
### Disable pipeline status emails
@ -1507,8 +1507,8 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `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. |
| `token` | string | yes | The Pivotal Tracker token. |
| `restrict_to_branch` | boolean | no | Comma-separated list of branches to automatically inspect. Leave blank to include all branches. |
### Disable Pivotal Tracker
@ -1540,18 +1540,18 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `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. |
| `issues_events` | boolean | false | Enable notifications for issue events. |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events. |
| `note_events` | boolean | false | Enable notifications for note events. |
| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines. |
| `pipeline_events` | boolean | false | Enable notifications for pipeline events. |
| `push_events` | boolean | false | Enable notifications for push events. |
| `tag_push_events` | boolean | false | Enable notifications for tag push events. |
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events. |
| `webhook` | string | yes | The Pumble webhook (for example, `https://api.pumble.com/workspaces/x/...`). |
| `branches_to_be_notified` | string | no | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default is `default`. |
| `confidential_issues_events` | boolean | no | Enable notifications for confidential issue events. |
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `issues_events` | boolean | no | Enable notifications for issue events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `note_events` | boolean | no | Enable notifications for note events. |
| `notify_only_broken_pipelines` | boolean | no | Send notifications for broken pipelines. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
### Disable Pumble
@ -1583,11 +1583,11 @@ 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 | yes | Your application key. |
| `user_key` | string | yes | Your user key. |
| `priority` | string | yes | The priority. |
| `device` | string | no | Leave blank for all active devices. |
| `sound` | string | no | The sound of the notification. |
### Disable Pushover
@ -1619,9 +1619,9 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `new_issue_url` | string | true | URL of the new issue. |
| `project_url` | string | true | URL of the project. |
| `issues_url` | string | true | URL of the issue. |
| `new_issue_url` | string | yes | URL of the new issue. |
| `project_url` | string | yes | URL of the project. |
| `issues_url` | string | yes | URL of the issue. |
### Disable Redmine
@ -1653,40 +1653,40 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `webhook` | string | true | Slack notifications webhook (for example, `https://hooks.slack.com/services/...`). |
| `username` | string | false | Slack notifications username. |
| `channel` | string | false | Default channel to use if no other channel is 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`. |
| `labels_to_be_notified` | string | false | Labels to send notifications for. Leave blank to receive notifications for all events. |
| `labels_to_be_notified_behavior` | string | false | Labels to be notified for. Valid options are `match_any` and `match_all`. The default value is `match_any`. |
| `alert_channel` | string | false | The name of the channel to receive notifications for alert events. |
| `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 notifications for confidential issue events. |
| `confidential_issues_events` | boolean | false | Enable notifications for confidential issue events. |
| `confidential_note_channel` | string | false | The name of the channel to receive notifications for confidential note events. |
| `confidential_note_events` | boolean | false | Enable notifications for confidential note events. |
| `deployment_channel` | string | false | The name of the channel to receive notifications for deployment events. |
| `deployment_events` | boolean | false | Enable notifications for deployment events. |
| `incident_channel` | string | false | The name of the channel to receive notifications for incident events. |
| `incidents_events` | boolean | false | Enable notifications for incident events. |
| `issue_channel` | string | false | The name of the channel to receive notifications for issue events. |
| `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 notifications for merge request events. |
| `merge_requests_events` | boolean | false | Enable notifications for merge request events. |
| `note_channel` | string | false | The name of the channel to receive notifications for note events. |
| `note_events` | boolean | false | Enable notifications for note events. |
| `pipeline_channel` | string | false | The name of the channel to receive notifications for pipeline events. |
| `pipeline_events` | boolean | false | Enable notifications for pipeline events. |
| `push_channel` | string | false | The name of the channel to receive notifications for push events. |
| `push_events` | boolean | false | Enable notifications for push events. |
| `tag_push_channel` | string | false | The name of the channel to receive notifications for tag push events. |
| `tag_push_events` | boolean | false | Enable notifications for tag push events. |
| `wiki_page_channel` | string | false | The name of the channel to receive notifications for wiki page events. |
| `wiki_page_events` | boolean | false | Enable notifications for wiki page events. |
| `webhook` | string | yes | Slack notifications webhook (for example, `https://hooks.slack.com/services/...`). |
| `username` | string | no | Slack notifications username. |
| `channel` | string | no | Default channel to use if no other channel is configured. |
| `notify_only_broken_pipelines` | boolean | no | Send notifications for broken pipelines. |
| `notify_only_default_branch` | boolean | no | **Deprecated:** This parameter has been replaced with `branches_to_be_notified`. |
| `branches_to_be_notified` | string | no | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. |
| `labels_to_be_notified` | string | no | Labels to send notifications for. Leave blank to receive notifications for all events. |
| `labels_to_be_notified_behavior` | string | no | Labels to be notified for. Valid options are `match_any` and `match_all`. The default value is `match_any`. |
| `alert_channel` | string | no | The name of the channel to receive notifications for alert events. |
| `alert_events` | boolean | no | Enable notifications for alert events. |
| `commit_events` | boolean | no | Enable notifications for commit events. |
| `confidential_issue_channel` | string | no | The name of the channel to receive notifications for confidential issue events. |
| `confidential_issues_events` | boolean | no | Enable notifications for confidential issue events. |
| `confidential_note_channel` | string | no | The name of the channel to receive notifications for confidential note events. |
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `deployment_channel` | string | no | The name of the channel to receive notifications for deployment events. |
| `deployment_events` | boolean | no | Enable notifications for deployment events. |
| `incident_channel` | string | no | The name of the channel to receive notifications for incident events. |
| `incidents_events` | boolean | no | Enable notifications for incident events. |
| `issue_channel` | string | no | The name of the channel to receive notifications for issue events. |
| `issues_events` | boolean | no | Enable notifications for issue events. |
| `job_events` | boolean | no | Enable notifications for job events. |
| `merge_request_channel` | string | no | The name of the channel to receive notifications for merge request events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `note_channel` | string | no | The name of the channel to receive notifications for note events. |
| `note_events` | boolean | no | Enable notifications for note events. |
| `pipeline_channel` | string | no | The name of the channel to receive notifications for pipeline events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `push_channel` | string | no | The name of the channel to receive notifications for push events. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `tag_push_channel` | string | no | The name of the channel to receive notifications for tag push events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `wiki_page_channel` | string | no | The name of the channel to receive notifications for wiki page events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
### Disable Slack notifications
@ -1810,21 +1810,21 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `hostname` | string | false | Custom hostname of the Telegram API ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/461313) in GitLab 17.1). The default value is `https://api.telegram.org`. |
| `token` | string | true | The Telegram bot token (for example, `123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11`). |
| `room` | string | true | Unique identifier for the target chat or the username of the target channel (in the format `@channelusername`). |
| `thread` | integer | false | Unique identifier for the target message thread (topic in a forum supergroup). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/441097) in GitLab 16.11. |
| `notify_only_broken_pipelines` | boolean | false | Send notifications for broken pipelines. |
| `branches_to_be_notified` | string | false | Branches to send notifications for ([introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134361) in GitLab 16.5). Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. |
| `push_events` | boolean | true | Enable notifications for push events. |
| `issues_events` | boolean | true | Enable notifications for issue events. |
| `confidential_issues_events` | boolean | true | Enable notifications for confidential issue events. |
| `merge_requests_events` | boolean | true | Enable notifications for merge request events. |
| `tag_push_events` | boolean | true | Enable notifications for tag push events. |
| `note_events` | boolean | true | Enable notifications for note events. |
| `confidential_note_events` | boolean | true | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | true | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | true | Enable notifications for wiki page events. |
| `hostname` | string | no | Custom hostname of the Telegram API ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/461313) in GitLab 17.1). The default value is `https://api.telegram.org`. |
| `token` | string | yes | The Telegram bot token (for example, `123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11`). |
| `room` | string | yes | Unique identifier for the target chat or the username of the target channel (in the format `@channelusername`). |
| `thread` | integer | no | Unique identifier for the target message thread (topic in a forum supergroup). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/441097) in GitLab 16.11. |
| `notify_only_broken_pipelines` | boolean | no | Send notifications for broken pipelines. |
| `branches_to_be_notified` | string | no | Branches to send notifications for ([introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134361) in GitLab 16.5). Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. |
| `push_events` | boolean | yes | Enable notifications for push events. |
| `issues_events` | boolean | yes | Enable notifications for issue events. |
| `confidential_issues_events` | boolean | yes | Enable notifications for confidential issue events. |
| `merge_requests_events` | boolean | yes | Enable notifications for merge request events. |
| `tag_push_events` | boolean | yes | Enable notifications for tag push events. |
| `note_events` | boolean | yes | Enable notifications for note events. |
| `confidential_note_events` | boolean | yes | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | yes | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | yes | Enable notifications for wiki page events. |
### Disable Telegram
@ -1856,18 +1856,18 @@ 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. |
| `webhook` | string | yes | The Unify Circuit webhook (for example, `https://circuit.com/rest/v2/webhooks/incoming/...`). |
| `notify_only_broken_pipelines` | boolean | no | Send notifications for broken pipelines. |
| `branches_to_be_notified` | string | no | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `issues_events` | boolean | no | Enable notifications for issue events. |
| `confidential_issues_events` | boolean | no | Enable notifications for confidential issue events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `note_events` | boolean | no | Enable notifications for note events. |
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
### Disable Unify Circuit
@ -1899,18 +1899,18 @@ 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. |
| `webhook` | string | yes | The Webex Teams webhook (for example, `https://api.ciscospark.com/v1/webhooks/incoming/...`). |
| `notify_only_broken_pipelines` | boolean | no | Send notifications for broken pipelines. |
| `branches_to_be_notified` | string | no | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `issues_events` | boolean | no | Enable notifications for issue events. |
| `confidential_issues_events` | boolean | no | Enable notifications for confidential issue events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `note_events` | boolean | no | Enable notifications for note events. |
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
### Disable Webex Teams
@ -1942,8 +1942,8 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `issues_url` | string | true | URL of the issue. |
| `project_url` | string | true | URL of the project. |
| `issues_url` | string | yes | URL of the issue. |
| `project_url` | string | yes | URL of the project. |
### Disable YouTrack

View File

@ -1,6 +1,6 @@
---
stage: Govern
group: Compliance
group: Authentication
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
---

View File

@ -120,6 +120,11 @@ verify_image:
- cosign verify "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" --certificate-identity "https://gitlab.com/my-group/my-project//path/to/.gitlab-ci.yml@refs/heads/main" --certificate-oidc-issuer "https://gitlab.com"
```
**Additional details**:
- The double backslash between the project path and the `.gitlab-ci.yml` path is not an error and is required for verification to succeed. A typical error when a single slash is used is `Error: none of the expected identities matched what was in the certificate, got subjects` followed by the signed URL which has two slashes between the project path and the `.gitlab-ci.yml` path.
- If the verification is happening in the same pipeline as the signing, then this path can be used: `"${CI_PROJECT_URL}//.gitlab-ci.yml@refs/heads/${CI_COMMIT_REF_NAME}"`
#### Build artifacts
The example below demonstrates how to verify a signed build artifact in GitLab CI. Verifying an artifact requires both
@ -136,6 +141,11 @@ verify_artifact:
- cosign verify-blob artifact.txt --bundle cosign.bundle --certificate-identity "https://gitlab.com/my-group/my-project//path/to/.gitlab-ci.yml@refs/heads/main" --certificate-oidc-issuer "https://gitlab.com"
```
**Additional details**:
- The double backslash between the project path and the `.gitlab-ci.yml` path is not an error and is required for verification to succeed. A typical error when a single slash is used is `Error: none of the expected identities matched what was in the certificate, got subjects` followed by the signed URL which has two slashes between the project path and the `.gitlab-ci.yml` path.
- If the verification is happening in the same pipeline as the signing, then this path can be used: `"${CI_PROJECT_URL}//.gitlab-ci.yml@refs/heads/${CI_COMMIT_REF_NAME}"`
## Use Sigstore and npm to generate keyless provenance
You can use Sigstore and npm, together with GitLab CI/CD, to digitally sign build artifacts without the overhead of key management.

View File

@ -6,211 +6,129 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Common Git commands
You can do many Git operations directly in GitLab. However, the command line is required for advanced tasks.
Learn more about the most commonly used Git commands.
## Convert a local directory into a repository
## `git blame`
You can initialize a local folder so Git tracks it as a repository.
1. Open the terminal in the directory you'd like to convert.
1. Run this command:
```shell
git init
```
A `.git` folder is created in your directory. This folder contains Git
records and configuration files. You should not edit these files
directly.
1. Add the [path to your remote repository](#add-a-remote)
so Git can upload your files into the correct project.
### Add a remote
You add a "remote" to tell Git which remote repository in GitLab is tied
to the specific local folder on your computer.
The remote tells Git where to push or pull from.
To add a remote to your local copy:
1. In GitLab, [create a project](../user/project/index.md) to hold your files.
1. Visit this project's homepage, scroll down to **Push an existing folder**, and copy the command that starts with `git remote add`.
1. On your computer, open the terminal in the directory you've initialized, paste the command you copied, and press <kbd>enter</kbd>:
```shell
git remote add origin git@gitlab.com:username/projectpath.git
```
### View your remote repositories
To view your remote repositories, type:
Use `git blame` to report which users changed which parts of a file.
```shell
git remote -v
git blame <file_name>
```
The `-v` flag stands for verbose.
You can use `git blame -L <line_start>, <line_end>` to check a only
specific range of lines.
## Download the latest changes in the project
To work on an up-to-date copy of the project, you `pull` to get all the changes made by users
since the last time you cloned or pulled the project. Replace `<name-of-branch>`
with either:
- The name of your [default branch](../user/project/repository/branches/default.md) to get the main branch code.
- The name of the branch you are working in.
For example, to check which user most recently modified line five of
`example.txt`:
```shell
git pull <REMOTE> <name-of-branch>
$ git blame -L 5, 5 example.txt
123abc (Zhang Wei 2021-07-04 12:23:04 +0000 5)
```
When you clone a repository, `REMOTE` is typically `origin`. The remote is where the
repository was cloned from, and it indicates the SSH or HTTPS URL of the repository
on the remote server. `<name-of-branch>` is usually the name of your
[default branch](../user/project/repository/branches/default.md), but it may be any
existing branch. You can create additional named remotes and branches as necessary.
## `git checkout`
You can learn more on how Git manages remote repositories in the
[Git Remote documentation](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes).
## Add another URL to a remote
Add another URL to a remote, so both remotes get updated on each push:
Use `git checkout` to switch to a specific branch.
```shell
git remote set-url --add <remote_name> <remote_url>
git checkout <branch_name>
```
## Display changes to Git references
To create a new branch and switch to it, use `git checkout -b <branch_name>`.
A Git **reference** is a name that points to a specific commit, or to another reference.
The reference `HEAD` is special. It usually points to a reference which points to the tip
of the current working branch:
## `git init`
Use `git init` to initialize a directory so Git tracks it as a repository.
```shell
git init
```
A `.git` file with configuration and log files is added to the
directory. You shouldn't edit the `.git` file directly.
The default branch is set to `master`. You can change the name of the
default branch with `git branch -m <branch_name>`, or initialize with
`git init -b <branch_name>`.
## `git pull`
Use `git pull` to get all the changes made by users since the last
time you cloned or pulled the project.
```shell
git pull <optional_remote> <branch_name>
```
## `git remote add`
Use `git remote add` to tell Git which remote repository in GitLab is
linked to a local directory.
```shell
git remote add <remote_name> <repository_url>
```
When you clone a repository, by default the source repository is
associated with the remote name `origin`.
## `git reflog`
To display a list of changes to the Git reference logs, use `git reflog`.
```shell
git reflog
```
By default, `git reflog` shows a list of changes to `HEAD`.
## `git log`
To display a list of commits in chronological order, use `git log`.
```shell
git log
```
## `git show`
To show information about an object in Git, use `git show`.
For example, to see what commit `HEAD` points to:
```shell
$ git show HEAD
commit ab123c (HEAD -> main, origin/main, origin/HEAD)
```
When a reference is changed in the local repository, Git records the change
in its **reference logs**. You can display the contents of the reference logs
if you need to find the old values of a reference. For example, you might want
to display the changes to `HEAD` to undo a change.
## `git merge`
To display the list of changes to `HEAD`:
To combine the changes from one branch with another, use `git merge`.
For example, to apply the changes in `feature_branch` to the `target_branch`:
```shell
git reflog
git checkout target_branch
git merge feature_branch
```
## Check the Git history of a file
## `git rebase`
The basic command to check the Git history of a file:
To rewrite the commit history of a branch, use `git rebase`.
You can use `git rebase` to resolve merge conflicts.
```shell
git log <file>
git rebase <branch_name>
```
If you get this error message:
In most cases, you want to rebase against the default branch.
```plaintext
fatal: ambiguous argument <file_name>: unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
```
## `git reset`
Use this to check the Git history of the file:
To undo a commit, use `git reset` to rewind the commit history and continue on from an earlier commit.
```shell
git log -- <file>
git reset
```
## Check the content of each change to a file
```shell
gitk <file>
```
## Delete changes
If want to undo your changes, you can use Git commands to go back to an earlier version of a repository.
Deleting changes is often an irreversible, destructive action. If
possible, you should add additional commits instead of reverting old
ones.
### Overwrite uncommitted changes
You can use `git checkout` as a shortcut to discard tracked,
uncommitted changes.
To discard all changes to tracked files:
```shell
git checkout .
```
Your changes are overwritten by the most recent commit in the branch.
Untracked files are not affected.
### Reset changes and commits
WARNING:
Do not reset a commit if you already pushed it to the remote
repository.
If you stage a change with `git add` and then decide not to commit it,
you might want to unstage the changes. To unstage a change:
- From your repository, run `git reset`.
If your changes have been committed (but not pushed to the remote
repository), you can reset your commits:
```shell
git reset HEAD~<number>
```
Here, `<number>` is the number of commits to undo.
For example, if you want to undo only the latest commit:
```shell
git reset HEAD~1
```
The commit is reset and any changes remain in the local repository.
To learn more about the different ways to undo changes, see the
[Git Undoing Things documentation](https://git-scm.com/book/en/v2/Git-Basics-Undoing-Things).
## Merge a branch with default branch
When you are ready to add your changes to
the default branch, you merge the feature branch into it:
```shell
git checkout <default-branch>
git merge <feature-branch>
```
In GitLab, you typically use a [merge request](../user/project/merge_requests/index.md) to merge your changes, instead of using the command line.
To create a merge request from a fork to an upstream repository, see the
[forking workflow](../user/project/repository/forking_workflow.md).
## Synchronize changes in a forked repository with the upstream
To create a copy of a repository in your namespace, you [fork it](../user/project/repository/forking_workflow.md).
Changes made to your copy of the repository are not automatically synchronized with the original.
To keep the project in sync with the original project, you need to `pull` from the original repository.
You must [create a link to the remote repository](#add-a-remote) to pull
changes from the original repository. It is common to call this remote repository the `upstream`.
You can now use the `upstream` as a [`<remote>` to `pull` new updates](#download-the-latest-changes-in-the-project)
from the original repository, and use the `origin`
to [push local changes](add-file.md#send-changes-to-gitlab) and create merge requests.
## Related topics
- [Git rebase and force push](../topics/git/git_rebase.md)

View File

@ -273,11 +273,6 @@ module QA
end
def fill_element(name, content)
# `click_element_coordinates` is used to ensure the element is focused.
# Without it, flakiness can occur on pages with GitLab keyboard shortcuts enabled,
# where certain keys trigger actions when typed elsewhere on the page.
click_element_coordinates(name)
find_element(name).set(content)
end

View File

@ -10,6 +10,7 @@ import { convertToGraphQLId } from '~/graphql_shared/utils';
import {
TOKEN_TYPE_AUTHOR,
TOKEN_TYPE_DRAFT,
TOKEN_TYPE_LABEL,
TOKEN_TYPE_MILESTONE,
TOKEN_TYPE_SOURCE_BRANCH,
TOKEN_TYPE_TARGET_BRANCH,
@ -39,6 +40,7 @@ function createComponent({ provide = {} } = {}) {
provide: {
fullPath: 'gitlab-org/gitlab',
hasAnyMergeRequests: true,
hasScopedLabelsFeature: false,
initialSort: '',
isPublicVisibilityRestricted: false,
isSignedIn: true,
@ -117,6 +119,7 @@ describe('Merge requests list app', () => {
{ type: TOKEN_TYPE_MILESTONE },
{ type: TOKEN_TYPE_TARGET_BRANCH },
{ type: TOKEN_TYPE_SOURCE_BRANCH },
{ type: TOKEN_TYPE_LABEL },
]);
});
});
@ -126,6 +129,7 @@ describe('Merge requests list app', () => {
assignee_username: 'bob',
reviewer_username: 'bill',
draft: 'yes',
'label_name[]': 'fluff',
milestone_title: 'milestone',
'target_branches[]': 'branch-a',
'source_branches[]': 'branch-b',
@ -163,6 +167,7 @@ describe('Merge requests list app', () => {
{ type: TOKEN_TYPE_MILESTONE },
{ type: TOKEN_TYPE_TARGET_BRANCH },
{ type: TOKEN_TYPE_SOURCE_BRANCH },
{ type: TOKEN_TYPE_LABEL },
]);
});
@ -171,6 +176,7 @@ describe('Merge requests list app', () => {
{ type: TOKEN_TYPE_ASSIGNEE },
{ type: TOKEN_TYPE_REVIEWER },
{ type: TOKEN_TYPE_DRAFT },
{ type: TOKEN_TYPE_LABEL },
{ type: TOKEN_TYPE_MILESTONE },
{ type: TOKEN_TYPE_TARGET_BRANCH },
{ type: TOKEN_TYPE_SOURCE_BRANCH },

View File

@ -605,4 +605,18 @@ RSpec.describe Banzai::Filter::References::IssueReferenceFilter, feature_categor
end
end
end
context 'checking N+1' do
let_it_be(:issue1) { create(:issue, project: project) }
let_it_be(:issue2) { create(:issue, project: project) }
it 'does not have N+1 per multiple references per project' do
single_reference = "Issue #{issue1.to_reference}"
multiple_references = "Issues #{issue1.to_reference} and #{issue2.to_reference}"
control = ActiveRecord::QueryRecorder.new { reference_filter(single_reference).to_html }
expect { reference_filter(multiple_references).to_html }.not_to exceed_query_limit(control)
end
end
end