Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
bd1e3cbdeb
commit
fe30598cbd
8 changed files with 50 additions and 11 deletions
|
@ -22,7 +22,7 @@ export default {
|
||||||
<gl-nav class="navbar-sub-nav">
|
<gl-nav class="navbar-sub-nav">
|
||||||
<gl-nav-item-dropdown
|
<gl-nav-item-dropdown
|
||||||
:text="navData.activeTitle"
|
:text="navData.activeTitle"
|
||||||
icon="dot-grid"
|
icon="hamburger"
|
||||||
menu-class="gl-mt-3! gl-max-w-none! gl-max-h-none! gl-sm-w-auto! js-top-nav-dropdown-menu"
|
menu-class="gl-mt-3! gl-max-w-none! gl-max-h-none! gl-sm-w-auto! js-top-nav-dropdown-menu"
|
||||||
toggle-class="top-nav-toggle js-top-nav-dropdown-toggle gl-px-3!"
|
toggle-class="top-nav-toggle js-top-nav-dropdown-toggle gl-px-3!"
|
||||||
no-flip
|
no-flip
|
||||||
|
|
|
@ -23,14 +23,15 @@ module Boards
|
||||||
end
|
end
|
||||||
|
|
||||||
reposition_ids = move_between_ids(params)
|
reposition_ids = move_between_ids(params)
|
||||||
if reposition_ids
|
attrs.merge!(reposition_params(reposition_ids)) if reposition_ids
|
||||||
attrs[:move_between_ids] = reposition_ids
|
|
||||||
attrs.merge!(reposition_parent)
|
|
||||||
end
|
|
||||||
|
|
||||||
attrs
|
attrs
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def reposition_params(reposition_ids)
|
||||||
|
reposition_parent.merge(move_between_ids: reposition_ids)
|
||||||
|
end
|
||||||
|
|
||||||
def move_single_issuable(issuable, issuable_modification_params)
|
def move_single_issuable(issuable, issuable_modification_params)
|
||||||
ability_name = :"admin_#{issuable.to_ability_name}"
|
ability_name = :"admin_#{issuable.to_ability_name}"
|
||||||
return unless can?(current_user, ability_name, issuable)
|
return unless can?(current_user, ability_name, issuable)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
%ul.list-unstyled.navbar-sub-nav#js-top-nav{ data: { view_model: view_model.to_json } }
|
%ul.list-unstyled.navbar-sub-nav#js-top-nav{ data: { view_model: view_model.to_json } }
|
||||||
%li
|
%li
|
||||||
%a.top-nav-toggle{ href: '#', type: 'button', data: { toggle: "dropdown" } }
|
%a.top-nav-toggle{ href: '#', type: 'button', data: { toggle: "dropdown" } }
|
||||||
= sprite_icon('dot-grid', css_class: "dropdown-icon")
|
= sprite_icon('hamburger', css_class: "dropdown-icon")
|
||||||
= view_model[:activeTitle]
|
= view_model[:activeTitle]
|
||||||
= sprite_icon('chevron-down')
|
= sprite_icon('chevron-down')
|
||||||
|
|
||||||
|
|
|
@ -2105,14 +2105,17 @@ Input type: `EpicMoveListInput`
|
||||||
| <a id="mutationepicmovelistboardid"></a>`boardId` | [`BoardsEpicBoardID!`](#boardsepicboardid) | Global ID of the board that the epic is in. |
|
| <a id="mutationepicmovelistboardid"></a>`boardId` | [`BoardsEpicBoardID!`](#boardsepicboardid) | Global ID of the board that the epic is in. |
|
||||||
| <a id="mutationepicmovelistclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
| <a id="mutationepicmovelistclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||||
| <a id="mutationepicmovelistepicid"></a>`epicId` | [`EpicID!`](#epicid) | ID of the epic to mutate. |
|
| <a id="mutationepicmovelistepicid"></a>`epicId` | [`EpicID!`](#epicid) | ID of the epic to mutate. |
|
||||||
| <a id="mutationepicmovelistfromlistid"></a>`fromListId` | [`BoardsEpicListID!`](#boardsepiclistid) | ID of the board list that the epic will be moved from. |
|
| <a id="mutationepicmovelistfromlistid"></a>`fromListId` | [`BoardsEpicListID`](#boardsepiclistid) | ID of the board list that the epic will be moved from. Required if moving between lists. |
|
||||||
| <a id="mutationepicmovelisttolistid"></a>`toListId` | [`BoardsEpicListID!`](#boardsepiclistid) | ID of the board list that the epic will be moved to. |
|
| <a id="mutationepicmovelistmoveafterid"></a>`moveAfterId` | [`EpicID`](#epicid) | ID of epic that should be placed after the current epic. |
|
||||||
|
| <a id="mutationepicmovelistmovebeforeid"></a>`moveBeforeId` | [`EpicID`](#epicid) | ID of epic that should be placed before the current epic. |
|
||||||
|
| <a id="mutationepicmovelisttolistid"></a>`toListId` | [`BoardsEpicListID!`](#boardsepiclistid) | ID of the list the epic will be in after mutation. |
|
||||||
|
|
||||||
#### Fields
|
#### Fields
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
| ---- | ---- | ----------- |
|
| ---- | ---- | ----------- |
|
||||||
| <a id="mutationepicmovelistclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
| <a id="mutationepicmovelistclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||||
|
| <a id="mutationepicmovelistepic"></a>`epic` | [`Epic`](#epic) | The epic after mutation. |
|
||||||
| <a id="mutationepicmovelisterrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
| <a id="mutationepicmovelisterrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||||
|
|
||||||
### `Mutation.epicSetSubscription`
|
### `Mutation.epicSetSubscription`
|
||||||
|
|
|
@ -62,6 +62,9 @@ The [default ruleset provided by Gitleaks](https://gitlab.com/gitlab-org/securit
|
||||||
- Password in URL
|
- Password in URL
|
||||||
- U.S. Social Security Number
|
- U.S. Social Security Number
|
||||||
|
|
||||||
|
WARNING:
|
||||||
|
Gitleaks does not support scanning binary files.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
To run Secret Detection jobs, by default, you need GitLab Runner with the
|
To run Secret Detection jobs, by default, you need GitLab Runner with the
|
||||||
|
|
|
@ -18,9 +18,9 @@ module Gitlab
|
||||||
def conflicts
|
def conflicts
|
||||||
@conflicts ||= wrapped_gitaly_errors do
|
@conflicts ||= wrapped_gitaly_errors do
|
||||||
gitaly_conflicts_client(@target_repository).list_conflict_files.to_a
|
gitaly_conflicts_client(@target_repository).list_conflict_files.to_a
|
||||||
|
rescue GRPC::FailedPrecondition => e
|
||||||
|
raise Gitlab::Git::Conflict::Resolver::ConflictSideMissing, e.message
|
||||||
end
|
end
|
||||||
rescue GRPC::FailedPrecondition => e
|
|
||||||
raise Gitlab::Git::Conflict::Resolver::ConflictSideMissing, e.message
|
|
||||||
rescue GRPC::BadStatus => e
|
rescue GRPC::BadStatus => e
|
||||||
raise Gitlab::Git::CommandError, e
|
raise Gitlab::Git::CommandError, e
|
||||||
end
|
end
|
||||||
|
|
|
@ -30,7 +30,7 @@ describe('~/nav/components/top_nav_app.vue', () => {
|
||||||
it('renders nav item dropdown', () => {
|
it('renders nav item dropdown', () => {
|
||||||
expect(findNavItemDropdown().attributes('href')).toBeUndefined();
|
expect(findNavItemDropdown().attributes('href')).toBeUndefined();
|
||||||
expect(findNavItemDropdown().attributes()).toMatchObject({
|
expect(findNavItemDropdown().attributes()).toMatchObject({
|
||||||
icon: 'dot-grid',
|
icon: 'hamburger',
|
||||||
text: TEST_NAV_DATA.activeTitle,
|
text: TEST_NAV_DATA.activeTitle,
|
||||||
'no-flip': '',
|
'no-flip': '',
|
||||||
});
|
});
|
||||||
|
|
32
spec/lib/gitlab/git/conflict/resolver_spec.rb
Normal file
32
spec/lib/gitlab/git/conflict/resolver_spec.rb
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
RSpec.describe Gitlab::Git::Conflict::Resolver do
|
||||||
|
let(:repository) { instance_double(Gitlab::Git::Repository) }
|
||||||
|
let(:our_commit_oid) { 'our-commit-oid' }
|
||||||
|
let(:their_commit_oid) { 'their-commit-oid' }
|
||||||
|
let(:gitaly_conflicts_client) { instance_double(Gitlab::GitalyClient::ConflictsService) }
|
||||||
|
|
||||||
|
subject(:resolver) { described_class.new(repository, our_commit_oid, their_commit_oid) }
|
||||||
|
|
||||||
|
describe '#conflicts' do
|
||||||
|
before do
|
||||||
|
allow(repository).to receive(:gitaly_conflicts_client).and_return(gitaly_conflicts_client)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'returns list of conflicts' do
|
||||||
|
conflicts = [double]
|
||||||
|
|
||||||
|
expect(gitaly_conflicts_client).to receive(:list_conflict_files).and_return(conflicts)
|
||||||
|
expect(resolver.conflicts).to eq(conflicts)
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when GRPC::FailedPrecondition is raised' do
|
||||||
|
it 'rescues and raises Gitlab::Git::Conflict::Resolver::ConflictSideMissing' do
|
||||||
|
expect(gitaly_conflicts_client).to receive(:list_conflict_files).and_raise(GRPC::FailedPrecondition)
|
||||||
|
expect { resolver.conflicts }.to raise_error(Gitlab::Git::Conflict::Resolver::ConflictSideMissing)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue