Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2023-01-09 21:08:39 +00:00
parent 17deb2a503
commit d4b2ad25a5
252 changed files with 739 additions and 525 deletions

View File

@ -1,9 +1,19 @@
<script>
import { GlAlert, GlBadge, GlButton, GlLoadingIcon, GlTabs, GlTab } from '@gitlab/ui';
import {
GlAlert,
GlBadge,
GlButton,
GlLoadingIcon,
GlTabs,
GlTab,
GlSprintf,
GlLink,
} from '@gitlab/ui';
import { s__, sprintf } from '~/locale';
import { limitedCounterWithDelimiter } from '~/lib/utils/text_utility';
import { queryToObject } from '~/lib/utils/url_utility';
import deletePipelineScheduleMutation from '../graphql/mutations/delete_pipeline_schedule.mutation.graphql';
import playPipelineScheduleMutation from '../graphql/mutations/play_pipeline_schedule.mutation.graphql';
import takeOwnershipMutation from '../graphql/mutations/take_ownership.mutation.graphql';
import getPipelineSchedulesQuery from '../graphql/queries/get_pipeline_schedules.query.graphql';
import PipelineSchedulesTable from './table/pipeline_schedules_table.vue';
@ -16,11 +26,15 @@ export default {
scheduleDeleteError: s__(
'PipelineSchedules|There was a problem deleting the pipeline schedule.',
),
schedulePlayError: s__('PipelineSchedules|There was a problem playing the pipeline schedule.'),
takeOwnershipError: s__(
'PipelineSchedules|There was a problem taking ownership of the pipeline schedule.',
),
newSchedule: s__('PipelineSchedules|New schedule'),
deleteSuccess: s__('PipelineSchedules|Pipeline schedule successfully deleted.'),
playSuccess: s__(
'PipelineSchedules|Successfully scheduled a pipeline to run. Go to the %{linkStart}Pipelines page%{linkEnd} for details. ',
),
},
components: {
DeletePipelineScheduleModal,
@ -30,6 +44,8 @@ export default {
GlLoadingIcon,
GlTabs,
GlTab,
GlSprintf,
GlLink,
PipelineSchedulesTable,
TakeOwnershipModal,
},
@ -37,6 +53,9 @@ export default {
fullPath: {
default: '',
},
pipelinesPath: {
default: '',
},
},
apollo: {
schedules: {
@ -68,6 +87,7 @@ export default {
},
scope,
hasError: false,
playSuccess: false,
errorMessage: '',
scheduleId: null,
showDeleteModal: false,
@ -185,6 +205,27 @@ export default {
this.reportError(this.$options.i18n.takeOwnershipError);
}
},
async playPipelineSchedule(id) {
try {
const {
data: {
pipelineSchedulePlay: { errors },
},
} = await this.$apollo.mutate({
mutation: playPipelineScheduleMutation,
variables: { id },
});
if (errors.length > 0) {
throw new Error();
} else {
this.playSuccess = true;
}
} catch {
this.playSuccess = false;
this.reportError(this.$options.i18n.schedulePlayError);
}
},
fetchPipelineSchedulesByStatus(scope) {
this.scope = scope;
this.$apollo.queries.schedules.refetch();
@ -195,62 +236,69 @@ export default {
<template>
<div>
<gl-alert v-if="hasError" class="gl-mb-2" variant="danger" @dismiss="hasError = false">
<gl-alert v-if="hasError" class="gl-my-3" variant="danger" @dismiss="hasError = false">
{{ errorMessage }}
</gl-alert>
<template v-else>
<gl-tabs
sync-active-tab-with-query-params
query-param-name="scope"
nav-class="gl-flex-grow-1 gl-align-items-center"
>
<gl-tab
v-for="tab in tabs"
:key="tab.text"
:title-link-attributes="tab.attrs"
:query-param-value="tab.scope"
@click="fetchPipelineSchedulesByStatus(tab.scope)"
>
<template #title>
<span>{{ tab.text }}</span>
<template v-if="tab.showBadge">
<gl-loading-icon v-if="tab.scope === scope && isLoading" class="gl-ml-2" />
<gl-badge v-else-if="tab.count" size="sm" class="gl-tab-counter-badge">
{{ tab.count }}
</gl-badge>
</template>
</template>
<gl-loading-icon v-if="isLoading" size="lg" />
<pipeline-schedules-table
v-else
:schedules="schedules.list"
@showTakeOwnershipModal="setTakeOwnershipModal"
@showDeleteModal="setDeleteModal"
/>
</gl-tab>
<template #tabs-end>
<gl-button variant="confirm" class="gl-ml-auto" data-testid="new-schedule-button">
{{ $options.i18n.newSchedule }}
</gl-button>
<gl-alert v-if="playSuccess" class="gl-my-3" variant="info" @dismiss="playSuccess = false">
<gl-sprintf :message="$options.i18n.playSuccess">
<template #link="{ content }">
<gl-link :href="pipelinesPath" class="gl-text-decoration-none!">{{ content }}</gl-link>
</template>
</gl-tabs>
</gl-sprintf>
</gl-alert>
<take-ownership-modal
:visible="showTakeOwnershipModal"
@takeOwnership="takeOwnership"
@hideModal="hideModal"
/>
<gl-tabs
sync-active-tab-with-query-params
query-param-name="scope"
nav-class="gl-flex-grow-1 gl-align-items-center"
>
<gl-tab
v-for="tab in tabs"
:key="tab.text"
:title-link-attributes="tab.attrs"
:query-param-value="tab.scope"
@click="fetchPipelineSchedulesByStatus(tab.scope)"
>
<template #title>
<span>{{ tab.text }}</span>
<delete-pipeline-schedule-modal
:visible="showDeleteModal"
@deleteSchedule="deleteSchedule"
@hideModal="hideModal"
/>
</template>
<template v-if="tab.showBadge">
<gl-loading-icon v-if="tab.scope === scope && isLoading" class="gl-ml-2" />
<gl-badge v-else-if="tab.count" size="sm" class="gl-tab-counter-badge">
{{ tab.count }}
</gl-badge>
</template>
</template>
<gl-loading-icon v-if="isLoading" size="lg" />
<pipeline-schedules-table
v-else
:schedules="schedules.list"
@showTakeOwnershipModal="setTakeOwnershipModal"
@showDeleteModal="setDeleteModal"
@playPipelineSchedule="playPipelineSchedule"
/>
</gl-tab>
<template #tabs-end>
<gl-button variant="confirm" class="gl-ml-auto" data-testid="new-schedule-button">
{{ $options.i18n.newSchedule }}
</gl-button>
</template>
</gl-tabs>
<take-ownership-modal
:visible="showTakeOwnershipModal"
@takeOwnership="takeOwnership"
@hideModal="hideModal"
/>
<delete-pipeline-schedule-modal
:visible="showDeleteModal"
@deleteSchedule="deleteSchedule"
@hideModal="hideModal"
/>
</div>
</template>

View File

@ -44,7 +44,14 @@ export default {
<template>
<div class="gl-display-flex gl-justify-content-end">
<gl-button-group>
<gl-button v-if="canPlay" v-gl-tooltip :title="$options.i18n.playTooltip" icon="play" />
<gl-button
v-if="canPlay"
v-gl-tooltip
:title="$options.i18n.playTooltip"
icon="play"
data-testid="play-pipeline-schedule-btn"
@click="$emit('playPipelineSchedule', schedule.id)"
/>
<gl-button
v-if="canTakeOwnership"
v-gl-tooltip

View File

@ -96,6 +96,7 @@ export default {
:schedule="item"
@showTakeOwnershipModal="$emit('showTakeOwnershipModal', $event)"
@showDeleteModal="$emit('showDeleteModal', $event)"
@playPipelineSchedule="$emit('playPipelineSchedule', $event)"
/>
</template>
</gl-table-lite>

View File

@ -0,0 +1,6 @@
mutation playPipelineSchedule($id: CiPipelineScheduleID!) {
pipelineSchedulePlay(input: { id: $id }) {
clientMutationId
errors
}
}

View File

@ -18,7 +18,7 @@ export default () => {
return false;
}
const { fullPath } = containerEl.dataset;
const { fullPath, pipelinesPath } = containerEl.dataset;
return new Vue({
el: containerEl,
@ -26,6 +26,7 @@ export default () => {
apolloProvider,
provide: {
fullPath,
pipelinesPath,
},
render(createElement) {
return createElement(PipelineSchedules);

View File

@ -37,3 +37,14 @@
}
}
}
.approvers-select {
.dropdown-menu {
@include gl-w-full;
@include gl-max-w-none;
}
.gl-dropdown-item-check-icon {
@include gl-display-none;
}
}

View File

@ -9,7 +9,7 @@ class AutocompleteController < ApplicationController
feature_category :users, [:users, :user]
feature_category :projects, [:projects]
feature_category :team_planning, [:award_emojis]
feature_category :code_review, [:merge_request_target_branches]
feature_category :code_review_workflow, [:merge_request_target_branches]
feature_category :continuous_delivery, [:deploy_keys_with_owners]
urgency :low, [:merge_request_target_branches, :deploy_keys_with_owners, :users]

View File

@ -16,7 +16,7 @@ class DashboardController < Dashboard::ApplicationController
feature_category :users, [:activity]
feature_category :team_planning, [:issues, :issues_calendar]
feature_category :code_review, [:merge_requests]
feature_category :code_review_workflow, [:merge_requests]
urgency :low, [:merge_requests, :activity]
urgency :low, [:issues, :issues_calendar]

View File

@ -3,7 +3,7 @@
class Groups::AutocompleteSourcesController < Groups::ApplicationController
feature_category :subgroups, [:members]
feature_category :team_planning, [:issues, :labels, :milestones, :commands]
feature_category :code_review, [:merge_requests]
feature_category :code_review_workflow, [:merge_requests]
urgency :low, [:issues, :labels, :milestones, :commands, :merge_requests, :members]

View File

@ -55,7 +55,7 @@ class GroupsController < Groups::ApplicationController
]
feature_category :team_planning, [:issues, :issues_calendar, :preview_markdown]
feature_category :code_review, [:merge_requests, :unfoldered_environment_names]
feature_category :code_review_workflow, [:merge_requests, :unfoldered_environment_names]
feature_category :projects, [:projects]
feature_category :importers, [:export, :download_export]
urgency :low, [:export, :download_export]

View File

@ -306,7 +306,6 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
end
def persist_accepted_terms_if_required(user)
return unless Feature.enabled?(:update_oauth_registration_flow)
return unless user.persisted?
return unless Gitlab::CurrentSettings.current_application_settings.enforce_terms?

View File

@ -5,7 +5,7 @@ class Projects::AutocompleteSourcesController < Projects::ApplicationController
before_action :authorize_read_crm_contact!, only: :contacts
feature_category :team_planning, [:issues, :labels, :milestones, :commands, :contacts]
feature_category :code_review, [:merge_requests]
feature_category :code_review_workflow, [:merge_requests]
feature_category :users, [:members]
feature_category :source_code_management, [:snippets]

View File

@ -5,7 +5,7 @@ class Projects::MergeRequests::ApplicationController < Projects::ApplicationCont
before_action :merge_request
before_action :authorize_read_merge_request!
feature_category :code_review
feature_category :code_review_workflow
private

View File

@ -54,7 +54,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
after_action :log_merge_request_show, only: [:show, :diffs]
feature_category :code_review, [
feature_category :code_review_workflow, [
:assign_related_issues, :bulk_update, :cancel_auto_merge,
:commit_change_content, :commits, :context_commits, :destroy,
:discussions, :edit, :index, :merge, :rebase, :remove_wip,

View File

@ -4,6 +4,7 @@ module Projects
module Settings
class CiCdController < Projects::ApplicationController
include RunnerSetupScripts
include ZuoraCSP
NUMBER_OF_RUNNERS_PER_PAGE = 20

View File

@ -9,7 +9,7 @@ module Projects
before_action :present_project, only: [:edit]
before_action :authorize_admin_project!
feature_category :code_review
feature_category :code_review_workflow
def update
result = ::Projects::UpdateService.new(@project, current_user, project_params).execute

View File

@ -58,7 +58,7 @@ class ProjectsController < Projects::ApplicationController
feature_category :source_code_management, [:remove_fork, :housekeeping, :refs]
feature_category :team_planning, [:preview_markdown, :new_issuable_address]
feature_category :importers, [:export, :remove_export, :generate_new_export, :download_export]
feature_category :code_review, [:unfoldered_environment_names]
feature_category :code_review_workflow, [:unfoldered_environment_names]
feature_category :portfolio_management, [:planning_hierarchy]
urgency :low, [:export, :remove_export, :generate_new_export, :download_export]

View File

@ -10,7 +10,15 @@ module Resolvers
alias_method :project, :object
def resolve_with_lookahead(**args)
apply_lookahead(project.protected_branches)
protected_branches.map do |protected_branch|
::Projects::BranchRule.new(project, protected_branch)
end
end
private
def protected_branches
apply_lookahead(project.protected_branches.sorted_by_name)
end
end
end

View File

@ -5,7 +5,6 @@ module Types
class BranchRuleType < BaseObject
graphql_name 'BranchRule'
description 'List of branch rules for a project, grouped by branch name.'
accepts ::ProtectedBranch
authorize :read_protected_branch
alias_method :branch_rule, :object
@ -22,6 +21,12 @@ module Types
calls_gitaly: true,
description: "Check if this branch rule protects the project's default branch."
field :is_protected,
type: GraphQL::Types::Boolean,
null: false,
method: :protected?,
description: "Check if this branch rule protects access for the branch."
field :matching_branches_count,
type: GraphQL::Types::Int,
null: false,
@ -30,9 +35,8 @@ module Types
field :branch_protection,
type: Types::BranchRules::BranchProtectionType,
null: false,
description: 'Branch protections configured for this branch rule.',
method: :itself
null: true,
description: 'Branch protections configured for this branch rule.'
field :created_at,
Types::TimeType,
@ -43,10 +47,6 @@ module Types
Types::TimeType,
null: false,
description: 'Timestamp of when the branch rule was last updated.'
def matching_branches_count
branch_rule.matching(branch_rule.project.repository.branch_names).count
end
end
end
end

View File

@ -284,23 +284,38 @@ module EmailsHelper
end
def change_reviewer_notification_text(new_reviewers, previous_reviewers, html_tag = nil)
new = new_reviewers.any? ? users_to_sentence(new_reviewers) : s_('ChangeReviewer|Unassigned')
old = previous_reviewers.any? ? users_to_sentence(previous_reviewers) : nil
if html_tag.present?
new = content_tag(html_tag, new)
old = content_tag(html_tag, old) if old.present?
end
if old.present?
s_('ChangeReviewer|Reviewer changed from %{old} to %{new}').html_safe % { old: old, new: new }
if new_reviewers.empty?
s_('ChangeReviewer|All reviewers were removed.')
else
s_('ChangeReviewer|Reviewer changed to %{new}').html_safe % { new: new }
added_reviewers = new_reviewers - previous_reviewers
removed_reviewers = previous_reviewers - new_reviewers
added_reviewers_template_text = added_reviewers.size > 1 ? "were added as reviewers.<br>" : "was added as a reviewer.<br>"
removed_reviewers_template_text = removed_reviewers.size > 1 ? "were removed from reviewers." : "was removed from reviewers."
added = format_reviewers_string(added_reviewers, html_tag)
removed = format_reviewers_string(removed_reviewers, html_tag)
added_reviewers_text = added ? "#{added} #{added_reviewers_template_text}".html_safe : ''
removed_reviewers_text = removed ? "#{removed} #{removed_reviewers_template_text}".html_safe : ''
s_('ChangeReviewer|%{added_reviewers_text}%{removed_reviewers_text}').html_safe % { added_reviewers_text: added_reviewers_text, removed_reviewers_text: removed_reviewers_text }
end
end
private
def format_reviewers_string(reviewers, html_tag = nil)
return unless reviewers.any?
formatted_reviewers = users_to_sentence(reviewers)
if html_tag.present?
content_tag(html_tag, formatted_reviewers)
else
formatted_reviewers
end
end
def users_to_sentence(users)
sanitize_name(users.map(&:name).to_sentence)
end

View File

@ -0,0 +1,32 @@
# frozen_string_literal: true
module Projects
class BranchRule
extend Forwardable
attr_reader :project, :protected_branch
def_delegators(:protected_branch, :name, :group, :default_branch?, :created_at, :updated_at)
def initialize(project, protected_branch)
@protected_branch = protected_branch
@project = project
end
def protected?
true
end
def matching_branches_count
branch_names = project.repository.branch_names
matching_branches = protected_branch.matching(branch_names)
matching_branches.count
end
def branch_protection
protected_branch
end
end
end
Projects::BranchRule.prepend_mod

View File

@ -8,11 +8,9 @@ class ProtectedBranch < ApplicationRecord
validate :validate_either_project_or_top_group
scope :requiring_code_owner_approval,
-> { where(code_owner_approval_required: true) }
scope :allowing_force_push,
-> { where(allow_force_push: true) }
scope :requiring_code_owner_approval, -> { where(code_owner_approval_required: true) }
scope :allowing_force_push, -> { where(allow_force_push: true) }
scope :sorted_by_name, -> { order(name: :asc) }
protected_ref_access_levels :merge, :push

View File

@ -69,7 +69,7 @@ class User < ApplicationRecord
attribute :hide_no_password, default: false
attribute :project_view, default: :files
attribute :notified_of_own_activity, default: false
attribute :preferred_language, default: -> { I18n.default_locale }
attribute :preferred_language, default: -> { Gitlab::CurrentSettings.default_preferred_language }
attribute :theme_id, default: -> { gitlab_config.default_theme }
attr_encrypted :otp_secret,
@ -541,9 +541,7 @@ class User < ApplicationRecord
strip_attributes! :name
def preferred_language
read_attribute('preferred_language') ||
I18n.default_locale.to_s.presence_in(Gitlab::I18n.available_locales) ||
default_preferred_language
read_attribute('preferred_language').presence || Gitlab::CurrentSettings.default_preferred_language
end
def active_for_authentication?
@ -2227,11 +2225,6 @@ class User < ApplicationRecord
otp_backup_codes.first.start_with?("$pbkdf2-sha512$")
end
# To enable JiHu repository to modify the default language options
def default_preferred_language
'en'
end
# rubocop: disable CodeReuse/ServiceClass
def add_primary_email_to_emails!
Emails::CreateService.new(self, user: self, email: self.email).execute(confirmed_at: self.confirmed_at)

View File

@ -0,0 +1,8 @@
# frozen_string_literal: true
module Projects
class BranchRulePolicy < ::ProtectedBranchPolicy
end
end
Projects::BranchRulePolicy.prepend_mod

View File

@ -18,7 +18,6 @@ module Boards
# TODO: eliminate need for SQL literal fragment
columns = Arel.sql(fields.values_at(*keys).join(', '))
results = item_model.where(id: collection_ids)
results = query_additions(results, required_fields)
results = results.select(columns)
Hash[keys.zip(results.pluck(columns).flatten)]
@ -27,11 +26,6 @@ module Boards
private
# override if needed
def query_additions(items, required_fields)
items
end
def collection_ids
@collection_ids ||= init_collection.select(item_model.arel_table[:id])
end

View File

@ -2,8 +2,14 @@
module Integrations
module ProjectTestData
NoDataError = Class.new(ArgumentError)
private
def no_data_error(msg)
raise NoDataError, msg
end
def push_events_data
Gitlab::DataBuilder::Push.build_sample(project, current_user)
end
@ -11,7 +17,7 @@ module Integrations
def note_events_data
note = NotesFinder.new(current_user, project: project, target: project, sort: 'id_desc').execute.first
return { error: s_('TestHooks|Ensure the project has notes.') } unless note.present?
no_data_error(s_('TestHooks|Ensure the project has notes.')) unless note.present?
Gitlab::DataBuilder::Note.build(note, current_user)
end
@ -19,7 +25,7 @@ module Integrations
def issues_events_data
issue = IssuesFinder.new(current_user, project_id: project.id, sort: 'created_desc').execute.first
return { error: s_('TestHooks|Ensure the project has issues.') } unless issue.present?
no_data_error(s_('TestHooks|Ensure the project has issues.')) unless issue.present?
issue.to_hook_data(current_user)
end
@ -27,7 +33,7 @@ module Integrations
def merge_requests_events_data
merge_request = MergeRequestsFinder.new(current_user, project_id: project.id, sort: 'created_desc').execute.first
return { error: s_('TestHooks|Ensure the project has merge requests.') } unless merge_request.present?
no_data_error(s_('TestHooks|Ensure the project has merge requests.')) unless merge_request.present?
merge_request.to_hook_data(current_user)
end
@ -35,7 +41,7 @@ module Integrations
def job_events_data
build = Ci::JobsFinder.new(current_user: current_user, project: project).execute.first
return { error: s_('TestHooks|Ensure the project has CI jobs.') } unless build.present?
no_data_error(s_('TestHooks|Ensure the project has CI jobs.')) unless build.present?
Gitlab::DataBuilder::Build.build(build)
end
@ -43,7 +49,7 @@ module Integrations
def pipeline_events_data
pipeline = Ci::PipelinesFinder.new(project, current_user, order_by: 'id', sort: 'desc').execute.first
return { error: s_('TestHooks|Ensure the project has CI pipelines.') } unless pipeline.present?
no_data_error(s_('TestHooks|Ensure the project has CI pipelines.')) unless pipeline.present?
Gitlab::DataBuilder::Pipeline.build(pipeline)
end
@ -51,9 +57,7 @@ module Integrations
def wiki_page_events_data
page = project.wiki.list_pages(limit: 1).first
if !project.wiki_enabled? || page.blank?
return { error: s_('TestHooks|Ensure the wiki is enabled and has pages.') }
end
no_data_error(s_('TestHooks|Ensure the wiki is enabled and has pages.')) if !project.wiki_enabled? || page.blank?
Gitlab::DataBuilder::WikiPage.build(page, current_user, 'create')
end
@ -61,7 +65,7 @@ module Integrations
def deployment_events_data
deployment = DeploymentsFinder.new(project: project, order_by: 'created_at', sort: 'desc').execute.first
return { error: s_('TestHooks|Ensure the project has deployments.') } unless deployment.present?
no_data_error(s_('TestHooks|Ensure the project has deployments.')) unless deployment.present?
Gitlab::DataBuilder::Deployment.build(deployment, deployment.status, Time.current)
end
@ -69,7 +73,7 @@ module Integrations
def releases_events_data
release = ReleasesFinder.new(project, current_user, order_by: :created_at, sort: :desc).execute.first
return { error: s_('TestHooks|Ensure the project has releases.') } unless release.present?
no_data_error(s_('TestHooks|Ensure the project has releases.')) unless release.present?
release.to_hook_data('create')
end

View File

@ -21,9 +21,9 @@ module Integrations
return error('Testing not available for this event')
end
return error(data[:error]) if data[:error].present?
integration.test(data)
rescue ArgumentError => e
error(e.message)
end
private

View File

@ -16,9 +16,16 @@ module TestHooks
trigger_key = hook.class.triggers.key(trigger.to_sym)
return error('Testing not available for this hook') if trigger_key.nil? || data.blank?
return error(data[:error]) if data[:error].present?
hook.execute(data, trigger_key, force: true)
rescue ArgumentError => e
error(e.message)
end
def error(message)
ServiceResponse.error(message: message)
end
end
end

View File

@ -1,4 +1,4 @@
- register_omniauth_params = Feature.enabled?(:update_oauth_registration_flow) ? { intent: :register } : {}
- register_omniauth_params = { intent: :register }
- if Feature.enabled?(:restyle_login_page, @project)
.gl-text-center.gl-pt-5
%label.gl-font-weight-normal

View File

@ -6,7 +6,7 @@
#pipeline-schedules-callout{ data: { docs_url: help_page_path('ci/pipelines/schedules'), illustration_url: image_path('illustrations/pipeline_schedule_callout.svg') } }
- if Feature.enabled?(:pipeline_schedules_vue, @project)
#pipeline-schedules-app{ data: { full_path: @project.full_path } }
#pipeline-schedules-app{ data: { full_path: @project.full_path, pipelines_path: project_pipelines_path(@project) } }
- else
.top-area
- schedule_path_proc = ->(scope) { pipeline_schedules_path(@project, scope: scope) }

View File

@ -698,7 +698,7 @@
:tags: []
- :name: cronjob:remove_unreferenced_lfs_objects
:worker_name: RemoveUnreferencedLfsObjectsWorker
:feature_category: :git_lfs
:feature_category: :source_code_management
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@ -725,7 +725,7 @@
:tags: []
- :name: cronjob:schedule_merge_request_cleanup_refs
:worker_name: ScheduleMergeRequestCleanupRefsWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@ -734,7 +734,7 @@
:tags: []
- :name: cronjob:schedule_migrate_external_diffs
:worker_name: ScheduleMigrateExternalDiffsWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@ -779,7 +779,7 @@
:tags: []
- :name: cronjob:stuck_merge_jobs
:worker_name: StuckMergeJobsWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@ -2345,7 +2345,7 @@
:tags: []
- :name: create_note_diff_file
:worker_name: CreateNoteDiffFileWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@ -2363,7 +2363,7 @@
:tags: []
- :name: delete_diff_files
:worker_name: DeleteDiffFilesWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@ -2750,7 +2750,7 @@
:tags: []
- :name: merge_request_cleanup_refs
:worker_name: MergeRequestCleanupRefsWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@ -2759,7 +2759,7 @@
:tags: []
- :name: merge_request_mergeability_check
:worker_name: MergeRequestMergeabilityCheckWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@ -2768,7 +2768,7 @@
:tags: []
- :name: merge_requests_close_issue
:worker_name: MergeRequests::CloseIssueWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: true
:urgency: :low
:resource_boundary: :unknown
@ -2777,7 +2777,7 @@
:tags: []
- :name: merge_requests_create_approval_event
:worker_name: MergeRequests::CreateApprovalEventWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@ -2786,7 +2786,7 @@
:tags: []
- :name: merge_requests_create_approval_note
:worker_name: MergeRequests::CreateApprovalNoteWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@ -2804,7 +2804,7 @@
:tags: []
- :name: merge_requests_execute_approval_hooks
:worker_name: MergeRequests::ExecuteApprovalHooksWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: true
:urgency: :low
:resource_boundary: :unknown
@ -2813,7 +2813,7 @@
:tags: []
- :name: merge_requests_handle_assignees_change
:worker_name: MergeRequests::HandleAssigneesChangeWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :high
:resource_boundary: :unknown
@ -2822,7 +2822,7 @@
:tags: []
- :name: merge_requests_resolve_todos
:worker_name: MergeRequests::ResolveTodosWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :high
:resource_boundary: :unknown
@ -2831,7 +2831,7 @@
:tags: []
- :name: merge_requests_resolve_todos_after_approval
:worker_name: MergeRequests::ResolveTodosAfterApprovalWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@ -2840,7 +2840,7 @@
:tags: []
- :name: merge_requests_update_head_pipeline
:worker_name: MergeRequests::UpdateHeadPipelineWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :high
:resource_boundary: :cpu
@ -2867,7 +2867,7 @@
:tags: []
- :name: migrate_external_diffs
:worker_name: MigrateExternalDiffsWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@ -2903,7 +2903,7 @@
:tags: []
- :name: new_merge_request
:worker_name: NewMergeRequestWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :high
:resource_boundary: :cpu
@ -3362,7 +3362,7 @@
:tags: []
- :name: update_merge_requests
:worker_name: UpdateMergeRequestsWorker
:feature_category: :code_review
:feature_category: :code_review_workflow
:has_external_dependencies: false
:urgency: :high
:resource_boundary: :cpu

View File

@ -7,7 +7,7 @@ class CreateNoteDiffFileWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: 3
feature_category :code_review
feature_category :code_review_workflow
def perform(diff_note_id)
return unless diff_note_id.present?

View File

@ -7,7 +7,7 @@ class DeleteDiffFilesWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: 3
feature_category :code_review
feature_category :code_review_workflow
# rubocop: disable CodeReuse/ActiveRecord
def perform(merge_request_diff_id)

View File

@ -9,7 +9,7 @@ class MergeRequestCleanupRefsWorker
sidekiq_options retry: 3
feature_category :code_review
feature_category :code_review_workflow
idempotent!
# Hard-coded to 4 for now. Will be configurable later on via application settings.

View File

@ -7,7 +7,7 @@ class MergeRequestMergeabilityCheckWorker
sidekiq_options retry: 3
feature_category :code_review
feature_category :code_review_workflow
idempotent!
def logger

View File

@ -5,7 +5,7 @@ module MergeRequests
include ApplicationWorker
data_consistency :always
feature_category :code_review
feature_category :code_review_workflow
urgency :low
idempotent!

View File

@ -5,7 +5,7 @@ module MergeRequests
include Gitlab::EventStore::Subscriber
data_consistency :always
feature_category :code_review
feature_category :code_review_workflow
urgency :low
idempotent!

View File

@ -5,7 +5,7 @@ module MergeRequests
include Gitlab::EventStore::Subscriber
data_consistency :always
feature_category :code_review
feature_category :code_review_workflow
urgency :low
idempotent!

View File

@ -5,7 +5,7 @@ module MergeRequests
include Gitlab::EventStore::Subscriber
data_consistency :always
feature_category :code_review
feature_category :code_review_workflow
urgency :low
idempotent!

View File

@ -7,7 +7,7 @@ class MergeRequests::HandleAssigneesChangeWorker
sidekiq_options retry: 3
feature_category :code_review
feature_category :code_review_workflow
urgency :high
deduplicate :until_executed
idempotent!

View File

@ -5,7 +5,7 @@ module MergeRequests
include Gitlab::EventStore::Subscriber
data_consistency :always
feature_category :code_review
feature_category :code_review_workflow
urgency :low
idempotent!

View File

@ -7,7 +7,7 @@ class MergeRequests::ResolveTodosWorker
sidekiq_options retry: 3
feature_category :code_review
feature_category :code_review_workflow
urgency :high
deduplicate :until_executed
idempotent!

View File

@ -4,7 +4,7 @@ module MergeRequests
class UpdateHeadPipelineWorker
include Gitlab::EventStore::Subscriber
feature_category :code_review
feature_category :code_review_workflow
urgency :high
worker_resource_boundary :cpu
data_consistency :always

View File

@ -7,7 +7,7 @@ class MigrateExternalDiffsWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: 3
feature_category :code_review
feature_category :code_review_workflow
def perform(merge_request_diff_id)
diff = MergeRequestDiff.find_by_id(merge_request_diff_id)

View File

@ -8,7 +8,7 @@ class NewMergeRequestWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: 3
include NewIssuable
feature_category :code_review
feature_category :code_review_workflow
urgency :high
worker_resource_boundary :cpu
weight 2

View File

@ -10,7 +10,7 @@ class RemoveUnreferencedLfsObjectsWorker
include CronjobQueue
# rubocop:enable Scalability/CronWorkerContext
feature_category :git_lfs
feature_category :source_code_management
deduplicate :until_executed
idempotent!

View File

@ -7,7 +7,7 @@ class ScheduleMergeRequestCleanupRefsWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :code_review
feature_category :code_review_workflow
idempotent!
def perform

View File

@ -13,7 +13,7 @@ class ScheduleMigrateExternalDiffsWorker # rubocop:disable Scalability/Idempoten
include Gitlab::ExclusiveLeaseHelpers
feature_category :code_review
feature_category :code_review_workflow
def perform
in_lock(self.class.name.underscore, ttl: 2.hours, retries: 0) do

View File

@ -7,7 +7,7 @@ class StuckMergeJobsWorker # rubocop:disable Scalability/IdempotentWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :code_review
feature_category :code_review_workflow
def self.logger
Gitlab::AppLogger

View File

@ -7,7 +7,7 @@ class UpdateMergeRequestsWorker # rubocop:disable Scalability/IdempotentWorker
sidekiq_options retry: 3
feature_category :code_review
feature_category :code_review_workflow
urgency :high
worker_resource_boundary :cpu
weight 3

View File

@ -9,6 +9,7 @@
---
- advanced_deployments
- advisory_database
- api
- api_security
- application_instrumentation
- application_performance
@ -24,7 +25,7 @@
- cloud_native_installation
- cluster_cost_management
- code_quality
- code_review
- code_review_workflow
- code_search
- code_suggestions
- code_testing
@ -53,7 +54,6 @@
- disaster_recovery
- dora_metrics
- dynamic_application_security_testing
- editor_extension
- environment_management
- error_budgets
- error_tracking
@ -64,12 +64,11 @@
- feature_flags
- five_minute_production_app
- fulfillment_admin_tooling
- fulfillment_developer_productivity
- fulfillment_infrastructure
- fuzz_testing
- geo_replication
- git_lfs
- gitaly
- gitlab_cli
- global_search
- helm_chart_registry
- importers
@ -82,7 +81,6 @@
- intel_code_security
- interactive_application_security_testing
- internationalization
- jenkins_importer
- kubernetes_management
- license_compliance
- logging
@ -141,5 +139,6 @@
- value_stream_management
- vulnerability_management
- web_ide
- webhooks
- wiki
- workflow_automation

View File

@ -1,8 +0,0 @@
---
name: update_oauth_registration_flow
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/85871
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/364342
milestone: '15.2'
type: development
group: group::acquisition
default_enabled: false

View File

@ -2,7 +2,7 @@
table_name: approval_merge_request_rules_approved_approvers
classes: []
feature_categories:
- code_review
- code_review_workflow
description: Join table for approved approvers and ApprovalMergeRequestRule
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/8497
milestone: '11.7'

View File

@ -3,7 +3,7 @@ table_name: approver_groups
classes:
- ApproverGroup
feature_categories:
- code_review
- code_review_workflow
- source_code_management
description: Group approvers of given merge request
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/743

View File

@ -3,7 +3,7 @@ table_name: approvers
classes:
- Approver
feature_categories:
- code_review
- code_review_workflow
- source_code_management
description: Approvers of given merge request
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/3cc78d89984d9c9df8372c52b7bba38e6226f9f2

View File

@ -3,7 +3,7 @@ table_name: draft_notes
classes:
- DraftNote
feature_categories:
- code_review
- code_review_workflow
- source_code_management
description: Notes created during the review of an MR that are not yet published
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/4213

View File

@ -3,7 +3,7 @@ table_name: lfs_file_locks
classes:
- LfsFileLock
feature_categories:
- git_lfs
- source_code_management
description: File locks for LFS objects
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/4091
milestone: '10.5'

View File

@ -3,7 +3,7 @@ table_name: lfs_object_states
classes:
- Geo::LfsObjectState
feature_categories:
- git_lfs
- source_code_management
description: Geo verification states for LFS objects
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63981
milestone: '14.6'

View File

@ -3,7 +3,7 @@ table_name: lfs_objects
classes:
- LfsObject
feature_categories:
- git_lfs
- source_code_management
description: LFS files
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/1727
milestone: '8.2'

View File

@ -3,7 +3,6 @@ table_name: lfs_objects_projects
classes:
- LfsObjectsProject
feature_categories:
- git_lfs
- source_code_management
description: Join table relating lfs_objects and projects
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/1727

View File

@ -3,7 +3,7 @@ table_name: merge_request_assignees
classes:
- MergeRequestAssignee
feature_categories:
- code_review
- code_review_workflow
description: Store allocated assignees for merge requests
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/26496
milestone: '11.10'

View File

@ -3,7 +3,7 @@ table_name: merge_request_cleanup_schedules
classes:
- MergeRequest::CleanupSchedule
feature_categories:
- code_review
- code_review_workflow
description: Store refs cleanup schedules for merge requests
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46758
milestone: '13.6'

View File

@ -3,7 +3,7 @@ table_name: merge_request_context_commit_diff_files
classes:
- MergeRequestContextCommitDiffFile
feature_categories:
- code_review
- code_review_workflow
description: Stores diffs data for merge request context commits
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23701
milestone: '12.8'

View File

@ -3,7 +3,7 @@ table_name: merge_request_context_commits
classes:
- MergeRequestContextCommit
feature_categories:
- code_review
- code_review_workflow
description: Store context commit related data for merge requests
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23701
milestone: '12.8'

View File

@ -3,7 +3,7 @@ table_name: merge_request_diff_commit_users
classes:
- MergeRequest::DiffCommitUser
feature_categories:
- code_review
- code_review_workflow
description: Store commit user information for merge request diffs
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63669
milestone: '14.1'

View File

@ -3,7 +3,7 @@ table_name: merge_request_diff_commits
classes:
- MergeRequestDiffCommit
feature_categories:
- code_review
- code_review_workflow
description: Store commit related information within a merge request diff
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/12527
milestone: '9.4'

View File

@ -3,7 +3,7 @@ table_name: merge_request_diff_files
classes:
- MergeRequestDiffFile
feature_categories:
- code_review
- code_review_workflow
description: Store file related information within a merge request diff
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/12047
milestone: '9.4'

View File

@ -3,7 +3,7 @@ table_name: merge_request_diffs
classes:
- MergeRequestDiff
feature_categories:
- code_review
- code_review_workflow
description: Store information about the changes made within a git push for a merge request
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/c983e8eb3d9cac01090b8657735544f71f891576
milestone: '6.6'

View File

@ -4,7 +4,7 @@ classes:
- MergeRequest::Metrics
feature_categories:
- value_stream_management
- code_review
- code_review_workflow
description: Store various metrics for merge requests.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/5986
milestone: '8.12'

View File

@ -3,7 +3,7 @@ table_name: merge_request_reviewers
classes:
- MergeRequestReviewer
feature_categories:
- code_review
- code_review_workflow
description: Store allocated reviewers for merge requests
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40358
milestone: '13.4'

View File

@ -3,7 +3,7 @@ table_name: merge_requests
classes:
- MergeRequest
feature_categories:
- code_review
- code_review_workflow
description: This is the main table that stores information about project merge requests.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/6d460aa2d6b3959593c168eed181516036525393
milestone: "<6.0"

View File

@ -3,7 +3,7 @@ table_name: merge_requests_closing_issues
classes:
- MergeRequestsClosingIssues
feature_categories:
- code_review
- code_review_workflow
description: Store the events of merge request closing any issues
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/5986
milestone: '8.12'

View File

@ -3,7 +3,7 @@ table_name: note_diff_files
classes:
- NoteDiffFile
feature_categories:
- code_review
- code_review_workflow
description: Persisted truncated note diffs
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/18991
milestone: '11.0'

View File

@ -12,7 +12,7 @@ classes:
- SyntheticNote
- WeightNote
feature_categories:
- code_review
- code_review_workflow
- portfolio_management
- service_desk
- source_code_management

View File

@ -3,7 +3,7 @@ table_name: reviews
classes:
- Review
feature_categories:
- code_review
- code_review_workflow
description: TODO
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/8442
milestone: '11.6'

View File

@ -3,7 +3,7 @@ table_name: suggestions
classes:
- Suggestion
feature_categories:
- code_review
- code_review_workflow
description: Storing code suggestions within notes
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/8656
milestone: '11.6'

View File

@ -3,7 +3,7 @@ table_name: uploads
classes:
- Upload
feature_categories:
- code_review
- code_review_workflow
- design_management
- importers
- portfolio_management

View File

@ -10860,10 +10860,11 @@ List of branch rules for a project, grouped by branch name.
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="branchruleapprovalrules"></a>`approvalRules` | [`ApprovalProjectRuleConnection`](#approvalprojectruleconnection) | Merge request approval rules configured for this branch rule. (see [Connections](#connections)) |
| <a id="branchrulebranchprotection"></a>`branchProtection` | [`BranchProtection!`](#branchprotection) | Branch protections configured for this branch rule. |
| <a id="branchrulebranchprotection"></a>`branchProtection` | [`BranchProtection`](#branchprotection) | Branch protections configured for this branch rule. |
| <a id="branchrulecreatedat"></a>`createdAt` | [`Time!`](#time) | Timestamp of when the branch rule was created. |
| <a id="branchruleexternalstatuschecks"></a>`externalStatusChecks` | [`ExternalStatusCheckConnection`](#externalstatuscheckconnection) | External status checks configured for this branch rule. (see [Connections](#connections)) |
| <a id="branchruleisdefault"></a>`isDefault` | [`Boolean!`](#boolean) | Check if this branch rule protects the project's default branch. |
| <a id="branchruleisprotected"></a>`isProtected` | [`Boolean!`](#boolean) | Check if this branch rule protects access for the branch. |
| <a id="branchrulematchingbranchescount"></a>`matchingBranchesCount` | [`Int!`](#int) | Number of existing branches that match this branch rule. |
| <a id="branchrulename"></a>`name` | [`String!`](#string) | Branch name, with wildcards, for the branch rules. |
| <a id="branchruleupdatedat"></a>`updatedAt` | [`Time!`](#time) | Timestamp of when the branch rule was last updated. |

View File

@ -66,7 +66,7 @@ Gitlab::Metrics::Sli::Apdex.initialize_sli(:received_email, [
email_type: :service_desk
},
{
feature_category: :code_review,
feature_category: :code_review_workflow,
email_type: :create_merge_request
}
])

View File

@ -115,7 +115,7 @@ second argument:
```ruby
class DashboardController < ApplicationController
feature_category :team_planning, [:issues, :issues_calendar]
feature_category :code_review, [:merge_requests]
feature_category :code_review_workflow, [:merge_requests]
end
```

View File

@ -204,6 +204,8 @@ To enable security training for vulnerabilities in your project:
1. On the tab bar, select **Vulnerability Management**.
1. To enable a security training provider, turn on the toggle.
Security training uses content from third-party vendors. You must have an internet connection to use this feature.
## View security training for a vulnerability
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/6176) in GitLab 14.9.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -90,38 +90,23 @@ You don't need to construct these lines manually. Instead, you can:
## Upload a file
The ability to create a file is great when the content is text. However, this
doesn't work well for binary data such as images, PDFs, or other binary file types. In
this case, you need to upload a file.
To upload a binary file in the Web Editor:
From a project's files page, select the '+' button to the right of the branch
selector. Choose **Upload file** from the dropdown:
![Upload file dropdown list](img/web_editor_upload_file_dropdown_v14_1.png)
After the upload dialog pops up, there are two ways to upload your file. Either
drag and drop a file on the popup or use the **click to upload** link. After you
select a file to upload, a file preview displays.
Enter a commit message, choose a branch, and select **Upload file** when you are
ready.
![Upload file dialog](img/web_editor_upload_file_dialog_v14_1.png)
1. On the top bar, select **Main menu > Projects** and find your project.
1. On the project page, next to the branch name, select the plus icon (**{plus}**).
1. From the dropdown list, select **Upload file**.
1. Complete the fields. To create a merge request with the uploaded file, ensure the **Start a new merge request with these changes** toggle is turned on.
1. Select **Upload file**.
## Create a directory
To keep files in the repository organized it is often helpful to create a new
directory.
To create a directory in the Web Editor:
From a project's files page, select the plus button (`+`) to the right of the branch selector.
Choose **New directory** from the dropdown.
![New directory dropdown list](img/web_editor_new_directory_dropdown_v14_1.png)
In the new directory dialog, enter a directory name, a commit message, and choose
the target branch. Select **Create directory** to finish.
![New directory dialog](img/web_editor_new_directory_dialog_v14_1.png)
1. On the top bar, select **Main menu > Projects** and find your project.
1. On the project page, next to the branch name, select the plus icon (**{plus}**).
1. From the dropdown list, select **New directory**.
1. Complete the fields. To create a merge request with the new directory, ensure the **Start a new merge request with these changes** toggle is turned on.
1. Select **Create directory**.
## Create a new branch
@ -209,24 +194,16 @@ modify files.
![New push widget](img/web_editor_new_push_widget.png)
## Create a new tag
## Create a tag
Tags help you mark major milestones such as production releases and
release candidates. You can create a tag from a branch or a commit
SHA:
You can create tags to mark milestones such as production releases and
release candidates. To create a tag in the Web Editor:
1. From a project's files page, choose **New tag** from the dropdown list.
![New tag dropdown list](img/web_editor_new_tag_dropdown.png)
1. Give the tag a name such as `v1.0.0`.
1. Choose the branch or SHA from which you want to create this new tag.
1. Optional. Add a message and release notes. The release notes section supports
Markdown format.
1. Optional. Upload an attachment.
1. Select **Create tag**. GitLab redirects you to the tag list page.
![New tag page](img/web_editor_new_tag_page.png)
1. On the top bar, select **Main menu > Projects** and find your project.
1. On the project page, next to the branch name, select the plus icon (**{plus}**).
1. From the dropdown list, select **New tag**.
1. Complete the fields. From the **Create from** dropdown list, select an existing branch, tag, or commit SHA.
1. Select **Create tag**.
## Tips

View File

@ -6,7 +6,7 @@ module API
def self.awardables
[
{ type: 'issue', resource: :projects, find_by: :iid, feature_category: :team_planning },
{ type: 'merge_request', resource: :projects, find_by: :iid, feature_category: :code_review },
{ type: 'merge_request', resource: :projects, find_by: :iid, feature_category: :code_review_workflow },
{ type: 'snippet', resource: :projects, find_by: :id, feature_category: :source_code_management }
]
end

View File

@ -9,8 +9,8 @@ module API
{
Issue => :team_planning,
Snippet => :source_code_management,
MergeRequest => :code_review,
Commit => :code_review
MergeRequest => :code_review_workflow,
Commit => :code_review_workflow
}
end
end

View File

@ -8,7 +8,7 @@ module API
def self.feature_category_per_noteable_type
{
Issue => :team_planning,
MergeRequest => :code_review,
MergeRequest => :code_review_workflow,
Snippet => :source_code_management
}
end

View File

@ -7,7 +7,7 @@ module API
# This is a method instead of a constant, allowing EE to more easily extend it.
{
Issue => { feature_category: :team_planning, id_field: 'IID' },
MergeRequest => { feature_category: :code_review, id_field: 'IID' }
MergeRequest => { feature_category: :code_review_workflow, id_field: 'IID' }
}
end
end

View File

@ -7,7 +7,7 @@ module API
before { authenticate! }
feature_category :code_review
feature_category :code_review_workflow
params do
requires :id, types: [String, Integer], desc: 'The ID or URL-encoded path of the project'

View File

@ -13,7 +13,7 @@ module API
# These endpoints are defined in `TimeTrackingEndpoints` and is shared by
# API::Issues. In order to be able to define the feature category of these
# endpoints, we need to define them at the top-level by route.
feature_category :code_review, [
feature_category :code_review_workflow, [
'/projects/:id/merge_requests/:merge_request_iid/time_estimate',
'/projects/:id/merge_requests/:merge_request_iid/reset_time_estimate',
'/projects/:id/merge_requests/:merge_request_iid/add_spent_time',
@ -138,7 +138,7 @@ module API
use :merge_requests_params
use :optional_scope_param
end
get feature_category: :code_review, urgency: :low do
get feature_category: :code_review_workflow, urgency: :low do
authenticate! unless params[:scope] == 'all'
validate_anonymous_search_access! if params[:search].present?
validate_search_rate_limit! if declared_params[:search].present?
@ -168,7 +168,7 @@ module API
default: true,
desc: 'Returns merge requests from non archived projects only.'
end
get ":id/merge_requests", feature_category: :code_review, urgency: :low do
get ":id/merge_requests", feature_category: :code_review_workflow, urgency: :low do
validate_anonymous_search_access! if declared_params[:search].present?
validate_search_rate_limit! if declared_params[:search].present?
merge_requests = find_merge_requests(group_id: user_group.id, include_subgroups: true)
@ -235,7 +235,7 @@ module API
desc: 'Returns the request having the given `iid`.',
documentation: { is_array: true }
end
get ":id/merge_requests", feature_category: :code_review, urgency: :low do
get ":id/merge_requests", feature_category: :code_review_workflow, urgency: :low do
authorize! :read_merge_request, user_project
validate_anonymous_search_access! if declared_params[:search].present?
validate_search_rate_limit! if declared_params[:search].present?
@ -281,7 +281,7 @@ module API
desc: 'The target project of the merge request defaults to the :id of the project.'
use :optional_params
end
post ":id/merge_requests", feature_category: :code_review, urgency: :low do
post ":id/merge_requests", feature_category: :code_review_workflow, urgency: :low do
Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/20770')
authorize! :create_merge_request_from, user_project
@ -309,7 +309,7 @@ module API
params do
requires :merge_request_iid, type: Integer, desc: 'The internal ID of the merge request.'
end
delete ":id/merge_requests/:merge_request_iid", feature_category: :code_review, urgency: :low do
delete ":id/merge_requests/:merge_request_iid", feature_category: :code_review_workflow, urgency: :low do
merge_request = find_project_merge_request(params[:merge_request_iid])
authorize!(:destroy_merge_request, merge_request)
@ -334,7 +334,7 @@ module API
]
tags %w[merge_requests]
end
get ':id/merge_requests/:merge_request_iid', feature_category: :code_review, urgency: :low do
get ':id/merge_requests/:merge_request_iid', feature_category: :code_review_workflow, urgency: :low do
merge_request = find_merge_request_with_access(params[:merge_request_iid])
present merge_request,
@ -355,7 +355,7 @@ module API
]
tags %w[merge_requests]
end
get ':id/merge_requests/:merge_request_iid/participants', feature_category: :code_review, urgency: :low do
get ':id/merge_requests/:merge_request_iid/participants', feature_category: :code_review_workflow, urgency: :low do
merge_request = find_merge_request_with_access(params[:merge_request_iid])
participants = ::Kaminari.paginate_array(merge_request.visible_participants(current_user))
@ -371,7 +371,7 @@ module API
]
tags %w[merge_requests]
end
get ':id/merge_requests/:merge_request_iid/reviewers', feature_category: :code_review, urgency: :low do
get ':id/merge_requests/:merge_request_iid/reviewers', feature_category: :code_review_workflow, urgency: :low do
merge_request = find_merge_request_with_access(params[:merge_request_iid])
reviewers = ::Kaminari.paginate_array(merge_request.merge_request_reviewers)
@ -387,7 +387,7 @@ module API
]
tags %w[merge_requests]
end
get ':id/merge_requests/:merge_request_iid/commits', feature_category: :code_review, urgency: :low do
get ':id/merge_requests/:merge_request_iid/commits', feature_category: :code_review_workflow, urgency: :low do
merge_request = find_merge_request_with_access(params[:merge_request_iid])
commits =
@ -405,7 +405,7 @@ module API
]
tags %w[merge_requests]
end
get ':id/merge_requests/:merge_request_iid/context_commits', feature_category: :code_review, urgency: :high do
get ':id/merge_requests/:merge_request_iid/context_commits', feature_category: :code_review_workflow, urgency: :high do
merge_request = find_merge_request_with_access(params[:merge_request_iid])
context_commits =
paginate(merge_request.merge_request_context_commits).map(&:to_commit)
@ -429,7 +429,7 @@ module API
]
tags %w[merge_requests]
end
post ':id/merge_requests/:merge_request_iid/context_commits', feature_category: :code_review do
post ':id/merge_requests/:merge_request_iid/context_commits', feature_category: :code_review_workflow do
commit_ids = params[:commits]
if commit_ids.size > CONTEXT_COMMITS_POST_LIMIT
@ -466,7 +466,7 @@ module API
]
tags %w[merge_requests]
end
delete ':id/merge_requests/:merge_request_iid/context_commits', feature_category: :code_review do
delete ':id/merge_requests/:merge_request_iid/context_commits', feature_category: :code_review_workflow do
commit_ids = params[:commits]
merge_request = find_merge_request_with_access(params[:merge_request_iid])
@ -490,7 +490,7 @@ module API
]
tags %w[merge_requests]
end
get ':id/merge_requests/:merge_request_iid/changes', feature_category: :code_review, urgency: :low do
get ':id/merge_requests/:merge_request_iid/changes', feature_category: :code_review_workflow, urgency: :low do
merge_request = find_merge_request_with_access(params[:merge_request_iid])
present merge_request,
@ -512,7 +512,7 @@ module API
params do
use :pagination
end
get ':id/merge_requests/:merge_request_iid/diffs', feature_category: :code_review, urgency: :low do
get ':id/merge_requests/:merge_request_iid/diffs', feature_category: :code_review_workflow, urgency: :low do
merge_request = find_merge_request_with_access(params[:merge_request_iid])
present paginate(merge_request.merge_request_diff.paginated_diffs(params[:page], params[:per_page])).diffs, with: Entities::Diff
@ -580,7 +580,7 @@ module API
use :optional_params
at_least_one_of(*::API::MergeRequests.update_params_at_least_one_of)
end
put ':id/merge_requests/:merge_request_iid', feature_category: :code_review, urgency: :low do
put ':id/merge_requests/:merge_request_iid', feature_category: :code_review_workflow, urgency: :low do
Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/20772')
merge_request = find_merge_request_with_access(params.delete(:merge_request_iid), :update_merge_request)
@ -622,7 +622,7 @@ module API
optional :sha, type: String, desc: 'If present, then this SHA must match the HEAD of the source branch, otherwise the merge fails.'
optional :squash, type: Grape::API::Boolean, desc: 'If `true`, the commits are squashed into a single commit on merge.'
end
put ':id/merge_requests/:merge_request_iid/merge', feature_category: :code_review, urgency: :low do
put ':id/merge_requests/:merge_request_iid/merge', feature_category: :code_review_workflow, urgency: :low do
Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/4796')
merge_request = find_project_merge_request(params[:merge_request_iid])
@ -673,7 +673,7 @@ module API
]
tags %w[merge_requests]
end
get ':id/merge_requests/:merge_request_iid/merge_ref', feature_category: :code_review do
get ':id/merge_requests/:merge_request_iid/merge_ref', feature_category: :code_review_workflow do
merge_request = find_project_merge_request(params[:merge_request_iid])
result = ::MergeRequests::MergeabilityCheckService.new(merge_request).execute(recheck: true)
@ -696,7 +696,7 @@ module API
]
tags %w[merge_requests]
end
post ':id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds', feature_category: :code_review do
post ':id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds', feature_category: :code_review_workflow do
merge_request = find_project_merge_request(params[:merge_request_iid])
unauthorized! unless merge_request.can_cancel_auto_merge?(current_user)
@ -716,7 +716,7 @@ module API
params do
optional :skip_ci, type: Boolean, desc: 'Set to true to skip creating a CI pipeline.'
end
put ':id/merge_requests/:merge_request_iid/rebase', feature_category: :code_review, urgency: :low do
put ':id/merge_requests/:merge_request_iid/rebase', feature_category: :code_review_workflow, urgency: :low do
merge_request = find_project_merge_request(params[:merge_request_iid])
authorize_merge_request_rebase!(merge_request)
@ -739,7 +739,7 @@ module API
params do
use :pagination
end
get ':id/merge_requests/:merge_request_iid/closes_issues', feature_category: :code_review, urgency: :low do
get ':id/merge_requests/:merge_request_iid/closes_issues', feature_category: :code_review_workflow, urgency: :low do
merge_request = find_merge_request_with_access(params[:merge_request_iid])
issues = ::Kaminari.paginate_array(merge_request.visible_closing_issues_for(current_user))
issues = paginate(issues)

View File

@ -11,7 +11,7 @@ module API
{
Issue => :team_planning,
MergeRequest => :code_review
MergeRequest => :code_review_workflow
}.each do |eventable_type, feature_category|
parent_type = eventable_type.parent_class.to_s.underscore
eventables_str = eventable_type.to_s.underscore.pluralize

View File

@ -15,7 +15,7 @@ module API
entity: Entities::MergeRequest,
source: Project,
finder: ->(id) { find_merge_request_with_access(id, :update_merge_request) },
feature_category: :code_review
feature_category: :code_review_workflow
},
{
type: 'issues',

View File

@ -4,7 +4,7 @@ module API
class Suggestions < ::API::Base
before { authenticate! }
feature_category :code_review
feature_category :code_review_workflow
resource :suggestions do
desc 'Apply suggestion patch in the Merge Request it was created' do

View File

@ -137,6 +137,7 @@ included_attributes:
ci_cd_settings:
- :group_runners_enabled
- :runner_token_expiration_interval
- :default_git_depth
metrics_setting:
- :dashboard_timezone
- :external_dashboard_url
@ -719,7 +720,6 @@ included_attributes:
- :feature_flags_access_level
- :releases_access_level
- :infrastructure_access_level
- :allow_merge_on_skipped_pipeline
- :auto_devops_deploy_strategy
- :auto_devops_enabled
- :container_registry_enabled
@ -728,13 +728,14 @@ included_attributes:
- :merge_method
- :merge_requests_enabled
- :snippets_enabled
- :squash_option
- :topics
- :visibility
- :wiki_enabled
- :build_git_strategy
- :build_enabled
- :security_and_compliance_enabled
- :allow_merge_on_skipped_pipeline
- :squash_option
resource_milestone_events:
- :user_id
- :action
@ -1072,6 +1073,9 @@ excluded_attributes:
- :sequence
methods:
project:
- :allow_merge_on_skipped_pipeline
- :squash_option
notes:
- :type
labels:
@ -1180,6 +1184,7 @@ ee:
- :reject_unsigned_commits
- :commit_committer_check
- :regexp_uses_re2
- :reject_non_dco_commits
unprotect_access_levels:
- :access_level
- :user_id

View File

@ -23,7 +23,7 @@ module Gitlab
# with an explosion in unused metric combinations, but we want the
# most common ones to be always present.
FEATURE_CATEGORIES_TO_INITIALIZE = ['authentication_and_authorization',
'code_review', 'continuous_integration',
'code_review_workflow', 'continuous_integration',
'not_owned', 'source_code_management',
FEATURE_CATEGORY_DEFAULT].freeze

View File

@ -8069,13 +8069,10 @@ msgstr ""
msgid "Change your password or recover your current one"
msgstr ""
msgid "ChangeReviewer|Reviewer changed from %{old} to %{new}"
msgid "ChangeReviewer|%{added_reviewers_text}%{removed_reviewers_text}"
msgstr ""
msgid "ChangeReviewer|Reviewer changed to %{new}"
msgstr ""
msgid "ChangeReviewer|Unassigned"
msgid "ChangeReviewer|All reviewers were removed."
msgstr ""
msgid "ChangeTypeAction|Cherry-pick"
@ -30567,6 +30564,9 @@ msgstr ""
msgid "PipelineSchedules|Save pipeline schedule"
msgstr ""
msgid "PipelineSchedules|Successfully scheduled a pipeline to run. Go to the %{linkStart}Pipelines page%{linkEnd} for details. "
msgstr ""
msgid "PipelineSchedules|Successfully taken ownership from %{owner}."
msgstr ""
@ -30585,6 +30585,9 @@ msgstr ""
msgid "PipelineSchedules|There was a problem fetching pipeline schedules."
msgstr ""
msgid "PipelineSchedules|There was a problem playing the pipeline schedule."
msgstr ""
msgid "PipelineSchedules|There was a problem taking ownership of the pipeline schedule."
msgstr ""

Some files were not shown because too many files have changed in this diff Show More