Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
eef3d92529
commit
ef270a0e19
|
@ -95,7 +95,7 @@ MergeRequest.prototype.initMRBtnListeners = function () {
|
|||
.then(({ data }) => {
|
||||
draftToggle.removeAttribute('disabled');
|
||||
eventHub.$emit('MRWidgetUpdateRequested');
|
||||
MergeRequest.toggleDraftStatus(data.title, wipEvent === 'unwip');
|
||||
MergeRequest.toggleDraftStatus(data.title, wipEvent === 'ready');
|
||||
})
|
||||
.catch(() => {
|
||||
createFlash({
|
||||
|
@ -168,7 +168,7 @@ MergeRequest.toggleDraftStatus = function (title, isReady) {
|
|||
draftToggles.forEach((el) => {
|
||||
const draftToggle = el;
|
||||
const url = setUrlParams(
|
||||
{ 'merge_request[wip_event]': isReady ? 'wip' : 'unwip' },
|
||||
{ 'merge_request[wip_event]': isReady ? 'draft' : 'ready' },
|
||||
draftToggle.href,
|
||||
);
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ export default {
|
|||
<template>
|
||||
<div class="issuable-create-container">
|
||||
<slot name="title"></slot>
|
||||
<hr class="gl-mt-0" />
|
||||
<issuable-form
|
||||
:description-preview-path="descriptionPreviewPath"
|
||||
:description-help-path="descriptionHelpPath"
|
||||
|
|
|
@ -51,9 +51,9 @@ export default {
|
|||
|
||||
<template>
|
||||
<gl-form class="common-note-form gfm-form" @submit.stop.prevent>
|
||||
<div data-testid="issuable-title" class="form-group row">
|
||||
<label for="issuable-title" class="col-form-label col-sm-2">{{ __('Title') }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div data-testid="issuable-title" class="row">
|
||||
<label for="issuable-title" class="col-12 gl-mb-0">{{ __('Title') }}</label>
|
||||
<div class="col-12">
|
||||
<gl-form-group :description="__('Maximum of 255 characters')">
|
||||
<gl-form-input
|
||||
id="issuable-title"
|
||||
|
@ -66,10 +66,8 @@ export default {
|
|||
</div>
|
||||
</div>
|
||||
<div data-testid="issuable-description" class="form-group row">
|
||||
<label for="issuable-description" class="col-form-label col-sm-2">{{
|
||||
__('Description')
|
||||
}}</label>
|
||||
<div class="col-sm-10">
|
||||
<label for="issuable-description" class="col-12">{{ __('Description') }}</label>
|
||||
<div class="col-12">
|
||||
<markdown-field
|
||||
:markdown-preview-path="descriptionPreviewPath"
|
||||
:markdown-docs-path="descriptionHelpPath"
|
||||
|
@ -91,13 +89,9 @@ export default {
|
|||
</markdown-field>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div data-testid="issuable-labels" class="form-group row">
|
||||
<label for="issuable-labels" class="col-form-label col-md-2 col-lg-4">{{
|
||||
__('Labels')
|
||||
}}</label>
|
||||
<div class="col-md-8 col-sm-10">
|
||||
<label for="issuable-labels" class="col-12">{{ __('Labels') }}</label>
|
||||
<div class="col-12">
|
||||
<div class="issuable-form-select-holder">
|
||||
<labels-select
|
||||
:allow-label-edit="true"
|
||||
|
@ -116,12 +110,7 @@ export default {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
data-testid="issuable-create-actions"
|
||||
class="footer-block row-content-block gl-display-flex"
|
||||
>
|
||||
<div data-testid="issuable-create-actions" class="footer-block gl-display-flex gl-mt-6">
|
||||
<slot
|
||||
name="actions"
|
||||
:issuable-title="issuableTitle"
|
||||
|
|
|
@ -300,7 +300,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
|
|||
|
||||
def remove_wip
|
||||
@merge_request = ::MergeRequests::UpdateService
|
||||
.new(project: project, current_user: current_user, params: { wip_event: 'unwip' })
|
||||
.new(project: project, current_user: current_user, params: { wip_event: 'ready' })
|
||||
.execute(@merge_request)
|
||||
|
||||
render json: serialize_widget(@merge_request)
|
||||
|
|
|
@ -27,8 +27,8 @@ module Mutations
|
|||
|
||||
private
|
||||
|
||||
def wip_event(wip)
|
||||
wip ? 'wip' : 'unwip'
|
||||
def wip_event(draft)
|
||||
draft ? 'draft' : 'ready'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -139,7 +139,7 @@ module MergeRequestsHelper
|
|||
end
|
||||
|
||||
def toggle_draft_merge_request_path(issuable)
|
||||
wip_event = issuable.draft? ? 'unwip' : 'wip'
|
||||
wip_event = issuable.draft? ? 'ready' : 'draft'
|
||||
|
||||
issuable_path(issuable, { merge_request: { wip_event: wip_event } })
|
||||
end
|
||||
|
|
|
@ -128,9 +128,14 @@ module MergeRequests
|
|||
if draft_event = params.delete(:wip_event)
|
||||
# We update the title that is provided in the params or we use the mr title
|
||||
title = params[:title] || merge_request.title
|
||||
# Supports both `wip` and `draft` permutations of draft_event
|
||||
# This support can be removed >= %15.2
|
||||
#
|
||||
params[:title] = case draft_event
|
||||
when 'wip' then MergeRequest.draft_title(title)
|
||||
when 'draft' then MergeRequest.draft_title(title)
|
||||
when 'unwip' then MergeRequest.draftless_title(title)
|
||||
when 'ready' then MergeRequest.draftless_title(title)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
.detail-page-header-body
|
||||
.issuable-meta.gl-display-flex
|
||||
#js-issuable-header-warnings
|
||||
%h1.gl-font-size-h-display.gl-my-0.gl-display-inline-block{ data: { qa_selector: 'title_content' } }
|
||||
%h1.title.gl-font-size-h-display.gl-my-0.gl-display-inline-block{ data: { qa_selector: 'title_content' } }
|
||||
= markdown_field(@merge_request, :title)
|
||||
|
||||
- unless hide_gutter_toggle
|
||||
|
|
|
@ -52,6 +52,9 @@ sole discretion of GitLab Inc.
|
|||
|
||||
### <%= deprecation["name"]%>
|
||||
|
||||
<% if deprecation["end_of_support_milestone"] -%>
|
||||
End of Support: GitLab <span class="removal-milestone"><%= deprecation["end_of_support_milestone"]%></span> (<%= deprecation["end_of_support_date"]%>)
|
||||
<% end -%>
|
||||
Planned removal: GitLab <span class="removal-milestone"><%= deprecation["removal_milestone"]%></span> (<%= deprecation["removal_date"]%>)
|
||||
<% if deprecation["breaking_change"] -%>
|
||||
|
||||
|
|
|
@ -1,15 +1,22 @@
|
|||
# This is a template for a feature deprecation
|
||||
# A deprecation typically occurs when a feature or capability is planned to be removed in a future release.
|
||||
# Deprecations should be announced at least two releases prior to removal. Any breaking changes should only be done in major releases.
|
||||
# This is a template for a feature deprecation.
|
||||
#
|
||||
# Below is an example of what a single entry should look like, it's required attributes,
|
||||
# and what types we expect those attribute values to be.
|
||||
# Please refer to the deprecation guidelines to confirm your understanding of GitLab's definitions.
|
||||
# https://docs.gitlab.com/ee/development/deprecation_guidelines/#terminology
|
||||
#
|
||||
# Deprecations must be announced at least three releases prior to removal.
|
||||
#
|
||||
# If an End of Support period applies, the announcement should be shared with GitLab Support
|
||||
# in the `#spt_managers` on Slack and mention `@gitlab-com/support` in this MR.
|
||||
#
|
||||
# Breaking changes must happen in a major release.
|
||||
#
|
||||
# For more information please refer to the handbook documentation here:
|
||||
# https://about.gitlab.com/handbook/marketing/blog/release-posts/#deprecations
|
||||
#
|
||||
# Please delete this line and above before submitting your merge request.
|
||||
|
||||
#
|
||||
# REQUIRED FIELDS
|
||||
#
|
||||
- name: "Feature name" # (required) The name of the feature to be deprecated
|
||||
announcement_milestone: "XX.YY" # (required) The milestone when this feature was first announced as deprecated.
|
||||
announcement_date: "YYYY-MM-DD" # (required) The date of the milestone release when this feature was first announced as deprecated. This should almost always be the 22nd of a month (YYYY-MM-22), unless you did an out of band blog post.
|
||||
|
@ -27,7 +34,11 @@
|
|||
When ready, assign to your tech writer for review. When ready, they will run `bin/rake gitlab:docs:compile_deprecations` to update the deprecations doc, then merge.
|
||||
|
||||
END OF BODY COMMENT -->
|
||||
# The following items are not published on the docs page, but may be used in the future.
|
||||
#
|
||||
# OPTIONAL FIELDS
|
||||
#
|
||||
end_of_support_milestone: # (optional) Use "XX.YY" format. The milestone when support for this feature will end.
|
||||
end_of_support_date: # (optional) The date of the milestone release when support for this feature will end.
|
||||
tiers: # (optional - may be required in the future) An array of tiers that the feature is available in currently. e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
|
||||
documentation_url: # (optional) This is a link to the current documentation page
|
||||
image_url: # (optional) This is a link to a thumbnail image depicting the feature
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
# This is a template for a feature removal
|
||||
# Generally, a feature or configuration should be removed in a major release.
|
||||
# It should be announced at least 2 releases prior to being removed.
|
||||
# This is a template for a feature removal.
|
||||
#
|
||||
# Below is an example of a removal.
|
||||
# Please refer to the deprecation guidelines to confirm your understanding of GitLab's definitions.
|
||||
# https://docs.gitlab.com/ee/development/deprecation_guidelines/#terminology
|
||||
#
|
||||
# If this removal is a breaking change, it must take place in a major release.
|
||||
#
|
||||
# For more information please refer to the handbook documentation here:
|
||||
# https://about.gitlab.com/handbook/marketing/blog/release-posts/#removals
|
||||
#
|
||||
# Please delete this line and above before submitting your merge request.
|
||||
|
||||
#
|
||||
# REQUIRED FIELDS
|
||||
#
|
||||
- name: "Feature name" # (required) the name of the feature being removed. Avoid the words `deprecation`, `deprecate`, `removal`, and `remove` in this field because these are implied.
|
||||
announcement_milestone: "XX.YY" # (required) The milestone when this feature was deprecated.
|
||||
announcement_date: "YYYY-MM-DD" # (required) The date of the milestone release when this feature was deprecated. This should almost always be the 22nd of a month (YYYY-MM-DD), unless you did an out of band blog post.
|
||||
|
@ -26,7 +29,11 @@
|
|||
When ready, assign to your tech writer for review. When ready, they will run `bin/rake gitlab:docs:compile_removals` to update the removals doc, then merge.
|
||||
|
||||
END OF BODY COMMENT -->
|
||||
# The following items are not published on the docs page, but may be used in the future.
|
||||
#
|
||||
# OPTIONAL FIELDS
|
||||
#
|
||||
end_of_support_milestone: # (optional) Use "XX.YY" format. The milestone when support for this feature will end.
|
||||
end_of_support_date: # (optional) The date of the milestone release when support for this feature will end.
|
||||
tiers: # (optional - may be required in the future) An array of tiers that the feature is available in currently. e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
|
||||
documentation_url: # (optional) This is a link to the current documentation page
|
||||
image_url: # (optional) This is a link to a thumbnail image depicting the feature
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
|
@ -11,13 +11,31 @@ changes](../contributing/index.md#breaking-changes) to GitLab features.
|
|||
|
||||
## Terminology
|
||||
|
||||
It's important to understand the difference between **deprecation** and
|
||||
**removal**:
|
||||
**Deprecation**:
|
||||
|
||||
**Deprecation** is the process of flagging/marking/announcing that a feature is no longer fully supported and may be removed in a future version of GitLab.
|
||||
- Feature not recommended for use.
|
||||
- Development restricted to Priority 1 / Severity 1 bug fixes.
|
||||
- Will be removed in a future major release.
|
||||
- Begins after a deprecation announcement outlining an end-of-support date.
|
||||
- Ends after the end-of-support date or removal date has passed.
|
||||
|
||||
**Removal** is the process of actually removing a feature that was previously
|
||||
deprecated.
|
||||
**End of Support**:
|
||||
|
||||
- Feature usage strongly discouraged.
|
||||
- No support or fixes provided.
|
||||
- No longer tested internally.
|
||||
- Will be removed in a future major release.
|
||||
- Begins after an end-of-support date has passed.
|
||||
- Ends after all relevant code has been removed.
|
||||
|
||||
**Removal**:
|
||||
|
||||
- Feature usage impossible.
|
||||
- Happens in a major release in line with our
|
||||
[semantic versioning policy](../../policy/maintenance.md).
|
||||
- Begins after removal date has passed.
|
||||
|
||||
![Deprecation, End of Support, Removal process](img/deprecation_removal_process.png)
|
||||
|
||||
## When can a feature be deprecated?
|
||||
|
||||
|
|
|
@ -560,8 +560,8 @@ This section contains possible solutions for problems you might encounter.
|
|||
|
||||
SAML responses are base64 encoded, so we recommend the following browser plugins to decode them on the fly:
|
||||
|
||||
- [SAML tracer for Firefox](https://addons.mozilla.org/en-US/firefox/addon/saml-tracer/)
|
||||
- [Chrome SAML Panel](https://chrome.google.com/webstore/detail/saml-chrome-panel/paijfdbeoenhembfhkhllainmocckace?hl=en)
|
||||
- [SAML-tracer](https://addons.mozilla.org/en-US/firefox/addon/saml-tracer/) for Firefox.
|
||||
- [SAML Message Decoder](https://chrome.google.com/webstore/detail/saml-message-decoder/mpabchoaimgbdbbjjieoaeiibojelbhm?hl=en) for Chrome.
|
||||
|
||||
Specific attention should be paid to:
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ module Gitlab
|
|||
(quick_action_target.new_record? || current_user.can?(:"update_#{quick_action_target.to_ability_name}", quick_action_target))
|
||||
end
|
||||
command :draft do
|
||||
@updates[:wip_event] = quick_action_target.draft? ? 'unwip' : 'wip'
|
||||
@updates[:wip_event] = quick_action_target.draft? ? 'ready' : 'draft'
|
||||
end
|
||||
|
||||
desc _('Set target branch')
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module QA
|
||||
RSpec.describe 'Create', quarantine: {
|
||||
issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/363807',
|
||||
type: :stale
|
||||
} do
|
||||
RSpec.describe 'Create' do
|
||||
describe 'Create a new merge request' do
|
||||
let(:project) do
|
||||
Resource::Project.fabricate_via_api! do |project|
|
||||
|
|
|
@ -321,28 +321,28 @@ RSpec.describe QuickActions::InterpretService do
|
|||
end
|
||||
|
||||
shared_examples 'draft command' do
|
||||
it 'returns wip_event: "wip" if content contains /draft' do
|
||||
it 'returns wip_event: "draft" if content contains /draft' do
|
||||
_, updates, _ = service.execute(content, issuable)
|
||||
|
||||
expect(updates).to eq(wip_event: 'wip')
|
||||
expect(updates).to eq(wip_event: 'draft')
|
||||
end
|
||||
|
||||
it 'returns the wip message' do
|
||||
it 'returns the draft message' do
|
||||
_, _, message = service.execute(content, issuable)
|
||||
|
||||
expect(message).to eq("Marked this #{issuable.to_ability_name.humanize(capitalize: false)} as a draft.")
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples 'undraft command' do
|
||||
it 'returns wip_event: "unwip" if content contains /draft' do
|
||||
shared_examples 'ready command' do
|
||||
it 'returns wip_event: "ready" if content contains /draft' do
|
||||
issuable.update!(title: issuable.draft_title)
|
||||
_, updates, _ = service.execute(content, issuable)
|
||||
|
||||
expect(updates).to eq(wip_event: 'unwip')
|
||||
expect(updates).to eq(wip_event: 'ready')
|
||||
end
|
||||
|
||||
it 'returns the unwip message' do
|
||||
it 'returns the ready message' do
|
||||
issuable.update!(title: issuable.draft_title)
|
||||
_, _, message = service.execute(content, issuable)
|
||||
|
||||
|
@ -1367,7 +1367,7 @@ RSpec.describe QuickActions::InterpretService do
|
|||
let(:issuable) { merge_request }
|
||||
end
|
||||
|
||||
it_behaves_like 'undraft command' do
|
||||
it_behaves_like 'ready command' do
|
||||
let(:content) { '/draft' }
|
||||
let(:issuable) { merge_request }
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue