Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-12-05 21:34:09 +00:00
parent e0391a09d4
commit 97f7f0df56
24 changed files with 256 additions and 198 deletions

View File

@ -398,7 +398,7 @@ gem 'gitlab-schema-validation', path: 'gems/gitlab-schema-validation' # rubocop:
gem 'gitlab-http', path: 'gems/gitlab-http' # rubocop:todo Gemfile/MissingFeatureCategory
gem 'premailer-rails', '~> 1.12.0', feature_category: :notifications
gem 'gitlab-labkit', '~> 0.36.0', feature_category: :shared
gem 'gitlab-labkit', '~> 0.37.0', feature_category: :shared
gem 'thrift', '>= 0.16.0' # rubocop:todo Gemfile/MissingFeatureCategory
# I18n

View File

@ -232,7 +232,7 @@
{"name":"gitlab-glfm-markdown","version":"0.0.21","platform":"x86_64-darwin","checksum":"8425ee27e0b32b75619e08e1700c1302297b44928adc19a026bea243c96363f5"},
{"name":"gitlab-glfm-markdown","version":"0.0.21","platform":"x86_64-linux","checksum":"9ea7d7a7a20c15960839521459a82edab787a4d8475ee412beba8362aa5fcd71"},
{"name":"gitlab-kas-grpc","version":"17.5.1","platform":"ruby","checksum":"88639bfaa9301d78a7fbff696ec262ed696a15a6f41c1b51bffe6b39c7a61ca7"},
{"name":"gitlab-labkit","version":"0.36.1","platform":"ruby","checksum":"04fb6941b7e5fc1fdcee8f9971fa2086a4dc442e39e67a74b992403dd580c300"},
{"name":"gitlab-labkit","version":"0.37.0","platform":"ruby","checksum":"d2dd0a60db2149a9a8eebf2975dc23f54ac3ceb01bdba732eb1b26b86dfffa70"},
{"name":"gitlab-license","version":"2.6.0","platform":"ruby","checksum":"2c1f8ae73835640ec77bf758c1d0c9730635043c01cf77902f7976e826d7d016"},
{"name":"gitlab-mail_room","version":"0.0.25","platform":"ruby","checksum":"223ce7c3c0797b6015eaa37147884e6ddc7be9a7ee90a424358c96bc18613b1a"},
{"name":"gitlab-markup","version":"1.9.0","platform":"ruby","checksum":"7eda045a08ec2d110084252fa13a8c9eac8bdac0e302035ca7db4b82bcbd7ed4"},

View File

@ -749,13 +749,13 @@ GEM
rb_sys (= 0.9.94)
gitlab-kas-grpc (17.5.1)
grpc (~> 1.0)
gitlab-labkit (0.36.1)
actionpack (>= 5.0.0, < 8.0.0)
activesupport (>= 5.0.0, < 8.0.0)
gitlab-labkit (0.37.0)
actionpack (>= 5.0.0, < 8.1.0)
activesupport (>= 5.0.0, < 8.1.0)
grpc (>= 1.62)
jaeger-client (~> 1.1.0)
opentracing (~> 0.4)
pg_query (>= 4.2.3, < 6.0)
pg_query (>= 5.1.0, < 7.0)
redis (> 3.0.0, < 6.0.0)
gitlab-license (2.6.0)
gitlab-mail_room (0.0.25)
@ -2077,7 +2077,7 @@ DEPENDENCIES
gitlab-housekeeper!
gitlab-http!
gitlab-kas-grpc (~> 17.5.0)
gitlab-labkit (~> 0.36.0)
gitlab-labkit (~> 0.37.0)
gitlab-license (~> 2.6)
gitlab-mail_room (~> 0.0.24)
gitlab-markup (~> 1.9.0)

View File

@ -233,7 +233,7 @@
{"name":"gitlab-glfm-markdown","version":"0.0.21","platform":"x86_64-darwin","checksum":"8425ee27e0b32b75619e08e1700c1302297b44928adc19a026bea243c96363f5"},
{"name":"gitlab-glfm-markdown","version":"0.0.21","platform":"x86_64-linux","checksum":"9ea7d7a7a20c15960839521459a82edab787a4d8475ee412beba8362aa5fcd71"},
{"name":"gitlab-kas-grpc","version":"17.5.1","platform":"ruby","checksum":"88639bfaa9301d78a7fbff696ec262ed696a15a6f41c1b51bffe6b39c7a61ca7"},
{"name":"gitlab-labkit","version":"0.36.1","platform":"ruby","checksum":"04fb6941b7e5fc1fdcee8f9971fa2086a4dc442e39e67a74b992403dd580c300"},
{"name":"gitlab-labkit","version":"0.37.0","platform":"ruby","checksum":"d2dd0a60db2149a9a8eebf2975dc23f54ac3ceb01bdba732eb1b26b86dfffa70"},
{"name":"gitlab-license","version":"2.6.0","platform":"ruby","checksum":"2c1f8ae73835640ec77bf758c1d0c9730635043c01cf77902f7976e826d7d016"},
{"name":"gitlab-mail_room","version":"0.0.25","platform":"ruby","checksum":"223ce7c3c0797b6015eaa37147884e6ddc7be9a7ee90a424358c96bc18613b1a"},
{"name":"gitlab-markup","version":"1.9.0","platform":"ruby","checksum":"7eda045a08ec2d110084252fa13a8c9eac8bdac0e302035ca7db4b82bcbd7ed4"},

View File

@ -759,13 +759,13 @@ GEM
rb_sys (= 0.9.94)
gitlab-kas-grpc (17.5.1)
grpc (~> 1.0)
gitlab-labkit (0.36.1)
actionpack (>= 5.0.0, < 8.0.0)
activesupport (>= 5.0.0, < 8.0.0)
gitlab-labkit (0.37.0)
actionpack (>= 5.0.0, < 8.1.0)
activesupport (>= 5.0.0, < 8.1.0)
grpc (>= 1.62)
jaeger-client (~> 1.1.0)
opentracing (~> 0.4)
pg_query (>= 4.2.3, < 6.0)
pg_query (>= 5.1.0, < 7.0)
redis (> 3.0.0, < 6.0.0)
gitlab-license (2.6.0)
gitlab-mail_room (0.0.25)
@ -2105,7 +2105,7 @@ DEPENDENCIES
gitlab-housekeeper!
gitlab-http!
gitlab-kas-grpc (~> 17.5.0)
gitlab-labkit (~> 0.36.0)
gitlab-labkit (~> 0.37.0)
gitlab-license (~> 2.6)
gitlab-mail_room (~> 0.0.24)
gitlab-markup (~> 1.9.0)

View File

@ -212,12 +212,11 @@ if (tableContentsEl) {
});
}
const treeHistoryLinkEl = document.getElementById('js-commit-history-link');
if (treeHistoryLinkEl) {
const { historyLink } = treeHistoryLinkEl.dataset;
const initTreeHistoryLinkApp = (el) => {
const { historyLink } = el.dataset;
// eslint-disable-next-line no-new
new Vue({
el: treeHistoryLinkEl,
el,
router: new VueRouter({ mode: 'history' }),
render(h) {
const url = generateHistoryUrl(
@ -231,10 +230,17 @@ if (treeHistoryLinkEl) {
attrs: {
href: url.href,
category: 'tertiary',
class: 'gl-ml-4',
},
},
[__('History')],
);
},
});
};
const treeHistoryLinkEl = document.getElementById('js-commit-history-link');
if (treeHistoryLinkEl) {
initTreeHistoryLinkApp(treeHistoryLinkEl);
}

View File

@ -26,7 +26,6 @@ export default {
i18n: {
findFile: __('Find file'),
blame: __('Blame'),
history: __('History'),
permalink: __('Permalink'),
permalinkTooltip: __('Go to permalink'),
errorMessage: __('An error occurred while loading the blob controls.'),
@ -177,15 +176,6 @@ export default {
{{ $options.i18n.blame }}
</gl-button>
<gl-button
data-testid="history"
:href="blobInfo.historyPath"
:class="$options.buttonClassList"
class="sm:gl-hidden"
>
{{ $options.i18n.history }}
</gl-button>
<gl-button
v-gl-tooltip.html="permalinkTooltip"
:aria-keyshortcuts="permalinkShortcutKey"

View File

@ -62,20 +62,6 @@
.btn {
white-space: nowrap;
@include btn-default;
@include gl-button-theme(
$color: var(--gl-button-default-primary-foreground-color-default),
$background-color: var(--gl-button-default-primary-background-color-default),
$border-color: var(--gl-button-default-primary-border-color-default),
$hover-color: var(--gl-button-default-primary-foreground-color-hover),
$hover-background-color: var(--gl-button-default-primary-background-color-hover),
$hover-border-color: var(--gl-button-default-primary-border-color-hover),
$focus-color: var(--gl-button-default-primary-foreground-color-focus),
$focus-background-color: var(--gl-button-default-primary-background-color-focus),
$focus-border-color: var(--gl-button-default-primary-border-color-focus),
$active-color: var(--gl-button-default-primary-foreground-color-active),
$active-background-color: var(--gl-button-default-primary-background-color-active),
$active-border-color: var(--gl-button-default-primary-border-color-active),
);
&:focus:active {
outline: 0;
@ -87,23 +73,6 @@
}
}
&.btn-danger.btn-danger {
@include gl-button-theme(
$color: var(--gl-button-danger-primary-foreground-color-default),
$background-color: var(--gl-button-danger-primary-background-color-default),
$border-color: var(--gl-button-danger-primary-border-color-default),
$hover-color: var(--gl-button-danger-primary-foreground-color-hover),
$hover-background-color: var(--gl-button-danger-primary-background-color-hover),
$hover-border-color: var(--gl-button-danger-primary-border-color-hover),
$focus-color: var(--gl-button-danger-primary-foreground-color-focus),
$focus-background-color: var(--gl-button-danger-primary-background-color-focus),
$focus-border-color: var(--gl-button-danger-primary-border-color-focus),
$active-color: var(--gl-button-danger-primary-foreground-color-active),
$active-background-color: var(--gl-button-danger-primary-background-color-active),
$active-border-color: var(--gl-button-danger-primary-border-color-active),
);
}
&.btn-grouped {
@include btn-with-margin;
}
@ -140,6 +109,47 @@
}
}
/**
* Use `gl-button-theme` mixin from GitLab UI to apply same styles to
* <button class="btn"> and <button class="btn btn-danger"> as GlButton.
* Use `:not(.gl-button)` selector to avoid overriding GlButton usage.
* Use `.btn-danger.btn-danger` double selector to increase specificity
* against Bootstrap default .btn-danger styles for hover/focus states.
*/
.btn:not(.gl-button) {
@include gl-button-theme(
$color: var(--gl-button-default-primary-foreground-color-default),
$background-color: var(--gl-button-default-primary-background-color-default),
$border-color: var(--gl-button-default-primary-border-color-default),
$hover-color: var(--gl-button-default-primary-foreground-color-hover),
$hover-background-color: var(--gl-button-default-primary-background-color-hover),
$hover-border-color: var(--gl-button-default-primary-border-color-hover),
$focus-color: var(--gl-button-default-primary-foreground-color-focus),
$focus-background-color: var(--gl-button-default-primary-background-color-focus),
$focus-border-color: var(--gl-button-default-primary-border-color-focus),
$active-color: var(--gl-button-default-primary-foreground-color-active),
$active-background-color: var(--gl-button-default-primary-background-color-active),
$active-border-color: var(--gl-button-default-primary-border-color-active),
);
&.btn-danger.btn-danger {
@include gl-button-theme(
$color: var(--gl-button-danger-primary-foreground-color-default),
$background-color: var(--gl-button-danger-primary-background-color-default),
$border-color: var(--gl-button-danger-primary-border-color-default),
$hover-color: var(--gl-button-danger-primary-foreground-color-hover),
$hover-background-color: var(--gl-button-danger-primary-background-color-hover),
$hover-border-color: var(--gl-button-danger-primary-border-color-hover),
$focus-color: var(--gl-button-danger-primary-foreground-color-focus),
$focus-background-color: var(--gl-button-danger-primary-background-color-focus),
$focus-border-color: var(--gl-button-danger-primary-border-color-focus),
$active-color: var(--gl-button-danger-primary-foreground-color-active),
$active-background-color: var(--gl-button-danger-primary-background-color-active),
$active-border-color: var(--gl-button-danger-primary-border-color-active),
);
}
}
.input-group-prepend,
.input-group-append {
.btn {

View File

@ -82,9 +82,14 @@ module Mutations
end
def validate(merge_request, merge_service, merge_params)
skipped_checks = merge_request.skipped_mergeable_checks(
auto_merge_requested: merge_params.key?(:auto_merge_strategy),
auto_merge_strategy: merge_params[:auto_merge_strategy]
)
if merge_request.auto_merge_enabled?
ALREADY_SCHEDULED
elsif !merge_request.mergeable?(skip_ci_check: merge_params.key?(:auto_merge_strategy))
elsif !merge_request.mergeable?(**skipped_checks)
NOT_MERGEABLE
elsif !merge_service.hooks_validation_pass?(merge_request)
HOOKS_VALIDATION_ERROR

View File

@ -14,14 +14,15 @@
- if project.forked?
#js-fork-info{ data: vue_fork_divergence_data(project, ref) }
.info-well.gl-hidden.sm:gl-block
.info-well
.well-segment
%ul.blob-commit-info
= render 'projects/commits/commit', commit: @last_commit, project: @project, ref: @ref, show_legacy_ci_icon: false, show_history_button: true
= render 'projects/commits/commit', commit: @last_commit, project: @project, ref: @ref, show_legacy_ci_icon: false, is_blob_page: true
- if project.licensed_feature_available?(:code_owners)
#js-code-owners{ data: { blob_path: blob.path, project_path: @project.full_path, branch: @ref, can_view_branch_rules: can_view_branch_rules?, branch_rules_path: branch_rules_path } }
= render "projects/blob/auxiliary_viewer", blob: blob, ref: @ref
.gl-hidden.sm:gl-block
- if project.licensed_feature_available?(:code_owners)
#js-code-owners{ data: { blob_path: blob.path, project_path: @project.full_path, branch: @ref, can_view_branch_rules: can_view_branch_rules?, branch_rules_path: branch_rules_path } }
= render "projects/blob/auxiliary_viewer", blob: blob, ref: @ref
#blob-content-holder.blob-content-holder.js-per-page{ data: { blame_per_page: Gitlab::Git::BlamePagination::PAGINATION_PER_PAGE } }
- if @code_navigation_path

View File

@ -26,9 +26,6 @@
- else
= link_button_to _('Blame'), project_blame_path(@project, @id, ref_type: @ref_type), data: { event_tracking: 'click_blame_control_on_blob_page' }, class: 'js-blob-blame-link' unless blob.empty?
.gl-block.sm:gl-hidden.gl-w-full
= link_button_to _('History'), project_commits_path(@project, @id, ref_type: @ref_type), data: { event_tracking: 'click_history_control_on_blob_page' }
- permalink_description = _('Go to permalink')
- permalink_shortcut = 'y'
- permalink_title = "#{permalink_description} <kbd class='flat ml-1' aria-hidden=true>#{permalink_shortcut}</kbd>"

View File

@ -16,7 +16,7 @@
- commit = commit.present(current_user: current_user)
- commit_status = commit.detailed_status_for(ref)
- show_legacy_ci_icon = local_assigns.fetch(:show_legacy_ci_icon, true)
- show_history_button = local_assigns.fetch(:show_history_button, false)
- is_blob_page = local_assigns.fetch(:is_blob_page, false)
- tags = commit.tags_for_display
- collapsible = local_assigns.fetch(:collapsible, true)
- link_data_attrs = local_assigns.fetch(:link_data_attrs, {})
@ -26,66 +26,70 @@
- add_page_specific_style 'page_bundles/commit_description'
%li{ class: ["commit flex-row", ("js-toggle-container" if collapsible)], id: "commit-#{commit.short_id}" }
.gl-self-start.gl-hidden.sm:gl-block
= author_avatar(commit, size: 32, has_tooltip: false)
%div{ class: ["gl-self-start", is_blob_page ? "gl-block": "gl-hidden sm:gl-block"] }
= author_avatar(commit, size: 32, has_tooltip: false, css_class: 'gl-inline-block')
.commit-detail.flex-list.gl-flex.gl-justify-between.gl-items-start.gl-grow.gl-min-w-0
.commit-detail.flex-list.gl-flex.gl-justify-between.gl-items-start.gl-grow.gl-min-w-0.gl-mb-3
.commit-content{ data: { testid: 'commit-content' } }
- if view_details && merge_request
= link_to commit.title, project_commit_path(project, commit.id, merge_request_iid: merge_request.iid), class: ["commit-row-message item-title js-onboarding-commit-item", ("font-italic" if commit.message.empty?)], data: link_data_attrs
- else
= link_to_markdown_field(commit, :title, link, class: "commit-row-message item-title js-onboarding-commit-item #{'font-italic' if commit.message.empty?}", data: link_data_attrs)
%span.commit-row-message.d-inline.d-sm-none
&middot;
= commit.short_id
- if commit.description? && collapsible
= render Pajamas::ButtonComponent.new(icon: 'ellipsis_h',
button_options: { class: 'button-ellipsis-horizontal js-toggle-button', data: { toggle: 'tooltip', container: 'body', collapse_title: toggle_commit_message, expand_title: toggle_commit_message }, title: toggle_commit_message, aria: { label: toggle_commit_message }})
- if is_blob_page
.gl-flex.sm:gl-hidden.gl-gap-4.gl-pt-3
.committer.gl-text-sm
- commit_authored_timeago = time_ago_with_tooltip(commit.authored_date, placement: 'bottom')
= commit_authored_timeago.html_safe
= render Pajamas::ButtonComponent.new(category: :tertiary, variant: :link, icon: 'commit', href: link, button_options: { class: ["commit-row-message js-onboarding-commit-item"] }) do
= commit.short_id
.committer.gl-text-sm
- commit_author_link = commit_author_link(commit, avatar: false, size: 24)
- commit_authored_timeago = time_ago_with_tooltip(commit.authored_date, placement: 'bottom')
- if commit.different_committer? && commit.committer
- commit_committer_link = commit_committer_link(commit)
- commit_committer_timeago = time_ago_with_tooltip(commit.committed_date, placement: 'bottom')
- commit_committer_avatar = commit_committer_avatar(commit.committer, size: 16, has_tooltip: false)
- commit_text = _('%{commit_author_link} authored %{commit_authored_timeago} and %{commit_committer_avatar} %{commit_committer_link} committed %{commit_committer_timeago}') % { commit_author_link: commit_author_link, commit_authored_timeago: commit_authored_timeago, commit_committer_avatar: commit_committer_avatar, commit_committer_link: commit_committer_link, commit_committer_timeago: commit_committer_timeago }
%div{ class: is_blob_page ? "gl-hidden sm:gl-block": "gl-block" }
- if view_details && merge_request
= link_to commit.title, project_commit_path(project, commit.id, merge_request_iid: merge_request.iid), class: ["commit-row-message item-title js-onboarding-commit-item", ("font-italic" if commit.message.empty?)], data: link_data_attrs
- else
- commit_text = _('%{commit_author_link} authored %{commit_authored_timeago}') % { commit_author_link: commit_author_link, commit_authored_timeago: commit_authored_timeago }
#{ commit_text.html_safe }
= render_if_exists 'projects/commits/project_namespace', show_project_name: show_project_name, project: project
- if commit.description?
%pre{ class: ["commit-row-description gl-mb-3 gl-whitespace-pre-wrap", (collapsible ? "js-toggle-content" : "!gl-block")] }
= preserve(markdown_field(commit, :description))
= link_to_markdown_field(commit, :title, link, class: "commit-row-message item-title js-onboarding-commit-item #{'font-italic' if commit.message.empty?}", data: link_data_attrs)
%span.commit-row-message.d-inline.d-sm-none
&middot;
= commit.short_id
- if commit.description? && collapsible
= render Pajamas::ButtonComponent.new(icon: 'ellipsis_h',
button_options: { class: 'button-ellipsis-horizontal js-toggle-button', data: { toggle: 'tooltip', container: 'body', collapse_title: toggle_commit_message, expand_title: toggle_commit_message }, title: toggle_commit_message, aria: { label: toggle_commit_message }})
= render partial: 'projects/commits/committer', locals: { commit: commit }
= render_if_exists 'projects/commits/project_namespace', show_project_name: show_project_name, project: project
- if commit.description?
%pre{ class: ["commit-row-description gl-whitespace-pre-wrap", (collapsible ? "js-toggle-content" : "!gl-block")] }
= preserve(markdown_field(commit, :description))
.commit-actions.gl-flex.gl-items-center
- if tags.present?
= gl_badge_tag(variant: :neutral, icon: 'tag', class: 'gl-font-monospace') do
- if tags.size > 1
= link_to _('%{count} tags') % { count: tags.size } , project_commit_path(project, commit.id), class: 'has-tooltip', title: tags.join(', ')
- else
= link_to tags.first, project_commits_path(project, tags.first, ref_type: 'tags'), class: 'gl-truncate gl-max-w-12 sm:gl-max-w-15 md:gl-max-w-28 lg:gl-max-w-34 xl:gl-max-w-48 has-tooltip', title: tags.first
%div{ class: is_blob_page ? "gl-hidden sm:gl-flex gl-items-center": "gl-block" }
- if tags.present?
= gl_badge_tag(variant: :neutral, icon: 'tag', class: 'gl-font-monospace') do
- if tags.size > 1
= link_to _('%{count} tags') % { count: tags.size } , project_commit_path(project, commit.id), class: 'has-tooltip', title: tags.join(', ')
- else
= link_to tags.first, project_commits_path(project, tags.first, ref_type: 'tags'), class: 'gl-truncate gl-max-w-12 sm:gl-max-w-15 md:gl-max-w-28 lg:gl-max-w-34 xl:gl-max-w-48 has-tooltip', title: tags.first
- if request.xhr?
- if commit.has_signature?
= render partial: 'projects/commit/signature', object: commit.signature
- else
= render partial: 'projects/commit/ajax_signature', locals: { commit: commit }
- if show_legacy_ci_icon && commit_status
= render_commit_status(commit, commit_status, ref: ref)
.js-commit-pipeline-status{ data: { endpoint: pipelines_project_commit_path(project, commit.id, ref: ref) } }
.commit-sha-group.btn-group.gl-hidden.sm:gl-flex
.label.label-monospace.monospace
= commit.short_id
= clipboard_button(text: commit.id, category: :primary, size: :medium, title: _("Copy commit SHA"))
= link_to_browse_code(project, commit)
- if request.xhr?
- if commit.has_signature?
= render partial: 'projects/commit/signature', object: commit.signature
- else
= render partial: 'projects/commit/ajax_signature', locals: { commit: commit }
- if is_blob_page
.gl-block.sm:gl-hidden.gl-pt-3
= render Pajamas::ButtonComponent.new(icon: 'ellipsis_h', button_options: { class: 'button-ellipsis-horizontal text-expander js-toggle-button', data: { toggle: 'tooltip', container: 'body', collapse_title: toggle_commit_message, expand_title: toggle_commit_message }, title: toggle_commit_message, aria: { label: toggle_commit_message }})
.gl-pt-3.sm:gl-pt-0
#js-commit-history-link{ data: { history_link: project_commits_path(@project, @id, ref_type: @ref_type), event_tracking: 'click_history_control_on_blob_page' } }
- if show_legacy_ci_icon && commit_status
= render_commit_status(commit, commit_status, ref: ref)
.js-commit-pipeline-status{ data: { endpoint: pipelines_project_commit_path(project, commit.id, ref: ref) } }
.commit-sha-group.btn-group.gl-hidden.sm:gl-flex
.label.label-monospace.monospace
= commit.short_id
= clipboard_button(text: commit.id, category: :primary, size: :medium, title: _("Copy commit SHA"))
= link_to_browse_code(project, commit)
- if show_history_button
#js-commit-history-link{ data: { history_link: project_commits_path(@project, @id, ref_type: @ref_type) } }
= render Pajamas::ButtonComponent.new(category: :tertiary, button_options: {class: 'gl-ml-4'}) do
= _('History')
- if is_blob_page
.gl-block.sm:gl-hidden
.gl-hidden.js-toggle-content.gl-mt-6
= link_to_markdown_field(commit, :title, link, class: "commit-row-message item-title js-onboarding-commit-item #{'font-italic' if commit.message.empty?}")
= render partial: 'projects/commits/committer', locals: { commit: commit }
- if commit.description?
%pre{ class: ["commit-row-description gl-whitespace-pre-wrap", (collapsible ? "js-toggle-content" : "!gl-block")] }
= preserve(markdown_field(commit, :description))

View File

@ -0,0 +1,11 @@
.committer.gl-text-sm
- commit_author_link = commit_author_link(commit, avatar: false, size: 24)
- commit_authored_timeago = time_ago_with_tooltip(commit.authored_date, placement: 'bottom')
- if commit.different_committer? && commit.committer
- commit_committer_link = commit_committer_link(commit)
- commit_committer_timeago = time_ago_with_tooltip(commit.committed_date, placement: 'bottom')
- commit_committer_avatar = commit_committer_avatar(commit.committer, size: 16, has_tooltip: false)
- commit_text = _('%{commit_author_link} authored %{commit_authored_timeago} and %{commit_committer_avatar} %{commit_committer_link} committed %{commit_committer_timeago}') % { commit_author_link: commit_author_link, commit_authored_timeago: commit_authored_timeago, commit_committer_avatar: commit_committer_avatar, commit_committer_link: commit_committer_link, commit_committer_timeago: commit_committer_timeago }
- else
- commit_text = _('%{commit_author_link} authored %{commit_authored_timeago}') % { commit_author_link: commit_author_link, commit_authored_timeago: commit_authored_timeago }
#{ commit_text.html_safe }

View File

@ -1,9 +0,0 @@
---
name: prompt_migration_summarize_review
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/495131
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169982
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/500123
milestone: '17.6'
group: group::ai framework
type: experiment
default_enabled: false

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
# Timeout if Regular expression takes more than fifty seconds to compute.
# Timeout if Regular expression takes more than 45 seconds to compute.
# This is a conservative value and is to be evaluated later.
# This value can be overridden using the REGEXP_TIMEOUT_SECONDS environment value
Regexp.timeout = ENV.fetch('REGEXP_TIMEOUT_SECONDS', 50).to_f if RUBY_VERSION > "3.2"
Regexp.timeout = ENV.fetch('REGEXP_TIMEOUT_SECONDS', 45).to_f if RUBY_VERSION > "3.2"

View File

@ -194,8 +194,11 @@ DETAILS:
**Tier:** Premium, Ultimate
**Offering:** Self-managed
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/296669) in GitLab 13.9 with a [flag](../../administration/feature_flags.md) named `two_factor_for_cli`. Disabled by default. This feature flag also affects [2FA for Git over SSH operations](../../security/two_factor_authentication.md#2fa-for-git-over-ssh-operations).
FLAG:
On self-managed GitLab, by default this feature is not available. To make it available, an administrator can [enable the feature flag](../../administration/feature_flags.md) named `two_factor_for_cli`. On GitLab.com and GitLab Dedicated, this feature is not available. This feature is not ready for production use. This feature flag also affects [2FA for Git over SSH operations](../../security/two_factor_authentication.md#2fa-for-git-over-ssh-operations).
The availability of this feature is controlled by a feature flag.
For more information, see the history. This feature is not ready for production use.
GitLab administrators can choose to customize the session duration (in minutes) for Git operations when 2FA is enabled. The default is 15 and this can be set to a value between 1 and 10080.
@ -264,16 +267,16 @@ DETAILS:
**Tier:** Ultimate
**Offering:** Self-managed
Users can optionally specify a lifetime for
[SSH keys](../../user/ssh.md).
This lifetime is not a requirement, and can be set to any arbitrary number of days.
> - Maximum allowable lifetime limit [extended to 400 days](https://gitlab.com/gitlab-org/gitlab/-/issues/461901) in GitLab 17.6 [with a flag](../feature_flags.md) named `buffered_token_expiration_limit`. Disabled by default.
> - [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/461901) the maximum allowable lifetime limit to an increased value of 400 days in GitLab 17.6 [with a flag](../../administration/feature_flags.md) named `buffered_token_expiration_limit`. Disabled by default.
FLAG:
The availability of the extended maximum allowable lifetime limit is controlled by a feature flag.
For more information, see the history.
Users can optionally specify a lifetime for
[SSH keys](../../user/ssh.md).
This lifetime is not a requirement, and can be set to any arbitrary number of days.
SSH keys are user credentials to access GitLab.
However, organizations with security requirements may want to enforce more protection by
requiring the regular rotation of these keys.
@ -308,7 +311,7 @@ DETAILS:
**Tier:** Ultimate
**Offering:** Self-managed
> - Maximum allowable lifetime limit [extended to 400 days](https://gitlab.com/gitlab-org/gitlab/-/issues/461901) in GitLab 17.6 [with a flag](../feature_flags.md) named `buffered_token_expiration_limit`. Disabled by default.
> - [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/461901) the maximum allowable lifetime limit to an increased value of 400 days in GitLab 17.6 [with a flag](../../administration/feature_flags.md) named `buffered_token_expiration_limit`. Disabled by default.
FLAG:
The availability of the extended maximum allowable lifetime limit is controlled by a feature flag.

View File

@ -342,7 +342,7 @@ Returns [`CiStage`](#cistage).
### `Query.ciQueueingHistory`
Time taken for CI jobs to be picked up by runner by percentile.
Time taken for CI jobs to be picked up by runner by percentile. Enable the ClickHouse database backend to use this query.
DETAILS:
**Introduced** in GitLab 16.4.
@ -1045,7 +1045,7 @@ Returns [`RunnerSetup`](#runnersetup).
### `Query.runnerUsage`
Runner usage by runner.
Runner usage by runner. Enable the ClickHouse database backend to use this query.
Returns [`[CiRunnerUsage!]`](#cirunnerusage).
@ -1061,7 +1061,7 @@ Returns [`[CiRunnerUsage!]`](#cirunnerusage).
### `Query.runnerUsageByProject`
Runner usage by project.
Runner usage by project. Enable the ClickHouse database backend to use this query.
Returns [`[CiRunnerUsageByProject!]`](#cirunnerusagebyproject).
@ -24648,7 +24648,7 @@ four standard [pagination arguments](#pagination-arguments):
##### `Group.ciQueueingHistory`
Time taken for CI jobs to be picked up by this group's runners by percentile. Available to users with Maintainer role for the group.
Time taken for CI jobs to be picked up by this group's runners by percentile. Available to users with Maintainer role for the group. Enable the ClickHouse database backend to use this query.
DETAILS:
**Introduced** in GitLab 16.11.

View File

@ -14,7 +14,7 @@ DETAILS:
> - [Changed](https://gitlab.com/groups/gitlab-org/-/epics/12729) to Beta and made available on GitLab.com in GitLab 17.1.
> - [Enabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/156907) in GitLab 17.2 [with flags](../../../../administration/feature_flags.md) named `pre_receive_secret_detection_beta_release` and `pre_receive_secret_detection_push_check`.
> - Feature flag `pre_receive_secret_detection_beta_release` [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/472418) in GitLab 17.4.
> - [Generally available](https://gitlab.com/groups/gitlab-org/-/epics/13107) in GitLab 17.5. Feature flag `pre_receive_secret_detection_push_check` removed.
> - [Generally available](https://gitlab.com/groups/gitlab-org/-/epics/13107) in GitLab 17.5.
Secret push protection blocks secrets such as keys and API tokens from being pushed to GitLab. The
content of each [file or commit](#coverage) is checked for secrets when pushed to GitLab. By

View File

@ -8961,12 +8961,18 @@ msgstr ""
msgid "Billings|In a seat"
msgstr ""
msgid "Billings|Open source Plan Seats used"
msgstr ""
msgid "Billings|Seats in use / Seats available"
msgstr ""
msgid "Billings|Seats in use / Seats in subscription"
msgstr ""
msgid "Billings|You have unlimited seat count."
msgstr ""
msgid "Billing|%d user has been successfully assigned a seat."
msgid_plural "Billing|%d users have been successfully assigned a seat."
msgstr[0] ""

View File

@ -59,7 +59,7 @@ RSpec.describe 'User searches for commits', :js, :clean_gitlab_redis_rate_limiti
submit_search('See merge request')
select_search_scope('Commits')
expect(page).to have_selector('.commit-row-description', visible: false, count: 9)
expect(page).to have_selector('.commit-detail', visible: false, count: 9)
end
end
end

View File

@ -50,7 +50,6 @@ const createComponent = async () => {
describe('Blob controls component', () => {
const findFindButton = () => wrapper.findByTestId('find');
const findBlameButton = () => wrapper.findByTestId('blame');
const findHistoryButton = () => wrapper.findByTestId('history');
const findPermalinkButton = () => wrapper.findByTestId('permalink');
const { bindInternalEventDocument } = useMockInternalEventsTracking();
@ -77,10 +76,6 @@ describe('Blob controls component', () => {
expect(findBlameButton().attributes('href')).toBe('blame/file.js');
});
it('renders a history button with the correct href', () => {
expect(findHistoryButton().attributes('href')).toBe('history/file.js');
});
it('renders a permalink button with the correct href', () => {
expect(findPermalinkButton().attributes('href')).toBe('permalink/file.js');
});
@ -98,7 +93,6 @@ describe('Blob controls component', () => {
expect(findFindButton().exists()).toBe(false);
expect(findBlameButton().exists()).toBe(false);
expect(findHistoryButton().exists()).toBe(false);
expect(findPermalinkButton().exists()).toBe(false);
expect(updateElementsVisibility).toHaveBeenCalledWith('.tree-controls', true);
},

View File

@ -94,6 +94,19 @@ RSpec.describe Mutations::MergeRequests::Accept, feature_category: :api do
end
expect(result).to include(errors: be_empty, merge_request: be_auto_merge_enabled)
end
context 'when MR is in draft state' do
before do
merge_request.update!(title: "Draft: Test")
end
it "can use the MERGE_WHEN_CHECKS_PASS strategy" do
expect_next_found_instance_of(MergeRequest) do |instance|
expect(instance).not_to receive(:merge_async)
end
expect(result).to include(errors: be_empty, merge_request: be_auto_merge_enabled)
end
end
end
end
end

View File

@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe 'projects/commits/_commit.html.haml' do
RSpec.describe 'projects/commits/_commit.html.haml', feature_category: :source_code_management do
let(:template) { 'projects/commits/commit' }
let(:project) { create(:project, :repository) }
let(:commit) { project.repository.commit(ref) }
@ -11,24 +11,6 @@ RSpec.describe 'projects/commits/_commit.html.haml' do
allow(view).to receive(:current_application_settings).and_return(Gitlab::CurrentSettings.current_application_settings)
end
context 'with different committer' do
let(:ref) { 'master' }
let(:committer) { create(:user) }
it 'renders committed by user' do
allow(commit).to receive(:different_committer?).and_return(true)
allow(commit).to receive(:committer).and_return(committer)
render partial: template, formats: :html, locals: {
project: project,
ref: ref,
commit: commit
}
expect(rendered).to have_text("#{committer.name} committed")
end
end
context 'with a signed commit' do
let(:ref) { GpgHelpers::SIGNED_COMMIT_SHA }
@ -109,44 +91,34 @@ RSpec.describe 'projects/commits/_commit.html.haml' do
end
end
context 'with history button' do
it 'does not render history button' do
allow(view).to receive(:project_commits_path).and_return('/commits/123')
expect(rendered).not_to have_css('#js-commit-history-link')
end
context 'when it is blob page' do
let(:ref) { 'master' }
it 'does not render the history button when show_history_button is not provided' do
render partial: template, formats: :html, locals: {
project: project,
ref: ref,
commit: commit
}
expect(rendered).not_to have_css('#js-commit-history-link')
expect(rendered).not_to have_content('History')
end
it 'renders the history button when show_history_button is true' do
before do
allow(view).to receive(:project_commits_path).and_return('/commits/123')
render partial: template, formats: :html, locals: {
project: project,
ref: ref,
commit: commit,
show_history_button: true
is_blob_page: true
}
expect(rendered).to have_css('#js-commit-history-link')
expect(rendered).to have_content('History')
end
it 'does not render the history button when show_history_button is false' do
render partial: template, formats: :html, locals: {
project: project,
ref: ref,
commit: commit,
show_history_button: false
}
it 'renders the history button' do
expect(rendered).to have_css('#js-commit-history-link')
end
expect(rendered).not_to have_css('#js-commit-history-link')
expect(rendered).not_to have_content('History')
it 'only renders commit details when expanded' do
expect(rendered).to have_selector('.js-toggle-content')
within('.js-toggle-content') do
expect(rendered).to have_selector('.commit-row-description')
expect(rendered).to have_content(commit.short_id)
end
end
end
end

View File

@ -0,0 +1,55 @@
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'projects/commits/_committer.html.haml', feature_category: :source_code_management do
let(:user) { build(:user, name: 'John Doe', email: 'john@example.com') }
let(:committer) { build(:user, name: 'Jane Smith', email: 'jane@example.com') }
let(:commit) do
build(:commit,
author: user,
author_name: user.name,
author_email: user.email,
authored_date: 2.days.ago,
committer: nil,
committer_name: user.name,
committer_email: user.email,
committed_date: 2.days.ago
)
end
before do
allow(view).to receive_messages(commit_author_link: 'John Doe', time_ago_with_tooltip: '2 days ago')
end
context 'when author and committer are the same' do
before do
render partial: 'projects/commits/committer', locals: { commit: commit }
end
it 'displays only author information' do
expect(rendered).to have_content('John Doe authored 2 days ago')
expect(rendered).not_to have_content('committed')
end
end
context 'when author and committer are different' do
before do
allow(commit).to receive_messages(different_committer?: true, committer: committer)
allow(view).to receive_messages(commit_committer_link: 'Jane Smith',
commit_committer_avatar: '<img src="avatar.jpg">')
render partial: 'projects/commits/committer', locals: { commit: commit }
end
it 'displays both author and committer information' do
expect(rendered).to have_content('John Doe authored 2 days ago')
expect(rendered).to have_content('Jane Smith committed 2 days ago')
end
it 'includes committer avatar' do
expect(rendered).to include('avatar.jpg')
end
end
end