Skip to content
Snippets Groups Projects
Commit d80f3cd7 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent be81c157
No related branches found
No related tags found
No related merge requests found
Showing
with 107 additions and 14 deletions
Loading
Loading
@@ -8,7 +8,11 @@ export default () => {
 
return new Vue({
el,
store: createStore({ list: listModule }),
store: createStore({
modules: {
list: listModule,
},
}),
render: h =>
h(ReleaseListApp, {
props: {
Loading
Loading
import Vue from 'vue';
import ReleaseShowApp from './components/app_show.vue';
import createStore from './stores';
import detailModule from './stores/modules/detail';
export default () => {
const el = document.getElementById('js-show-release-page');
const store = createStore({
modules: {
detail: detailModule,
},
});
store.dispatch('detail/setInitialState', el.dataset);
return new Vue({
el,
store,
render: h => h(ReleaseShowApp),
});
};
Loading
Loading
@@ -3,4 +3,8 @@ import Vuex from 'vuex';
 
Vue.use(Vuex);
 
export default modules => new Vuex.Store({ modules });
export default ({ modules, featureFlags }) =>
new Vuex.Store({
modules,
state: { featureFlags },
});
Loading
Loading
@@ -33,9 +33,11 @@ export const updateReleaseTitle = ({ commit }, title) => commit(types.UPDATE_REL
export const updateReleaseNotes = ({ commit }, notes) => commit(types.UPDATE_RELEASE_NOTES, notes);
 
export const requestUpdateRelease = ({ commit }) => commit(types.REQUEST_UPDATE_RELEASE);
export const receiveUpdateReleaseSuccess = ({ commit, dispatch }) => {
export const receiveUpdateReleaseSuccess = ({ commit, state, rootState }) => {
commit(types.RECEIVE_UPDATE_RELEASE_SUCCESS);
dispatch('navigateToReleasesPage');
redirectTo(
rootState.featureFlags.releaseShowPage ? state.release._links.self : state.releasesPagePath,
);
};
export const receiveUpdateReleaseError = ({ commit }, error) => {
commit(types.RECEIVE_UPDATE_RELEASE_ERROR, error);
Loading
Loading
Loading
Loading
@@ -138,3 +138,15 @@
max-width: 40%;
}
}
.suggest-gitlab-ci-yml {
margin-top: -1em;
.popover-header {
padding: $gl-padding;
.ic-close {
margin-top: -1em;
}
}
}
Loading
Loading
@@ -81,6 +81,7 @@ $gl-gray-400: #999;
$gl-gray-500: #777;
$gl-gray-600: #666;
$gl-gray-700: #555;
$gl-gray-800: #333;
 
$green-50: #f1fdf6;
$green-100: #dcf5e7;
Loading
Loading
Loading
Loading
@@ -18,3 +18,19 @@ p.details {
pre.commit-message {
white-space: pre-wrap;
}
.gl-label-scoped {
box-shadow: 0 0 0 2px currentColor inset;
}
.gl-label-text {
padding: 0 5px;
}
.gl-label-text-light {
color: $white-light;
}
.gl-label-text-dark {
color: $gl-gray-800;
}
Loading
Loading
@@ -1006,6 +1006,14 @@ pre.light-well {
}
}
 
&:not(.with-pipeline-status) {
.icon-wrapper:first-of-type {
@include media-breakpoint-up(lg) {
margin-left: $gl-padding-32;
}
}
}
.ci-status-link {
display: inline-flex;
}
Loading
Loading
Loading
Loading
@@ -79,7 +79,7 @@ module MarkupHelper
md = markdown_field(object, attribute, options.merge(post_process: false))
return unless md.present?
 
tags = %w(a gl-emoji b pre code p span)
tags = %w(a gl-emoji b strong i em pre code p span)
tags << 'img' if options[:allow_images]
 
text = truncate_visible(md, max_chars || md.length)
Loading
Loading
@@ -88,7 +88,7 @@ module MarkupHelper
text,
tags: tags,
attributes: Rails::Html::WhiteListSanitizer.allowed_attributes +
%w(style data-src data-name data-unicode-version data-iid data-project-path data-mr-title)
%w(style data-src data-name data-unicode-version data-iid data-project-path data-mr-title data-html)
)
 
# since <img> tags are stripped, this can leave empty <a> tags hanging around
Loading
Loading
@@ -233,7 +233,7 @@ module MarkupHelper
 
def strip_empty_link_tags(text)
scrubber = Loofah::Scrubber.new do |node|
node.remove if node.name == 'a' && node.content.blank?
node.remove if node.name == 'a' && node.children.empty?
end
 
sanitize text, scrubber: scrubber
Loading
Loading
# frozen_string_literal: true
module SuggestPipelineHelper
def should_suggest_gitlab_ci_yml?
Feature.enabled?(:suggest_pipeline) &&
current_user &&
params[:suggest_gitlab_ci_yml] == 'true'
end
end
Loading
Loading
@@ -305,6 +305,10 @@ class Issue < ApplicationRecord
labels.map(&:hook_attrs)
end
 
def previous_updated_at
previous_changes['updated_at']&.first || updated_at
end
private
 
def ensure_metrics
Loading
Loading
Loading
Loading
@@ -12,6 +12,7 @@ class MilestoneNote < ::Note
created_at: event.created_at,
noteable: resource,
milestone: event.milestone,
discussion_id: event.discussion_id,
event: event,
system_note_metadata: ::SystemNoteMetadata.new(action: 'milestone'),
resource_parent: resource_parent
Loading
Loading
Loading
Loading
@@ -21,7 +21,7 @@ class ResourceEvent < ApplicationRecord
private
 
def discussion_id_key
[self.class.name, created_at, user_id]
[self.class.name, id, user_id]
end
 
def exactly_one_issuable
Loading
Loading
Loading
Loading
@@ -103,6 +103,10 @@ class ResourceLabelEvent < ResourceEvent
def resource_parent
issuable.project || issuable.group
end
def discussion_id_key
[self.class.name, created_at, user_id]
end
end
 
ResourceLabelEvent.prepend_if_ee('EE::ResourceLabelEvent')
= render 'shared/projects/list', projects: @projects, user: current_user
= render 'shared/projects/list', projects: @projects, pipeline_status: Feature.enabled?(:dashboard_pipeline_status, default_enabled: true), user: current_user
- is_explore_page = defined?(explore_page) && explore_page
= render 'shared/projects/list', projects: projects, user: current_user, explore_page: is_explore_page
= render 'shared/projects/list', projects: projects, user: current_user, explore_page: is_explore_page, pipeline_status: Feature.enabled?(:dashboard_pipeline_status, default_enabled: true)
Loading
Loading
@@ -17,8 +17,10 @@
%span.pull-left.append-right-10
\/
= text_field_tag 'file_name', params[:file_name], placeholder: "File name",
required: true, class: 'form-control new-file-name js-file-path-name-input'
required: true, class: 'form-control new-file-name js-file-path-name-input', value: params[:file_name] || (should_suggest_gitlab_ci_yml? ? '.gitlab-ci.yml' : '')
= render 'template_selectors'
- if should_suggest_gitlab_ci_yml?
= render partial: 'suggest_gitlab_ci_yml', locals: { target: '#gitlab-ci-yml-selector', dismiss_key: "suggest_gitlab_ci_yml_#{@project.id}" }
 
.file-buttons
- if is_markdown
Loading
Loading
.js-suggest-gitlab-ci-yml{ data: { toggle: 'popover',
target: target,
css_class: 'suggest-gitlab-ci-yml ml-4',
dismiss_key: dismiss_key } }
.template-selectors-menu.gl-pl-2
.template-selector-dropdowns-wrap
.template-type-selector.js-template-type-selector-wrap.hidden
= dropdown_tag(_("Select a template type"), options: { toggle_class: 'js-template-type-selector qa-template-type-dropdown', dropdown_class: 'dropdown-menu-selectable'} )
- toggle_text = should_suggest_gitlab_ci_yml? ? '.gitlab-ci.yml' : 'Select a template type'
= dropdown_tag(_(toggle_text), options: { toggle_class: 'js-template-type-selector qa-template-type-dropdown', dropdown_class: 'dropdown-menu-selectable' })
.license-selector.js-license-selector-wrap.js-template-selector-wrap.hidden
= dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-license-selector qa-license-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: licenses_for_select(@project), project: @project.name, fullname: @project.namespace.human_name } } )
.gitignore-selector.js-gitignore-selector-wrap.js-template-selector-wrap.hidden
= dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-gitignore-selector qa-gitignore-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: gitignore_names(@project) } } )
.gitlab-ci-yml-selector.js-gitlab-ci-yml-selector-wrap.js-template-selector-wrap.hidden
#gitlab-ci-yml-selector.gitlab-ci-yml-selector.js-gitlab-ci-yml-selector-wrap.js-template-selector-wrap.hidden
= dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-gitlab-ci-yml-selector qa-gitlab-ci-yml-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: gitlab_ci_ymls(@project) } } )
.dockerfile-selector.js-dockerfile-selector-wrap.js-template-selector-wrap.hidden
= dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-dockerfile-selector qa-dockerfile-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: dockerfile_names(@project) } } )
Loading
Loading
@@ -3,7 +3,7 @@
= runner_status_icon(runner)
 
- if @project_runners.include?(runner)
= link_to runner.short_sha.concat("..."), project_runner_path(@project, runner), class: 'commit-sha has-tooltip', title: _("Partial token for reference only")
= link_to _("%{token}...") % { token: runner.short_sha }, project_runner_path(@project, runner), class: 'commit-sha has-tooltip', title: _("Partial token for reference only")
 
- if runner.locked?
= icon('lock', class: 'has-tooltip', title: _('Locked to current projects'))
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment