Commit 7e245b64 authored by Rémy Coutable's avatar Rémy Coutable

Resolve more conflicts

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent d60364f7
......@@ -3,7 +3,6 @@ class IssueAssignee < ActiveRecord::Base
belongs_to :issue
belongs_to :assignee, class_name: "User", foreign_key: :user_id
<<<<<<< HEAD
# EE-specific
after_create :update_elasticsearch_index
......@@ -20,6 +19,4 @@ class IssueAssignee < ActiveRecord::Base
)
end
end
=======
>>>>>>> upstream/master
end
......@@ -961,12 +961,6 @@ class User < ActiveRecord::Base
end
def invalidate_cache_counts
<<<<<<< HEAD
Rails.cache.delete(['users', id, 'assigned_open_merge_requests_count'])
Rails.cache.delete(['users', id, 'assigned_open_issues_count'])
end
=======
invalidate_issue_cache_counts
invalidate_merge_request_cache_counts
end
......@@ -979,7 +973,6 @@ class User < ActiveRecord::Base
Rails.cache.delete(['users', id, 'assigned_open_merge_requests_count'])
end
>>>>>>> upstream/master
def todos_done_count(force: false)
Rails.cache.fetch(['users', id, 'todos_done_count'], force: force) do
TodosFinder.new(self, state: :done).execute.count
......
......@@ -178,11 +178,7 @@ class IssuableBaseService < BaseService
after_create(issuable)
issuable.create_cross_references!(current_user)
execute_hooks(issuable)
issuable.assignees.each(&:invalidate_cache_counts)
<<<<<<< HEAD
=======
invalidate_cache_counts(issuable.assignees, issuable)
>>>>>>> upstream/master
end
issuable
......@@ -240,14 +236,9 @@ class IssuableBaseService < BaseService
)
if old_assignees != issuable.assignees
<<<<<<< HEAD
new_assignees = issuable.assignees.to_a
affected_assignees = (old_assignees + new_assignees) - (old_assignees & new_assignees)
affected_assignees.compact.each(&:invalidate_cache_counts)
=======
assignees = old_assignees + issuable.assignees.to_a
invalidate_cache_counts(assignees.compact, issuable)
>>>>>>> upstream/master
invalidate_cache_counts(affected_assignees.compact, issuable)
end
after_update(issuable)
......
......@@ -31,17 +31,10 @@ class PostReceive
def process_repository_update(post_received)
changes = []
refs = Set.new
<<<<<<< HEAD
post_received.changes_refs do |oldrev, newrev, ref|
@user ||= post_received.identify(newrev)
=======
post_received.changes_refs do |oldrev, newrev, ref|
@user ||= post_received.identify(newrev)
>>>>>>> upstream/master
unless @user
log("Triggered hook for non-existing user \"#{post_received.identifier}\"")
return false
......
......@@ -376,7 +376,6 @@ POST /projects/:id/issues
| Attribute | Type | Required | Description |
|-------------------------------------------|----------------|----------|--------------|
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
<<<<<<< HEAD
| `title` | string | yes | The title of an issue |
| `description` | string | no | The description of an issue |
| `confidential` | boolean | no | Set an issue to be confidential. Default is `false`. |
......@@ -388,18 +387,6 @@ POST /projects/:id/issues
| `merge_request_to_resolve_discussions_of` | integer | no | The IID of a merge request in which to resolve all issues. This will fill the issue with a default description and mark all discussions as resolved. When passing a description or title, these values will take precedence over the default values.|
| `discussion_to_resolve` | string | no | The ID of a discussion to resolve. This will fill in the issue with a default description and mark the discussion as resolved. Use in combination with `merge_request_to_resolve_discussions_of`. |
| `weight` | integer | no | The weight of the issue in range 0 to 9 |
=======
| `title` | string | yes | The title of an issue |
| `description` | string | no | The description of an issue |
| `confidential` | boolean | no | Set an issue to be confidential. Default is `false`. |
| `assignee_ids` | Array[integer] | no | The ID of the users to assign issue |
| `milestone_id` | integer | no | The ID of a milestone to assign issue |
| `labels` | string | no | Comma-separated label names for an issue |
| `created_at` | string | no | Date time string, ISO 8601 formatted, e.g. `2016-03-11T03:45:40Z` (requires admin or project owner rights) |
| `due_date` | string | no | Date time string in the format YEAR-MONTH-DAY, e.g. `2016-03-11` |
| `merge_request_to_resolve_discussions_of` | integer | no | The IID of a merge request in which to resolve all issues. This will fill the issue with a default description and mark all discussions as resolved. When passing a description or title, these values will take precedence over the default values.|
| `discussion_to_resolve` | string | no | The ID of a discussion to resolve. This will fill in the issue with a default description and mark the discussion as resolved. Use in combination with `merge_request_to_resolve_discussions_of`. |
>>>>>>> upstream/master
```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/4/issues?title=Issues%20with%20auth&labels=bug
......
......@@ -28,64 +28,6 @@ for all signed in users.
[were added][ee-735] in GitLab Enterprise Edition
8.12. [Moved to GitLab Community Edition][ce-23361] in 9.1.
<<<<<<< HEAD
GitLab Inc. can collect non-sensitive information about how GitLab users
use their GitLab instance upon the activation of a ping feature
located in the admin panel (`/admin/application_settings`).
You can see the **exact** JSON payload that your instance sends to GitLab
in the "Usage statistics" section of the admin panel.
Nothing qualitative is collected. Only quantitative. That means no project
names, author names, comment bodies, names of labels, etc.
The usage ping is sent in order for GitLab Inc. to have a better understanding
of how our users use our product, and to be more data-driven when creating or
changing features.
The total number of the following is sent back to GitLab Inc.:
- Comments
- Groups
- Users
- Projects
- Issues
- Labels
- CI builds
- Snippets
- Milestones
- Todos
- Pushes
- Merge requests
- Environments
- Triggers
- Deploy keys
- Pages
- Project Services
- Projects using the Prometheus service
- Issue Boards
- CI Runners
- Deployments
- Geo Nodes
- LDAP Groups
- LDAP Keys
- LDAP Users
- LFS objects
- Protected branches
- Releases
- Remote mirrors
- Service Desk projects
- Service Desk issues
- Uploads
- Web hooks
Also, we track if you've installed Mattermost with GitLab.
For example: `"mattermost_enabled":true"`.
More data will be added over time. The goal of this ping is to be as light as
possible, so it won't have any performance impact on your installation when
the calculation is made.
=======
GitLab sends a weekly payload containing usage data to GitLab Inc. The usage
ping uses high-level data to help our product, support, and sales teams. It does
not send any project names, usernames, or any other specific data. The
......@@ -93,7 +35,6 @@ information from the usage ping is not anonymous, it is linked to the hostname
of the instance.
You can view the exact JSON payload in the administration panel.
>>>>>>> upstream/master
### Deactivate the usage ping
......
......@@ -29,31 +29,12 @@ module Gitlab
Gitlab::Git::DiffCollection.new(response, options)
end
<<<<<<< HEAD
class << self
def diff_from_parent(commit, options = {})
repository = commit.project.repository
gitaly_repo = repository.gitaly_repository
stub = Gitaly::Diff::Stub.new(nil, nil, channel_override: repository.gitaly_channel)
parent = commit.parents[0]
parent_id = parent ? parent.id : EMPTY_TREE_ID
request = Gitaly::CommitDiffRequest.new(
repository: gitaly_repo,
left_commit_id: parent_id,
right_commit_id: commit.id,
ignore_whitespace_change: options.fetch(:ignore_whitespace_change, false),
paths: options.fetch(:paths, [])
)
Gitlab::Git::DiffCollection.new(stub.commit_diff(request), options)
=======
def commit_deltas(commit)
request_params = commit_diff_request_params(commit)
response = diff_service_stub.commit_delta(Gitaly::CommitDeltaRequest.new(request_params))
response.flat_map do |msg|
msg.deltas.map { |d| Gitlab::Git::Diff.new(d) }
>>>>>>> upstream/master
end
end
......
......@@ -5,18 +5,7 @@ describe 'Auto deploy' do
let(:project) { create(:project, :repository) }
before do
<<<<<<< HEAD
project.create_kubernetes_service(
active: true,
properties: {
namespace: project.path,
api_url: 'https://kubernetes.example.com',
token: 'a' * 40
}
)
=======
create :kubernetes_service, project: project
>>>>>>> upstream/master
project.team << [user, :master]
login_as user
end
......
require 'spec_helper'
<<<<<<< HEAD
describe Gitlab::FileFinder do
let(:project) { create :project }
let(:finder) { described_class.new(project, 'master') }
it 'finds files by name' do
filename, blob = finder.find('CHANGELOG').first
expect(filename).to eq('CHANGELOG')
expect(blob.ref).to eq('master')
end
it 'finds files by content' do
filename, blob = finder.find('CHANGELOG').last
expect(filename).to eq('CONTRIBUTING.md')
expect(blob.filename).to eq('CONTRIBUTING.md')
expect(blob.startline).to be_a(Integer)
expect(blob.data).to include('CHANGELOG')
=======
describe Gitlab::FileFinder, lib: true do
describe '#find' do
let(:project) { create(:project, :public, :repository) }
......@@ -37,6 +17,5 @@ describe Gitlab::FileFinder, lib: true do
expect(blob.filename).to eq("CHANGELOG")
end
>>>>>>> upstream/master
end
end
......@@ -55,12 +55,7 @@ describe Gitlab::ProjectSearchResults, lib: true do
end
it 'finds by name' do
<<<<<<< HEAD
blob = results.select { |result| result.first == 'files/images/wm.svg' }.flatten.last
expect(blob).to be_a(OpenStruct)
=======
expect(results.map(&:first)).to include('files/images/wm.svg')
>>>>>>> upstream/master
end
it 'finds by content' do
......
......@@ -202,11 +202,7 @@ describe Gitlab::Workhorse, lib: true do
context 'when Gitaly is enabled' do
let(:gitaly_params) do
{
<<<<<<< HEAD
GitalyAddress: Gitlab::GitalyClient.get_address('default')
=======
GitalyAddress: Gitlab::GitalyClient.address('default')
>>>>>>> upstream/master
}
end
......
......@@ -1113,20 +1113,6 @@ describe API::Issues do
expect(json_response['assignees'].first['name']).to eq(user2.name)
end
<<<<<<< HEAD
=======
context 'CE restrictions' do
it 'updates an issue with several assignees but only one has been applied' do
put api("/projects/#{project.id}/issues/#{issue.iid}", user),
assignee_ids: [user2.id, guest.id]
expect(response).to have_http_status(200)
expect(json_response['assignees'].size).to eq(1)
end
end
>>>>>>> upstream/master
end
describe 'PUT /projects/:id/issues/:issue_iid to update labels' do
......
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