From fcd7c7b5e18946d5f4ec297aff749a587e45b5b1 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Mon, 15 Oct 2018 16:25:39 +0200 Subject: Fixed syntax issues in specs --- app/assets/javascripts/jobs/job_details_bundle.js | 2 -- spec/javascripts/jobs/components/stages_dropdown_spec.js | 2 +- spec/javascripts/jobs/store/actions_spec.js | 2 +- spec/javascripts/jobs/store/mutations_spec.js | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/jobs/job_details_bundle.js b/app/assets/javascripts/jobs/job_details_bundle.js index 15cd79b1c50..a4926c8e1d2 100644 --- a/app/assets/javascripts/jobs/job_details_bundle.js +++ b/app/assets/javascripts/jobs/job_details_bundle.js @@ -9,8 +9,6 @@ import createStore from './store'; export default () => { const { dataset } = document.getElementById('js-job-details-vue'); - - const store = createStore(); store.dispatch('setJobEndpoint', dataset.endpoint); diff --git a/spec/javascripts/jobs/components/stages_dropdown_spec.js b/spec/javascripts/jobs/components/stages_dropdown_spec.js index fcff78b943e..9c731ae2f68 100644 --- a/spec/javascripts/jobs/components/stages_dropdown_spec.js +++ b/spec/javascripts/jobs/components/stages_dropdown_spec.js @@ -31,7 +31,7 @@ describe('Stages Dropdown', () => { name: 'test', }, ], - selectedStage: 'deploy' + selectedStage: 'deploy', }); }); diff --git a/spec/javascripts/jobs/store/actions_spec.js b/spec/javascripts/jobs/store/actions_spec.js index bc410ae614c..2bb9fdaabd0 100644 --- a/spec/javascripts/jobs/store/actions_spec.js +++ b/spec/javascripts/jobs/store/actions_spec.js @@ -424,7 +424,7 @@ describe('Job State actions', () => { mockedState.job.pipeline = { path: `${TEST_HOST}/endpoint`, }; - mockedState.selectedStage = 'deploy' + mockedState.selectedStage = 'deploy'; mock = new MockAdapter(axios); }); diff --git a/spec/javascripts/jobs/store/mutations_spec.js b/spec/javascripts/jobs/store/mutations_spec.js index 701fcc7f4c8..d857c116180 100644 --- a/spec/javascripts/jobs/store/mutations_spec.js +++ b/spec/javascripts/jobs/store/mutations_spec.js @@ -130,7 +130,7 @@ describe('Jobs Store Mutations', () => { }); it('does not set selectedStage when the selectedStage is not More', () => { - stateCopy.selectedStage = 'notify' + stateCopy.selectedStage = 'notify'; expect(stateCopy.selectedStage).toEqual('notify'); mutations[types.RECEIVE_JOB_SUCCESS](stateCopy, { id: 1312321, stage: 'deploy' }); expect(stateCopy.selectedStage).toEqual('notify'); @@ -219,7 +219,7 @@ describe('Jobs Store Mutations', () => { it('sets selectedStage', () => { mutations[types.REQUEST_JOBS_FOR_STAGE](stateCopy, { name: 'deploy' }); expect(stateCopy.selectedStage).toEqual('deploy'); - }) + }); }); describe('RECEIVE_JOBS_FOR_STAGE_SUCCESS', () => { -- cgit v1.2.1 From df8fdd94ec5be99ea18d3304358c6daa8f3c1155 Mon Sep 17 00:00:00 2001 From: GitLab Release Tools Bot Date: Mon, 15 Oct 2018 22:02:17 +0000 Subject: Update VERSION to 11.4.0-rc6 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index c733186298b..cc0e79f27f9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.4.0-rc5 +11.4.0-rc6 -- cgit v1.2.1 From 245006e2d7d39afa30f6b74b60956e69e4c3212a Mon Sep 17 00:00:00 2001 From: James Lopez Date: Mon, 15 Oct 2018 12:30:34 +0000 Subject: Merge branch 'gitaly-0.125.1' into 'master' Use Gitaly 0.125.1 See merge request gitlab-org/gitlab-ce!22364 --- GITALY_SERVER_VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index b1fa68e5df9..33e061fe7a0 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -0.125.0 +0.125.1 -- cgit v1.2.1 From a05d39a2c3c2a928cbed13416c9ffbfe3b545dcc Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 15 Oct 2018 12:51:30 +0000 Subject: Merge branch '52614-bugs-on-deployment-status-in-job-log-page' into 'master' Send deployment_status when job starts environment Closes #52614 See merge request gitlab-org/gitlab-ce!22354 --- app/serializers/build_details_entity.rb | 2 +- spec/features/projects/jobs_spec.rb | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/app/serializers/build_details_entity.rb b/app/serializers/build_details_entity.rb index 7bdcfcc38f7..066a5b1885c 100644 --- a/app/serializers/build_details_entity.rb +++ b/app/serializers/build_details_entity.rb @@ -9,7 +9,7 @@ class BuildDetailsEntity < JobEntity expose :runner, using: RunnerEntity expose :pipeline, using: PipelineEntity - expose :deployment_status, if: -> (*) { build.has_environment? } do + expose :deployment_status, if: -> (*) { build.starts_environment? } do expose :deployment_status, as: :status expose :persisted_environment, as: :environment, with: EnvironmentEntity diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb index 6224cbffe9d..a3a301504ff 100644 --- a/spec/features/projects/jobs_spec.rb +++ b/spec/features/projects/jobs_spec.rb @@ -423,6 +423,31 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do end end + context 'when job stops environment', :js do + let(:environment) { create(:environment, name: 'production', project: project) } + let(:build) do + create( + :ci_build, + :success, + :trace_live, + environment: environment.name, + pipeline: pipeline, + options: { environment: { action: 'stop' } } + ) + end + + before do + visit project_job_path(project, build) + wait_for_requests + end + + it 'does not show environment information banner' do + expect(page).not_to have_selector('.js-environment-container') + expect(page).not_to have_selector('.environment-information') + expect(page).not_to have_text(environment.name) + end + end + describe 'environment info in job view', :js do before do visit project_job_path(project, job) -- cgit v1.2.1 From c52bc477dcfc46fe85b39c9b76fb269c200176cd Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Mon, 15 Oct 2018 13:10:42 +0000 Subject: Merge branch '52564-personal-projects-pagination-in-profile-overview-tab-is-broken' into 'master' Resolve "Personal projects pagination in Profile Overview tab is broken" Closes #52564 See merge request gitlab-org/gitlab-ce!22321 --- .../javascripts/pages/users/user_overview_block.js | 15 +++++++---- app/assets/javascripts/pages/users/user_tabs.js | 29 +++++++++++++++----- app/controllers/users_controller.rb | 4 ++- app/views/shared/projects/_list.html.haml | 3 ++- ...agination-in-profile-overview-tab-is-broken.yml | 5 ++++ spec/features/users/overview_spec.rb | 31 ++++++++++++++++++++-- 6 files changed, 72 insertions(+), 15 deletions(-) create mode 100644 changelogs/unreleased/52564-personal-projects-pagination-in-profile-overview-tab-is-broken.yml diff --git a/app/assets/javascripts/pages/users/user_overview_block.js b/app/assets/javascripts/pages/users/user_overview_block.js index 0009419cd0c..2ed177be558 100644 --- a/app/assets/javascripts/pages/users/user_overview_block.js +++ b/app/assets/javascripts/pages/users/user_overview_block.js @@ -1,10 +1,15 @@ import axios from '~/lib/utils/axios_utils'; +const DEFAULT_LIMIT = 20; + export default class UserOverviewBlock { constructor(options = {}) { this.container = options.container; this.url = options.url; - this.limit = options.limit || 20; + this.requestParams = { + limit: DEFAULT_LIMIT, + ...options.requestParams, + }; this.loadData(); } @@ -15,9 +20,7 @@ export default class UserOverviewBlock { axios .get(this.url, { - params: { - limit: this.limit, - }, + params: this.requestParams, }) .then(({ data }) => this.render(data)) .catch(() => loadingEl.classList.add('hide')); @@ -34,7 +37,9 @@ export default class UserOverviewBlock { if (count && count > 0) { document.querySelector(`${this.container} .js-view-all`).classList.remove('hide'); } else { - document.querySelector(`${this.container} .nothing-here-block`).classList.add('text-left', 'p-0'); + document + .querySelector(`${this.container} .nothing-here-block`) + .classList.add('text-left', 'p-0'); } loadingEl.classList.add('hide'); diff --git a/app/assets/javascripts/pages/users/user_tabs.js b/app/assets/javascripts/pages/users/user_tabs.js index 23b0348a99f..1de9945baad 100644 --- a/app/assets/javascripts/pages/users/user_tabs.js +++ b/app/assets/javascripts/pages/users/user_tabs.js @@ -182,18 +182,22 @@ export default class UserTabs { this.loadActivityCalendar('overview'); - UserTabs.renderMostRecentBlocks('#js-overview .activities-block', 5); - UserTabs.renderMostRecentBlocks('#js-overview .projects-block', 10); + UserTabs.renderMostRecentBlocks('#js-overview .activities-block', { + requestParams: { limit: 5 }, + }); + UserTabs.renderMostRecentBlocks('#js-overview .projects-block', { + requestParams: { limit: 10, skip_pagination: true }, + }); this.loaded.overview = true; } - static renderMostRecentBlocks(container, limit) { + static renderMostRecentBlocks(container, options) { // eslint-disable-next-line no-new new UserOverviewBlock({ container, url: $(`${container} .overview-content-list`).data('href'), - limit, + ...options, }); } @@ -216,7 +220,12 @@ export default class UserTabs { let calendarHint = ''; if (action === 'activity') { - calendarHint = sprintf(__('Summary of issues, merge requests, push events, and comments (Timezone: %{utcFormatted})'), { utcFormatted }); + calendarHint = sprintf( + __( + 'Summary of issues, merge requests, push events, and comments (Timezone: %{utcFormatted})', + ), + { utcFormatted }, + ); } else if (action === 'overview') { calendarHint = __('Issues, merge requests, pushes and comments.'); } @@ -224,7 +233,15 @@ export default class UserTabs { $calendarWrap.find('.calendar-hint').text(calendarHint); // eslint-disable-next-line no-new - new ActivityCalendar('.tab-pane.active .js-contrib-calendar', '.tab-pane.active .user-calendar-activities', data, calendarActivitiesPath, utcOffset, 0, monthsAgo); + new ActivityCalendar( + '.tab-pane.active .js-contrib-calendar', + '.tab-pane.active .user-calendar-activities', + data, + calendarActivitiesPath, + utcOffset, + 0, + monthsAgo, + ); }) .catch(() => flash(__('There was an error loading users activity calendar.'))); } diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d16240af404..5b70c69d7f4 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -56,10 +56,12 @@ class UsersController < ApplicationController def projects load_projects + skip_pagination = Gitlab::Utils.to_boolean(params[:skip_pagination]) + respond_to do |format| format.html { render 'show' } format.json do - pager_json("shared/projects/_list", @projects.count, projects: @projects) + pager_json("shared/projects/_list", @projects.count, projects: @projects, skip_pagination: skip_pagination) end end end diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml index e1da05d8f08..06eb3d03e31 100644 --- a/app/views/shared/projects/_list.html.haml +++ b/app/views/shared/projects/_list.html.haml @@ -8,6 +8,7 @@ - user = local_assigns[:user] - show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true - remote = false unless local_assigns[:remote] == true +- skip_pagination = false unless local_assigns[:skip_pagination] == true .js-projects-list-holder - if any_projects?(projects) @@ -25,6 +26,6 @@ = icon('lock fw', base: 'circle', class: 'fa-lg private-fork-icon') %strong= pluralize(@private_forks_count, 'private fork') %span  you have no access to. - = paginate_collection(projects, remote: remote) + = paginate_collection(projects, remote: remote) unless skip_pagination - else .nothing-here-block No projects found diff --git a/changelogs/unreleased/52564-personal-projects-pagination-in-profile-overview-tab-is-broken.yml b/changelogs/unreleased/52564-personal-projects-pagination-in-profile-overview-tab-is-broken.yml new file mode 100644 index 00000000000..bddc1e16fab --- /dev/null +++ b/changelogs/unreleased/52564-personal-projects-pagination-in-profile-overview-tab-is-broken.yml @@ -0,0 +1,5 @@ +--- +title: Hide pagination for personal projects on profile overview tab +merge_request: 22321 +author: +type: other diff --git a/spec/features/users/overview_spec.rb b/spec/features/users/overview_spec.rb index 11f357cbaa5..b0ff53f9ccb 100644 --- a/spec/features/users/overview_spec.rb +++ b/spec/features/users/overview_spec.rb @@ -104,8 +104,9 @@ describe 'Overview tab on a user profile', :js do end describe 'user has a personal project' do - let(:private_project) { create(:project, :private, namespace: user.namespace, creator: user) { |p| p.add_maintainer(user) } } - let!(:private_event) { create(:event, project: private_project, author: user) } + before do + create(:project, :private, namespace: user.namespace, creator: user) { |p| p.add_maintainer(user) } + end include_context 'visit overview tab' @@ -119,5 +120,31 @@ describe 'Overview tab on a user profile', :js do expect(find('#js-overview .projects-block')).to have_selector('.js-view-all', visible: true) end end + + describe 'user has more than ten personal projects' do + before do + create_list(:project, 11, :private, namespace: user.namespace, creator: user) do |project| + project.add_maintainer(user) + end + end + + include_context 'visit overview tab' + + it 'it shows max. ten entries in the list of projects' do + page.within('.projects-block') do + expect(page).to have_selector('.project-row', count: 10) + end + end + + it 'shows a link to the project list' do + expect(find('#js-overview .projects-block')).to have_selector('.js-view-all', visible: true) + end + + it 'does not show pagination' do + page.within('.projects-block') do + expect(page).not_to have_selector('.gl-pagination') + end + end + end end end -- cgit v1.2.1 From 576664461f5b8ca86c1d7eab5a4882376766dd97 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Mon, 15 Oct 2018 14:40:08 +0000 Subject: Merge branch '52669-fixes-quick-actions-preview' into 'master' Fixes close/reopen quick actions preview for issues and merge_requests Closes #52669 See merge request gitlab-org/gitlab-ce!22343 --- app/serializers/issue_entity.rb | 2 +- app/serializers/merge_request_widget_entity.rb | 2 +- changelogs/unreleased/52669-fixes-quick-actions-preview.yml | 5 +++++ spec/support/features/issuable_quick_actions_shared_examples.rb | 9 +++++++++ 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 changelogs/unreleased/52669-fixes-quick-actions-preview.yml diff --git a/app/serializers/issue_entity.rb b/app/serializers/issue_entity.rb index 16a477c92fa..c3f7d4651fb 100644 --- a/app/serializers/issue_entity.rb +++ b/app/serializers/issue_entity.rb @@ -42,6 +42,6 @@ class IssueEntity < IssuableEntity end expose :preview_note_path do |issue| - preview_markdown_path(issue.project, quick_actions_target_type: 'Issue', quick_actions_target_id: issue.id) + preview_markdown_path(issue.project, quick_actions_target_type: 'Issue', quick_actions_target_id: issue.iid) end end diff --git a/app/serializers/merge_request_widget_entity.rb b/app/serializers/merge_request_widget_entity.rb index 380e8804f51..9ec24f799ef 100644 --- a/app/serializers/merge_request_widget_entity.rb +++ b/app/serializers/merge_request_widget_entity.rb @@ -222,7 +222,7 @@ class MergeRequestWidgetEntity < IssuableEntity end expose :preview_note_path do |merge_request| - preview_markdown_path(merge_request.project, quick_actions_target_type: 'MergeRequest', quick_actions_target_id: merge_request.id) + preview_markdown_path(merge_request.project, quick_actions_target_type: 'MergeRequest', quick_actions_target_id: merge_request.iid) end expose :merge_commit_path do |merge_request| diff --git a/changelogs/unreleased/52669-fixes-quick-actions-preview.yml b/changelogs/unreleased/52669-fixes-quick-actions-preview.yml new file mode 100644 index 00000000000..51b1425d04d --- /dev/null +++ b/changelogs/unreleased/52669-fixes-quick-actions-preview.yml @@ -0,0 +1,5 @@ +--- +title: Fixes close/reopen quick actions preview for issues and merge_requests +merge_request: 22343 +author: Jacopo Beschi @jacopo-beschi +type: fixed diff --git a/spec/support/features/issuable_quick_actions_shared_examples.rb b/spec/support/features/issuable_quick_actions_shared_examples.rb index 846e697eb96..2a883ce1074 100644 --- a/spec/support/features/issuable_quick_actions_shared_examples.rb +++ b/spec/support/features/issuable_quick_actions_shared_examples.rb @@ -77,6 +77,15 @@ shared_examples 'issuable record that supports quick actions in its description expect(issuable.labels).to eq [label_bug] expect(issuable.milestone).to eq milestone end + + it 'removes the quick action from note and explains it in the preview' do + preview_note("Awesome!\n\n/close") + + expect(page).to have_content 'Awesome!' + expect(page).not_to have_content '/close' + issuable_name = issuable.is_a?(Issue) ? 'issue' : 'merge request' + expect(page).to have_content "Closes this #{issuable_name}." + end end context 'with a note containing only commands' do -- cgit v1.2.1 From 4fa1f7b8398e89a1ae443282d1e6110741556b01 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Mon, 15 Oct 2018 16:27:21 +0000 Subject: Merge branch '52532-unable-to-toggle-issuable-sidebar-out-of-collapsed-state' into 'master' Allow Issue and Merge Request sidebar to be toggled from collapsed state Closes #52532 See merge request gitlab-org/gitlab-ce!22353 --- app/assets/javascripts/main.js | 1 - app/assets/javascripts/right_sidebar.js | 2 -- ...gle-issuable-sidebar-out-of-collapsed-state.yml | 5 ++++ spec/javascripts/right_sidebar_spec.js | 30 +--------------------- 4 files changed, 6 insertions(+), 32 deletions(-) create mode 100644 changelogs/unreleased/52532-unable-to-toggle-issuable-sidebar-out-of-collapsed-state.yml diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index e8aac51a299..a88b575ad99 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -202,7 +202,6 @@ document.addEventListener('DOMContentLoaded', () => { $('.navbar-toggler').on('click', () => { $('.header-content').toggleClass('menu-expanded'); - gl.lazyLoader.loadCheck(); }); // Show/hide comments on diff diff --git a/app/assets/javascripts/right_sidebar.js b/app/assets/javascripts/right_sidebar.js index b27d635c6ac..e75dbaa3413 100644 --- a/app/assets/javascripts/right_sidebar.js +++ b/app/assets/javascripts/right_sidebar.js @@ -57,8 +57,6 @@ Sidebar.prototype.sidebarToggleClicked = function (e, triggered) { $allGutterToggleIcons.removeClass('fa-angle-double-left').addClass('fa-angle-double-right'); $('aside.right-sidebar').removeClass('right-sidebar-collapsed').addClass('right-sidebar-expanded'); $('.layout-page').removeClass('right-sidebar-collapsed').addClass('right-sidebar-expanded'); - - if (gl.lazyLoader) gl.lazyLoader.loadCheck(); } $this.attr('data-original-title', tooltipLabel); diff --git a/changelogs/unreleased/52532-unable-to-toggle-issuable-sidebar-out-of-collapsed-state.yml b/changelogs/unreleased/52532-unable-to-toggle-issuable-sidebar-out-of-collapsed-state.yml new file mode 100644 index 00000000000..9abad3d2cd8 --- /dev/null +++ b/changelogs/unreleased/52532-unable-to-toggle-issuable-sidebar-out-of-collapsed-state.yml @@ -0,0 +1,5 @@ +--- +title: Allow Issue and Merge Request sidebar to be toggled from collapsed state +merge_request: 22353 +author: +type: fixed diff --git a/spec/javascripts/right_sidebar_spec.js b/spec/javascripts/right_sidebar_spec.js index c7190ea9960..911ca19a3df 100644 --- a/spec/javascripts/right_sidebar_spec.js +++ b/spec/javascripts/right_sidebar_spec.js @@ -1,4 +1,4 @@ -/* eslint-disable no-var, one-var, one-var-declaration-per-line, no-return-assign, vars-on-top, jasmine/no-unsafe-spy, max-len */ +/* eslint-disable no-var, one-var, one-var-declaration-per-line, no-return-assign, vars-on-top, max-len */ import $ from 'jquery'; import MockAdapter from 'axios-mock-adapter'; @@ -92,33 +92,5 @@ import Sidebar from '~/right_sidebar'; }); }); }); - - describe('sidebarToggleClicked', () => { - const event = jasmine.createSpyObj('event', ['preventDefault']); - - beforeEach(() => { - spyOn($.fn, 'hasClass').and.returnValue(false); - }); - - afterEach(() => { - gl.lazyLoader = undefined; - }); - - it('calls loadCheck if lazyLoader is set', () => { - gl.lazyLoader = jasmine.createSpyObj('lazyLoader', ['loadCheck']); - - Sidebar.prototype.sidebarToggleClicked(event); - - expect(gl.lazyLoader.loadCheck).toHaveBeenCalled(); - }); - - it('does not throw if lazyLoader is not defined', () => { - gl.lazyLoader = undefined; - - const toggle = Sidebar.prototype.sidebarToggleClicked.bind(null, event); - - expect(toggle).not.toThrow(); - }); - }); }); }).call(window); -- cgit v1.2.1 From 9735108f17d3b757965ae563131d7cbf979419db Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 16 Oct 2018 05:29:49 +0000 Subject: Merge branch 'docs/fix-link-to-when-delayed' into 'master' Fix link to 'when delayed' YAML configuration item See merge request gitlab-org/gitlab-ce!22349 --- doc/ci/pipelines.md | 4 ++-- doc/user/project/img/issue_boards_core.png | Bin doc/user/project/img/issue_boards_premium.png | Bin 3 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 doc/user/project/img/issue_boards_core.png mode change 100755 => 100644 doc/user/project/img/issue_boards_premium.png diff --git a/doc/ci/pipelines.md b/doc/ci/pipelines.md index 44589500eb0..371703a12c8 100644 --- a/doc/ci/pipelines.md +++ b/doc/ci/pipelines.md @@ -197,9 +197,9 @@ stage has a job with a manual action. > [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21767) in GitLab 11.4. -When you do not want to run a job immediately, you can [delay the job to run after a certain period](yaml/README.md#delayed). +When you do not want to run a job immediately, you can [delay the job to run after a certain period](yaml/README.md#when-delayed). This is especially useful for timed incremental rollout that new code is rolled out gradually. -For example, if you start rolling out new code and users do not experience trouble, GitLab automatically completes the deployment from 0% to 100%. +For example, if you start rolling out new code and users do not experience trouble, GitLab automatically completes the deployment from 0% to 100%. Alternatively, if you start rolling out and you noticed that a few users experience trouble with the version, you can stop the timed incremental rollout by canceling the pipeline, and [rolling](environments.md#rolling-back-changes) it back to the stable version. diff --git a/doc/user/project/img/issue_boards_core.png b/doc/user/project/img/issue_boards_core.png old mode 100755 new mode 100644 diff --git a/doc/user/project/img/issue_boards_premium.png b/doc/user/project/img/issue_boards_premium.png old mode 100755 new mode 100644 -- cgit v1.2.1 From 81b5ee73f5d0d3a4d4e7c32be7993c38b0dfacf3 Mon Sep 17 00:00:00 2001 From: Marcia Ramos Date: Mon, 15 Oct 2018 13:06:15 +0000 Subject: Merge branch 'mc/fix-codequality-documentation' into 'master' Revert "Update code quality documentation" See merge request gitlab-org/gitlab-ee!7913 --- doc/ci/examples/code_quality.md | 36 +++---------------------- doc/user/project/merge_requests/code_quality.md | 12 ++++----- 2 files changed, 10 insertions(+), 38 deletions(-) diff --git a/doc/ci/examples/code_quality.md b/doc/ci/examples/code_quality.md index 2cd48f5b2eb..27502ad555c 100644 --- a/doc/ci/examples/code_quality.md +++ b/doc/ci/examples/code_quality.md @@ -1,7 +1,7 @@ # Analyze your project's Code Quality CAUTION: **Caution:** -The job definition shown below is supported on GitLab 11.4 and later versions. +The job definition shown below is supported on GitLab 10.4 and later versions. For earlier versions, use the [old job definition](#old-job-definition). CAUTION: **Caution:** @@ -16,7 +16,7 @@ and Docker. First, you need GitLab Runner with [docker-in-docker executor][dind]. -Once you set up the Runner, add a new job to `.gitlab-ci.yml`. +Once you set up the Runner, add a new job to `.gitlab-ci.yml`, called `code_quality`. ```yaml code_quality: @@ -34,50 +34,22 @@ code_quality: --volume /var/run/docker.sock:/var/run/docker.sock "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code artifacts: - reports: - codequality: [gl-code-quality-report.json] + paths: [gl-code-quality-report.json] ``` The above example will create a `code_quality` job in your CI/CD pipeline which will scan your source code for code quality issues. The report will be saved as an artifact that you can later download and analyze. -TIP: **Tip:** -Starting with [GitLab Starter][ee] 11.4, this information will be automatically -extracted and shown right in the merge request widget. To do so, the CI/CD job -must have a codequality report artifact. Due to implementation limitations we -always take the latest codequality artifact available. -[Learn more on Code Quality in merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html). - TIP: **Tip:** Starting with [GitLab Starter][ee] 9.3, this information will be automatically extracted and shown right in the merge request widget. To do so, the CI/CD job must be named `code_quality` and the artifact path must be `gl-code-quality-report.json`. +[Learn more on Code Quality in merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html). ## Old job definition -For GitLab 11.3 and earlier, the job should look like: - -```yaml -code_quality: - image: docker:stable - variables: - DOCKER_DRIVER: overlay2 - allow_failure: true - services: - - docker:stable-dind - script: - - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - - docker run - --env SOURCE_CODE="$PWD" - --volume "$PWD":/code - --volume /var/run/docker.sock:/var/run/docker.sock - "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code - artifacts: - paths: [gl-code-quality-report.json] -``` - For GitLab 10.3 and earlier, the job should look like: ```yaml diff --git a/doc/user/project/merge_requests/code_quality.md b/doc/user/project/merge_requests/code_quality.md index da0d868416c..ba356877976 100644 --- a/doc/user/project/merge_requests/code_quality.md +++ b/doc/user/project/merge_requests/code_quality.md @@ -27,19 +27,19 @@ For instance, consider the following workflow: ## How it works -In order for the report to show in the merge request, you need to specify a job -that will analyze the code and upload the resulting output JSON as a codequality -report artifact. GitLab will then check this file and show the information -inside the merge request. +In order for the report to show in the merge request, you need to specify a +`code_quality` job (exact name) that will analyze the code and upload the resulting +`gl-code-quality-report.json` as an artifact. GitLab will then check this file and show +the information inside the merge request. >**Note:** If the Code Climate report doesn't have anything to compare to, no information will be displayed in the merge request area. That is the case when you add the -code quality job in your `.gitlab-ci.yml` for the very first time. +`code_quality` job in your `.gitlab-ci.yml` for the very first time. Consecutive merge requests will have something to compare to and the code quality report will be shown properly. -For more information on how the code quality job should look like, check the +For more information on how the `code_quality` job should look like, check the example on [analyzing a project's code quality with Code Climate CLI][cc-docs]. CAUTION: **Caution:** -- cgit v1.2.1 From 9e605363f06333d0e704acd5d18f89569394cf6f Mon Sep 17 00:00:00 2001 From: Evan Read Date: Tue, 16 Oct 2018 01:26:50 +0000 Subject: Merge branch 'batch_comment_docs' into 'master' Documentation for batch comments Closes #7893 See merge request gitlab-org/gitlab-ee!7901 --- doc/user/discussions/img/mr_review_bar.png | Bin 0 -> 28794 bytes doc/user/discussions/img/mr_review_resolve.png | Bin 0 -> 69334 bytes doc/user/discussions/img/mr_review_resolve2.png | Bin 0 -> 29315 bytes .../discussions/img/mr_review_second_comment.png | Bin 0 -> 36338 bytes .../img/mr_review_second_comment_added.png | Bin 0 -> 32066 bytes doc/user/discussions/img/mr_review_start.png | Bin 0 -> 79275 bytes doc/user/discussions/img/mr_review_unresolve.png | Bin 0 -> 31665 bytes doc/user/discussions/img/mr_review_unresolve2.png | Bin 0 -> 28607 bytes .../discussions/img/pending_review_comment.png | Bin 0 -> 28514 bytes .../img/review_comment_quickactions.png | Bin 0 -> 42162 bytes doc/user/discussions/index.md | 61 +++++++++++++++++++++ doc/user/project/merge_requests/index.md | 9 +++ 12 files changed, 70 insertions(+) create mode 100644 doc/user/discussions/img/mr_review_bar.png create mode 100644 doc/user/discussions/img/mr_review_resolve.png create mode 100644 doc/user/discussions/img/mr_review_resolve2.png create mode 100644 doc/user/discussions/img/mr_review_second_comment.png create mode 100644 doc/user/discussions/img/mr_review_second_comment_added.png create mode 100644 doc/user/discussions/img/mr_review_start.png create mode 100644 doc/user/discussions/img/mr_review_unresolve.png create mode 100644 doc/user/discussions/img/mr_review_unresolve2.png create mode 100644 doc/user/discussions/img/pending_review_comment.png create mode 100644 doc/user/discussions/img/review_comment_quickactions.png diff --git a/doc/user/discussions/img/mr_review_bar.png b/doc/user/discussions/img/mr_review_bar.png new file mode 100644 index 00000000000..f86b0596161 Binary files /dev/null and b/doc/user/discussions/img/mr_review_bar.png differ diff --git a/doc/user/discussions/img/mr_review_resolve.png b/doc/user/discussions/img/mr_review_resolve.png new file mode 100644 index 00000000000..8aba4d50cd7 Binary files /dev/null and b/doc/user/discussions/img/mr_review_resolve.png differ diff --git a/doc/user/discussions/img/mr_review_resolve2.png b/doc/user/discussions/img/mr_review_resolve2.png new file mode 100644 index 00000000000..247658da613 Binary files /dev/null and b/doc/user/discussions/img/mr_review_resolve2.png differ diff --git a/doc/user/discussions/img/mr_review_second_comment.png b/doc/user/discussions/img/mr_review_second_comment.png new file mode 100644 index 00000000000..06a0aa82b88 Binary files /dev/null and b/doc/user/discussions/img/mr_review_second_comment.png differ diff --git a/doc/user/discussions/img/mr_review_second_comment_added.png b/doc/user/discussions/img/mr_review_second_comment_added.png new file mode 100644 index 00000000000..f98581ae676 Binary files /dev/null and b/doc/user/discussions/img/mr_review_second_comment_added.png differ diff --git a/doc/user/discussions/img/mr_review_start.png b/doc/user/discussions/img/mr_review_start.png new file mode 100644 index 00000000000..8704a393399 Binary files /dev/null and b/doc/user/discussions/img/mr_review_start.png differ diff --git a/doc/user/discussions/img/mr_review_unresolve.png b/doc/user/discussions/img/mr_review_unresolve.png new file mode 100644 index 00000000000..16af59fc69a Binary files /dev/null and b/doc/user/discussions/img/mr_review_unresolve.png differ diff --git a/doc/user/discussions/img/mr_review_unresolve2.png b/doc/user/discussions/img/mr_review_unresolve2.png new file mode 100644 index 00000000000..b9b8255f16b Binary files /dev/null and b/doc/user/discussions/img/mr_review_unresolve2.png differ diff --git a/doc/user/discussions/img/pending_review_comment.png b/doc/user/discussions/img/pending_review_comment.png new file mode 100644 index 00000000000..6a7521766dd Binary files /dev/null and b/doc/user/discussions/img/pending_review_comment.png differ diff --git a/doc/user/discussions/img/review_comment_quickactions.png b/doc/user/discussions/img/review_comment_quickactions.png new file mode 100644 index 00000000000..18ab8bce216 Binary files /dev/null and b/doc/user/discussions/img/review_comment_quickactions.png differ diff --git a/doc/user/discussions/index.md b/doc/user/discussions/index.md index 1b3fb9db4ec..961691f9853 100644 --- a/doc/user/discussions/index.md +++ b/doc/user/discussions/index.md @@ -273,6 +273,67 @@ edit existing comments. Non-team members are restricted from adding or editing c Additionally locked issues can not be reopened. +## Merge Request Reviews **[PREMIUM]** + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4213) in GitLab 11.4. + +When looking at a Merge Request diff, you are able to start a review. +This allows you to create comments inside a Merge Request that are **only visible to you** until published, +in order to allow you to submit them all as a single action. + +### Starting a review + +In order to start a review, simply write a comment on a diff as normal under the **Changes** tab +in an MR and click on the **Start a review** button. + +![Starting a review](img/mr_review_start.png) + +Once a review is started, you will see any comments that are part of this review marked `Pending`. +All comments that are part of a review show two buttons: + +- **Submit review**: Submits all comments that are part of the review, making them visible to other users. +- **Add comment now**: Submits the specific comment as a regular comment instead of as part of the review. + +![A comment that is part of a review](img/pending_review_comment.png) + +You can use [quick actions] inside review comments. The comment will show the actions that will be performed once published. + +![A review comment with quick actions](img/review_comment_quickactions.png) + +To add more comments to a review, start writing a comment as normal and click the **Add to review** button. + +![Adding a second comment to a review](img/mr_review_second_comment.png) + +This will add the comment to the review. + +![Second review comment](img/mr_review_second_comment_added.png) + +### Resolving/Unresolving discussions + +Review comments can also resolve/unresolve [resolvable discussions](#resolvable-discussions). +When replying to a comment, you will see a checkbox that you can click in order to resolve or unresolve +the discussion once published. + +![Resolve checkbox](img/mr_review_resolve.png) +![Unresolve checkbox](img/mr_review_unresolve.png) + +If a particular pending comment will resolve or unresolve the discussion, this will be shown on the pending +comment itself. + +![Resolve status](img/mr_review_resolve2.png) +![Unresolve status](img/mr_review_unresolve2.png) + +### Submitting a review + +If you have any comments that have not been submitted, you will see a bar at the bottom of the screen with two buttons: + +- **Discard**: Discards all comments that have not been submitted. +- **Submit review**: All comments are published. Any quick actions submitted are performed at this time. + +Alternatively, every pending comment has a button to submit the entire review. + +![MR Review bar](img/mr_review_bar.png) + [ce-5022]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5022 [ce-7125]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7125 [ce-7527]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7527 diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md index a85ace2adac..5572e97d58b 100644 --- a/doc/user/project/merge_requests/index.md +++ b/doc/user/project/merge_requests/index.md @@ -33,6 +33,7 @@ With GitLab merge requests, you can: With **[GitLab Enterprise Edition][ee]**, you can also: +- Prepare a full review and submit it once it's ready with [Merge Request Reviews](../../discussions/index.md#merge-request-reviews) **[PREMIUM]** - View the deployment process across projects with [Multi-Project Pipelines](../../../ci/multi_project_pipelines.md#multi-project-pipeline-graphs) **[PREMIUM]** - Request [approvals](merge_request_approvals.md) from your managers **[STARTER]** - Analyze the impact of your changes with [Code Quality reports](code_quality.md) **[STARTER]** @@ -149,6 +150,14 @@ you hide discussions that are no longer relevant. [Read more about resolving discussion comments in merge requests reviews.](../../discussions/index.md) +## Perform a Review **[PREMIUM]** + +Start a review in order to create multiple comments on a diff and publish them once you're ready. +Starting a review allows you to get all your thoughts in order and ensure you haven't missed anything +before submitting all your comments. + +[Learn more about Merge Request Reviews](../../discussions/index.md#merge-request-reviews) + ## Squash and merge GitLab allows you to squash all changes present in a merge request into a single -- cgit v1.2.1 From 449a5dbb13575ea8c4fb7689de4013dc4295d9e5 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 16 Oct 2018 06:15:07 +0000 Subject: Merge branch 'docs/manual-license-management' into 'master' Add steps for manual license management Closes #7971 See merge request gitlab-org/gitlab-ee!7920 --- doc/user/project/index.md | 3 +- .../project/merge_requests/license_management.md | 42 ++++++++++++++++------ 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/doc/user/project/index.md b/doc/user/project/index.md index 07f8cc97836..76ff7ae60fa 100644 --- a/doc/user/project/index.md +++ b/doc/user/project/index.md @@ -86,10 +86,11 @@ website with GitLab Pages - [Cycle Analytics](cycle_analytics.md): Review your development lifecycle - [Security Dashboard](security_dashboard.md): Security Dashboard - [Syntax highlighting](highlighting.md): An alternative to customize -your code blocks, overriding GitLab's default choice of language + your code blocks, overriding GitLab's default choice of language - [Badges](badges.md): Badges for the project overview - [Maven packages](packages/maven_repository.md): Your private Maven repository in GitLab **[PREMIUM]** - [Code owners](code_owners.md): Specify code owners for certain files **[STARTER]** +- [License Management](merge_requests/license_management.md): Approve and blacklist licenses for projects **[ULTIMATE]** ### Project's integrations diff --git a/doc/user/project/merge_requests/license_management.md b/doc/user/project/merge_requests/license_management.md index 3076fabaa1e..3bee185cd11 100644 --- a/doc/user/project/merge_requests/license_management.md +++ b/doc/user/project/merge_requests/license_management.md @@ -5,16 +5,17 @@ ## Overview If you are using [GitLab CI/CD][ci], you can search your project dependencies for their licenses -using License Management, either by -including the CI job in your [existing `.gitlab-ci.yml` file][cc-docs] or -by implicitly using [Auto License Management](../../../topics/autodevops/index.md#auto-dependency-scanning) -that is provided by [Auto DevOps](../../../topics/autodevops/index.md). +using License Management by: -Going a step further, GitLab can show the licenses list right in the merge +- Including the CI job in your [existing `.gitlab-ci.yml` file][cc-docs]. +- Implicitly using [Auto License Management](../../../topics/autodevops/index.md#auto-dependency-scanning) + that is provided by [Auto DevOps](../../../topics/autodevops/index.md). + +In addition, you can [manually approve or blacklist](#manual-license-management) licenses in the project's settings. + +GitLab can show the licenses list right in the merge request widget area, highlighting the presence of licenses you don't want to use, or new ones that need a decision. -Licenses can be accepted or blacklisted in the project settings, or directly from the -merge request widget. ## Use cases @@ -37,7 +38,7 @@ The following languages and package managers are supported. ## How it works -First of all, you need to define a job named `license_management` in your +First, you need to define a job named `license_management` in your `.gitlab-ci.yml` file. [Check how the `license_management` job should look like][cc-docs]. In order for the report to show in the merge request, there are two @@ -50,7 +51,7 @@ prerequisites: >**Note:** If the license management report doesn't have anything to compare to, no information will be displayed in the merge request area. That is the case when you add the -`license_management` job in your `.gitlab-ci.yml` for the very first time. +`license_management` job in your `.gitlab-ci.yml` for the first time. Consecutive merge requests will have something to compare to and the license management report will be shown properly. @@ -67,10 +68,31 @@ the choice to approve it or blacklist it. ![License approval decision](img/license_management_decision.png) -The list of licenses and their status can also be managed from the project settings. +From the project's settings: + +- The list of licenses and their status can be managed. +- Licenses can be [manually approved or blacklisted](#manual-license-management). ![License Management Settings](img/license_management_settings.png) +### Manual license management + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/5940) in [GitLab Ultimate][ee] 11.4. + +Licenses can be manually approved or blacklisted in a project's settings. + +To approve or blacklist a license: + +1. Navigate to the project's **Settings > CI/CD**. +1. Expand the **License Management** section and click the **Add a license** button. +1. In the **License name** dropdown, either: + - Select one of the available licenses. You can search for licenses in the field + at the top of the list. + - Enter arbitrary text in the field at the top of the list. This will cause the text to be + added as a license name to the list. +1. Select the **Approve** or **Blacklist** radio button to approve or blacklist respectively + the selected license. + ## License Management report under pipelines > [Introduced][ee-5491] in [GitLab Ultimate][ee] 11.2. -- cgit v1.2.1