Commit 98da16a0 authored by Shinya Maeda's avatar Shinya Maeda

Merge branch 'ce-to-ee-2017-11-08' of https://gitlab.com/gitlab-org/gitlab-ee...

Merge branch 'ce-to-ee-2017-11-08' of https://gitlab.com/gitlab-org/gitlab-ee into ce-to-ee-2017-11-08
parents 32ce45ef 92bbcbc3
......@@ -33,7 +33,6 @@ gl.issueBoards.BoardsStore = {
this.detail = {
issue: {},
};
<<<<<<< HEAD
},
createNewListDropdownData() {
this.state.currentBoard = {
......@@ -45,8 +44,6 @@ gl.issueBoards.BoardsStore = {
showPage(page) {
this.state.reload = false;
this.state.currentPage = page;
=======
>>>>>>> upstream/master
},
addList (listObj, defaultAvatar) {
const list = new List(listObj, defaultAvatar);
......
......@@ -33,13 +33,10 @@ import NamespaceSelect from './namespace_select';
import Labels from './labels';
import LabelManager from './label_manager';
/* global Sidebar */
<<<<<<< HEAD
/* global WeightSelect */
/* global AdminEmailSelect */
=======
import Flash from './flash';
>>>>>>> upstream/master
import CommitsList from './commits';
import Issue from './issue';
import BindInOut from './behaviors/bind_in_out';
......
......@@ -148,7 +148,6 @@ import _ from 'underscore';
$(`[data-milestone-id="${selectedMilestone}"] > a`, $el).addClass('is-active');
},
vue: $dropdown.hasClass('js-issue-board-sidebar'),
<<<<<<< HEAD
hideRow: function(milestone) {
if ($('html').hasClass('issue-boards-page') && !$dropdown.hasClass('js-issue-board-sidebar') &&
!$dropdown.closest('.add-issues-modal').length && gl.issueBoards.BoardsStore.state.currentBoard.milestone &&
......@@ -167,8 +166,6 @@ import _ from 'underscore';
return true;
},
=======
>>>>>>> upstream/master
clicked: function(clickEvent) {
const { $el, e } = clickEvent;
let selected = clickEvent.selectedObj;
......
......@@ -59,13 +59,10 @@
&.avatar-tile {
border-radius: 0;
border: 0;
<<<<<<< HEAD
}
&.avatar-placeholder {
border: 0;
=======
>>>>>>> upstream/master
}
&:not([href]):hover {
......
......@@ -48,7 +48,3 @@ body.modal-open {
.modal.popup-dialog {
display: block;
}
<<<<<<< HEAD
=======
>>>>>>> upstream/master
......@@ -111,15 +111,11 @@
margin: auto;
align-items: center;
<<<<<<< HEAD
.md-area {
=======
.icon {
margin-right: $issuable-warning-icon-margin;
}
+ .md-area {
>>>>>>> upstream/master
border-top-left-radius: 0;
border-top-right-radius: 0;
}
......
......@@ -9,13 +9,8 @@ class Projects::IssuesController < Projects::ApplicationController
prepend_before_action :authenticate_user!, only: [:new, :export_csv]
before_action :check_issues_available!
<<<<<<< HEAD
before_action :issue, except: [:index, :new, :create, :bulk_update, :export_csv]
before_action :set_issues_index, only: [:index]
=======
before_action :issue, except: [:index, :new, :create, :bulk_update]
before_action :set_issuables_index, only: [:index]
>>>>>>> upstream/master
# Allow write(create) issue
before_action :authorize_create_issue!, only: [:new, :create]
......
......@@ -60,20 +60,14 @@ class Projects::RefsController < Projects::ApplicationController
file = @path ? File.join(@path, content.name) : content.name
last_commit = @repo.last_commit_for_path(@commit.id, file)
commit_path = project_commit_path(@project, last_commit) if last_commit
<<<<<<< HEAD
path_lock = show_path_locks && @project.find_path_lock(file)
=======
>>>>>>> upstream/master
{
file_name: content.name,
commit: last_commit,
type: content.type,
<<<<<<< HEAD
lock_label: path_lock && text_label_for_lock(path_lock, file),
=======
>>>>>>> upstream/master
commit_path: commit_path
commit_path: commit_path,
lock_label: path_lock && text_label_for_lock(path_lock, file)
}
end
end
......
......@@ -3,11 +3,6 @@ class MergeRequest < ActiveRecord::Base
include Issuable
include Noteable
include Referable
<<<<<<< HEAD
include Sortable
include Elastic::MergeRequestsSearch
=======
>>>>>>> upstream/master
include IgnorableColumn
include TimeTrackable
......@@ -15,6 +10,7 @@ class MergeRequest < ActiveRecord::Base
:ref_fetched
include ::EE::MergeRequest
include Elastic::MergeRequestsSearch
belongs_to :target_project, class_name: "Project"
belongs_to :source_project, class_name: "Project"
......
......@@ -17,11 +17,9 @@ class Repository
].freeze
include Gitlab::ShellAdapter
<<<<<<< HEAD
include Elastic::RepositoriesSearch
prepend EE::Repository
=======
>>>>>>> upstream/master
include Elastic::RepositoriesSearch
attr_accessor :full_path, :disk_path, :project, :is_wiki
......@@ -1027,13 +1025,8 @@ class Repository
gitlab_shell.fetch_remote(raw_repository, remote, ssh_auth: ssh_auth, forced: forced, no_tags: no_tags)
end
<<<<<<< HEAD
def fetch_source_branch(source_repository, source_branch, local_ref)
raw_repository.fetch_source_branch(source_repository.raw_repository, source_branch, local_ref)
=======
def fetch_source_branch!(source_repository, source_branch, local_ref)
raw_repository.fetch_source_branch!(source_repository.raw_repository, source_branch, local_ref)
>>>>>>> upstream/master
end
def compare_source_branch(target_branch_name, source_repository, source_branch_name, straight:)
......
......@@ -212,13 +212,10 @@ if Gitlab::Metrics.enabled?
GC::Profiler.enable
Gitlab::Metrics::Samplers::InfluxSampler.initialize_instance.start
<<<<<<< HEAD
Gitlab::Metrics::Instrumentation.configure do |config|
config.instrument_instance_methods(Gitlab::InsecureKeyFingerprint)
end
=======
>>>>>>> upstream/master
module TrackNewRedisConnections
def connect(*args)
......
......@@ -11,11 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
<<<<<<< HEAD
ActiveRecord::Schema.define(version: 20171107090120) do
=======
ActiveRecord::Schema.define(version: 20171106101200) do
>>>>>>> upstream/master
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -1026,15 +1022,6 @@ ActiveRecord::Schema.define(version: 20171106101200) do
add_index "gpg_signatures", ["gpg_key_subkey_id"], name: "index_gpg_signatures_on_gpg_key_subkey_id", using: :btree
add_index "gpg_signatures", ["project_id"], name: "index_gpg_signatures_on_project_id", using: :btree
<<<<<<< HEAD
create_table "historical_data", force: :cascade do |t|
t.date "date", null: false
t.integer "active_user_count"
t.datetime "created_at"
t.datetime "updated_at"
end
=======
create_table "group_custom_attributes", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
......@@ -1046,7 +1033,13 @@ ActiveRecord::Schema.define(version: 20171106101200) do
add_index "group_custom_attributes", ["group_id", "key"], name: "index_group_custom_attributes_on_group_id_and_key", unique: true, using: :btree
add_index "group_custom_attributes", ["key", "value"], name: "index_group_custom_attributes_on_key_and_value", using: :btree
>>>>>>> upstream/master
create_table "historical_data", force: :cascade do |t|
t.date "date", null: false
t.integer "active_user_count"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "identities", force: :cascade do |t|
t.string "extern_uid"
t.string "provider"
......@@ -2417,11 +2410,8 @@ ActiveRecord::Schema.define(version: 20171106101200) do
add_foreign_key "gpg_signatures", "gpg_key_subkeys", on_delete: :nullify
add_foreign_key "gpg_signatures", "gpg_keys", on_delete: :nullify
add_foreign_key "gpg_signatures", "projects", on_delete: :cascade
<<<<<<< HEAD
add_foreign_key "index_statuses", "projects", name: "fk_74b2492545", on_delete: :cascade
=======
add_foreign_key "group_custom_attributes", "namespaces", column: "group_id", on_delete: :cascade
>>>>>>> upstream/master
add_foreign_key "index_statuses", "projects", name: "fk_74b2492545", on_delete: :cascade
add_foreign_key "issue_assignees", "issues", name: "fk_b7d881734a", on_delete: :cascade
add_foreign_key "issue_assignees", "users", name: "fk_5e0c8d9154", on_delete: :cascade
add_foreign_key "issue_links", "issues", column: "source_id", name: "fk_c900194ff2", on_delete: :cascade
......
......@@ -210,10 +210,6 @@ Parameters:
"merge_commit_sha": null,
"user_notes_count": 1,
"changes_count": "1",
<<<<<<< HEAD
"approvals_before_merge": null
=======
>>>>>>> upstream/master
"should_remove_source_branch": true,
"force_remove_source_branch": false,
"squash": false,
......@@ -224,7 +220,8 @@ Parameters:
"total_time_spent": 0,
"human_time_estimate": null,
"human_total_time_spent": null
}
},
"approvals_before_merge": null
}
]
```
......@@ -292,10 +289,6 @@ Parameters:
"merge_commit_sha": "9999999999999999999999999999999999999999",
"user_notes_count": 1,
"changes_count": "1",
<<<<<<< HEAD
"approvals_before_merge": null
=======
>>>>>>> upstream/master
"should_remove_source_branch": true,
"force_remove_source_branch": false,
"squash": false,
......@@ -306,7 +299,8 @@ Parameters:
"total_time_spent": 0,
"human_time_estimate": null,
"human_total_time_spent": null
}
},
"approvals_before_merge": null
}
```
......@@ -410,10 +404,6 @@ Parameters:
"merge_commit_sha": null,
"user_notes_count": 1,
"changes_count": "1",
<<<<<<< HEAD
"approvals_before_merge": null,
=======
>>>>>>> upstream/master
"should_remove_source_branch": true,
"force_remove_source_branch": false,
"squash": false,
......@@ -436,7 +426,8 @@ Parameters:
"renamed_file": false,
"deleted_file": false
}
]
],
"approvals_before_merge": null
}
```
......@@ -521,10 +512,6 @@ order for it to take effect:
"merge_commit_sha": null,
"user_notes_count": 0,
"changes_count": "1",
<<<<<<< HEAD
"approvals_before_merge": null
=======
>>>>>>> upstream/master
"should_remove_source_branch": true,
"force_remove_source_branch": false,
"squash": false,
......@@ -535,7 +522,8 @@ order for it to take effect:
"total_time_spent": 0,
"human_time_estimate": null,
"human_total_time_spent": null
}
},
"approvals_before_merge": null
}
```
......@@ -613,10 +601,6 @@ Must include at least one non-required attribute from above.
"merge_commit_sha": null,
"user_notes_count": 1,
"changes_count": "1",
<<<<<<< HEAD
"approvals_before_merge": null
=======
>>>>>>> upstream/master
"should_remove_source_branch": true,
"force_remove_source_branch": false,
"squash": false,
......@@ -627,7 +611,8 @@ Must include at least one non-required attribute from above.
"total_time_spent": 0,
"human_time_estimate": null,
"human_total_time_spent": null
}
},
"approvals_before_merge": null
}
```
......@@ -724,10 +709,6 @@ Parameters:
"merge_commit_sha": "9999999999999999999999999999999999999999",
"user_notes_count": 1,
"changes_count": "1",
<<<<<<< HEAD
"approvals_before_merge": null
=======
>>>>>>> upstream/master
"should_remove_source_branch": true,
"force_remove_source_branch": false,
"squash": false,
......@@ -738,7 +719,8 @@ Parameters:
"total_time_spent": 0,
"human_time_estimate": null,
"human_total_time_spent": null
}
},
"approvals_before_merge": null
}
```
......@@ -933,10 +915,6 @@ Parameters:
"merge_commit_sha": null,
"user_notes_count": 1,
"changes_count": "1",
<<<<<<< HEAD
"approvals_before_merge": null
=======
>>>>>>> upstream/master
"should_remove_source_branch": true,
"force_remove_source_branch": false,
"squash": false,
......@@ -947,7 +925,8 @@ Parameters:
"total_time_spent": 0,
"human_time_estimate": null,
"human_total_time_spent": null
}
},
"approvals_before_merge": null
}
```
......@@ -1014,13 +993,9 @@ Example response when the GitLab issue tracker is used:
"iid" : 6,
"labels" : [],
"user_notes_count": 1,
<<<<<<< HEAD
"changes_count": "1",
"approvals_before_merge": null
=======
"changes_count": "1"
>>>>>>> upstream/master
},
}
]
```
......
......@@ -6,7 +6,7 @@ module EE
prepended do
before_action :check_export_issues_available!, only: [:export_csv]
before_action :check_service_desk_available!, only: [:service_desk]
before_action :set_issues_index, only: [:index, :service_desk]
before_action :set_issuables_index, only: [:index, :service_desk]
skip_before_action :issue, only: [:service_desk]
end
......
......@@ -15,13 +15,10 @@ module Gitlab
update_protected_tag: 'Protected tags cannot be updated.',
delete_protected_tag: 'Protected tags cannot be deleted.',
create_protected_tag: 'You are not allowed to create this tag as it is protected.',
<<<<<<< HEAD
lfs_objects_missing: 'LFS objects are missing. Ensure LFS is properly set up or try a manual "git lfs push --all".',
push_rule_branch_name: "Branch name does not follow the pattern '%{branch_name_regex}'",
push_rule_committer_not_verified: "Comitter email '%{commiter_email}' is not verified.",
push_rule_committer_not_allowed: "You cannot push commits for '%{committer_email}'. You can only push commits that were committed with one of your own verified emails."
=======
lfs_objects_missing: 'LFS objects are missing. Ensure LFS is properly set up or try a manual "git lfs push --all".'
>>>>>>> upstream/master
}.freeze
# protocol is currently used only in EE
......@@ -46,11 +43,8 @@ module Gitlab
push_checks
branch_checks
tag_checks
<<<<<<< HEAD
push_rule_check
=======
lfs_objects_exist_check
>>>>>>> upstream/master
push_rule_check
true
end
......@@ -156,7 +150,14 @@ module Gitlab
Checks::MatchingMergeRequest.new(@newrev, @branch_name, @project).match?
end
<<<<<<< HEAD
def lfs_objects_exist_check
lfs_check = Checks::LfsIntegrity.new(project, @newrev)
if lfs_check.objects_missing?
raise GitAccess::UnauthorizedError, ERROR_MESSAGES[:lfs_objects_missing]
end
end
def push_rule_check
return unless @newrev && @oldrev && project.feature_available?(:push_rules)
......@@ -334,14 +335,6 @@ module Gitlab
def commits
project.repository.new_commits(@newrev)
=======
def lfs_objects_exist_check
lfs_check = Checks::LfsIntegrity.new(project, @newrev)
if lfs_check.objects_missing?
raise GitAccess::UnauthorizedError, ERROR_MESSAGES[:lfs_objects_missing]
end
>>>>>>> upstream/master
end
end
end
......
......@@ -70,7 +70,6 @@ module Gitlab
def add_event(event_name, tags = {})
self.class.metric_event_counter(event_name, tags).increment(tags.merge(labels))
@metrics << Metric.new(EVENT_SERIES, { count: 1 }, tags.merge(event: event_name), :event)
<<<<<<< HEAD
end
#
......@@ -80,8 +79,6 @@ module Gitlab
{ count: 1 }.merge(values),
{ event: event_name }.merge(tags),
:event)
=======
>>>>>>> upstream/master
end
# Returns a MethodCall object for the given name.
......
......@@ -10,12 +10,8 @@ describe Gitlab::Checks::ChangeAccess do
let(:ref) { 'refs/heads/master' }
let(:changes) { { oldrev: oldrev, newrev: newrev, ref: ref } }
let(:protocol) { 'ssh' }
<<<<<<< HEAD
let(:change_access) do
=======
subject(:change_access) do
>>>>>>> upstream/master
described_class.new(
changes,
project: project,
......@@ -170,7 +166,51 @@ describe Gitlab::Checks::ChangeAccess do
end
end
<<<<<<< HEAD
context 'LFS integrity check' do
let(:blob_object) { project.repository.blob_at_branch('lfs', 'files/lfs/lfs_object.iso') }
before do
allow_any_instance_of(Gitlab::Git::RevList).to receive(:new_objects) do |&lazy_block|
lazy_block.call([blob_object.id])
end
end
context 'with LFS not enabled' do
it 'skips integrity check' do
expect_any_instance_of(Gitlab::Git::RevList).not_to receive(:new_objects)
subject.exec
end
end
context 'with LFS enabled' do
before do
allow(project).to receive(:lfs_enabled?).and_return(true)
end
context 'deletion' do
let(:changes) { { oldrev: oldrev, ref: ref } }
it 'skips integrity check' do
expect_any_instance_of(Gitlab::Git::RevList).not_to receive(:new_objects)
subject.exec
end
end
it 'fails if any LFS blobs are missing' do
expect { subject.exec }.to raise_error(Gitlab::GitAccess::UnauthorizedError, /LFS objects are missing/)
end
it 'succeeds if LFS objects have already been uploaded' do
lfs_object = create(:lfs_object, oid: blob_object.lfs_oid)
create(:lfs_objects_project, project: project, lfs_object: lfs_object)
expect { subject.exec }.not_to raise_error
end
end
end
context 'push rules checks' do
shared_examples 'check ignored when push rule unlicensed' do
before do
......@@ -543,49 +583,6 @@ describe Gitlab::Checks::ChangeAccess do
expect(change_access).to receive(:committer_check).once
.and_call_original
expect { subject }.not_to raise_error
=======
context 'LFS integrity check' do
let(:blob_object) { project.repository.blob_at_branch('lfs', 'files/lfs/lfs_object.iso') }
before do
allow_any_instance_of(Gitlab::Git::RevList).to receive(:new_objects) do |&lazy_block|
lazy_block.call([blob_object.id])
end
end
context 'with LFS not enabled' do
it 'skips integrity check' do
expect_any_instance_of(Gitlab::Git::RevList).not_to receive(:new_objects)
subject.exec
end
end
context 'with LFS enabled' do
before do
allow(project).to receive(:lfs_enabled?).and_return(true)
end
context 'deletion' do
let(:changes) { { oldrev: oldrev, ref: ref } }
it 'skips integrity check' do
expect_any_instance_of(Gitlab::Git::RevList).not_to receive(:new_objects)
subject.exec
end
end
it 'fails if any LFS blobs are missing' do
expect { subject.exec }.to raise_error(Gitlab::GitAccess::UnauthorizedError, /LFS objects are missing/)
end
it 'succeeds if LFS objects have already been uploaded' do
lfs_object = create(:lfs_object, oid: blob_object.lfs_oid)
create(:lfs_objects_project, project: project, lfs_object: lfs_object)
expect { subject.exec }.not_to raise_error
>>>>>>> upstream/master
end
end
end
......
......@@ -155,7 +155,6 @@ describe Gitlab::Metrics::WebTransaction do
end
end
<<<<<<< HEAD:spec/lib/gitlab/metrics/web_transaction_spec.rb
describe '#add_event_with_values' do
it 'adds a metric' do
transaction.add_event_with_values(:meow, {})
......@@ -180,8 +179,6 @@ describe Gitlab::Metrics::WebTransaction do
end
end
=======
>>>>>>> upstream/master:spec/lib/gitlab/metrics/web_transaction_spec.rb
describe '#labels' do
context 'when request goes to Grape endpoint' do
before do
......
......@@ -2198,7 +2198,6 @@ describe MergeRequest do
end
end
<<<<<<< HEAD
describe '#base_pipeline' do
let!(:pipeline) { create(:ci_empty_pipeline, project: subject.project, sha: subject.diff_base_sha) }
......@@ -2243,14 +2242,9 @@ describe MergeRequest do
end
end
describe '#fetch_ref' do
it 'sets "ref_fetched" flag to true' do
subject.update!(ref_fetched: nil)
=======
describe '#fetch_ref!' do
it 'fetches the ref correctly' do
expect { subject.target_project.repository.delete_refs(subject.ref_path) }.not_to raise_error
>>>>>>> upstream/master
subject.fetch_ref!
expect(subject.target_project.repository.ref_exists?(subject.ref_path)).to be_truthy
......
......@@ -699,7 +699,16 @@ describe API::Groups do
end
end
<<<<<<< HEAD
it_behaves_like 'custom attributes endpoints', 'groups' do
let(:attributable) { group1 }
let(:other_attributable) { group2 }
let(:user) { user1 }
before do
group2.add_owner(user1)
end
end
describe 'POST /groups/:id/ldap_sync' do
before do
allow(Gitlab::LDAP::Config).to receive(:enabled?).and_return(true)
......@@ -793,15 +802,6 @@ describe API::Groups do
def ldap_sync(group_id, user, sidekiq_testing_method)
Sidekiq::Testing.send(sidekiq_testing_method) do
post api("/groups/#{group_id}/ldap_sync", user)
=======
it_behaves_like 'custom attributes endpoints', 'groups' do
let(:attributable) { group1 }
let(:other_attributable) { group2 }
let(:user) { user1 }
before do
group2.add_owner(user1)
>>>>>>> upstream/master
end
end
end
require 'spec_helper'
<<<<<<< HEAD
describe 'Group routing' do
describe 'subgroup "boards"' do
it 'shows group show page' do
allow(Group).to receive(:find_by_full_path).with('gitlabhq/boards', any_args).and_return(true)
expect(get('/groups/gitlabhq/boards')).to route_to('groups#show', id: 'gitlabhq/boards')
end
it 'shows boards index page' do
allow(Group).to receive(:find_by_full_path).with('gitlabhq', any_args).and_return(true)
expect(get('/groups/gitlabhq/-/boards')).to route_to('groups/boards#index', group_id: 'gitlabhq')
=======
describe "Groups", "routing" do
let(:group_path) { 'complex.group-namegit' }
let!(:group) { create(:group, path: group_path) }
......@@ -136,7 +122,20 @@ describe "Groups", "routing" do
let!(:parent) { create(:group, path: 'activity') }
let(:resource) { create(:group, parent: parent, path: 'activity') }
end
>>>>>>> upstream/master
end
describe 'subgroup "boards"' do
it 'shows group show page' do
allow(Group).to receive(:find_by_full_path).with('gitlabhq/boards', any_args).and_return(true)
expect(get('/groups/gitlabhq/boards')).to route_to('groups#show', id: 'gitlabhq/boards')
end
it 'shows boards index page' do
allow(Group).to receive(:find_by_full_path).with('gitlabhq', any_args).and_return(true)
expect(get('/groups/gitlabhq/-/boards')).to route_to('groups/boards#index', group_id: 'gitlabhq')
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment