Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
2433d664c7
commit
59a4c8a4af
|
|
@ -162,7 +162,6 @@ class RegistrationsController < Devise::RegistrationsController
|
|||
{}
|
||||
end
|
||||
|
||||
# overridden in EE
|
||||
def track_successful_user_creation(user)
|
||||
label = user_invited? ? 'invited' : 'signup'
|
||||
Gitlab::Tracking.event(self.class.name, 'create_user', label: label, user: user)
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ plugins:
|
|||
## No Code Quality appears on merge requests when using custom tool
|
||||
|
||||
If your merge requests do not show any Code Quality changes when using a custom tool, ensure that
|
||||
the line property is an `integer`.
|
||||
*all* line properties in the JSON are `integer`.
|
||||
|
||||
## Error: `Could not analyze code quality`
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ DETAILS:
|
|||
|
||||
A 100 MiB per-file limit applies when pushing new files to any project in the Free tier.
|
||||
|
||||
If a new file that is 100 MiB or large is pushed to a project in the Free tier, an error is displayed. For example:
|
||||
If a new file that is 100 MiB or larger is pushed to a project in the Free tier, an error is displayed. For example:
|
||||
|
||||
```shell
|
||||
Enumerating objects: 3, done.
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ module Gitlab::Ci
|
|||
key_width: opts[:key_width].to_i,
|
||||
key_text: opts[:key_text]
|
||||
}
|
||||
|
||||
@sha = @project.commit(@ref).try(:sha)
|
||||
end
|
||||
|
||||
def entity
|
||||
|
|
@ -27,11 +25,9 @@ module Gitlab::Ci
|
|||
|
||||
# rubocop: disable CodeReuse/ActiveRecord
|
||||
def status
|
||||
pipelines = @project.ci_pipelines
|
||||
.where(sha: @sha)
|
||||
|
||||
relation = @ignore_skipped ? pipelines.without_statuses([:skipped]) : pipelines
|
||||
relation.latest_status(@ref) || 'unknown'
|
||||
pipelines = @project.ci_pipelines.for_ref(@ref).order_id_desc
|
||||
pipelines = pipelines.without_statuses([:skipped]) if @ignore_skipped
|
||||
pipelines.pick(:status) || 'unknown'
|
||||
end
|
||||
# rubocop: enable CodeReuse/ActiveRecord
|
||||
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@ RSpec.describe Gitlab::Ci::Badge::Pipeline::Status do
|
|||
end
|
||||
|
||||
context 'pipeline exists', :sidekiq_might_not_need_inline do
|
||||
let!(:pipeline) { create_pipeline(project, sha, branch) }
|
||||
let!(:build) { create_pipeline_and_build(project, sha, branch, 2) }
|
||||
|
||||
context 'pipeline success' do
|
||||
before do
|
||||
pipeline.success!
|
||||
build.success!
|
||||
end
|
||||
|
||||
describe '#status' do
|
||||
|
|
@ -43,7 +43,7 @@ RSpec.describe Gitlab::Ci::Badge::Pipeline::Status do
|
|||
|
||||
context 'pipeline failed' do
|
||||
before do
|
||||
pipeline.drop!
|
||||
build.drop!
|
||||
end
|
||||
|
||||
describe '#status' do
|
||||
|
|
@ -55,10 +55,10 @@ RSpec.describe Gitlab::Ci::Badge::Pipeline::Status do
|
|||
|
||||
context 'when outdated pipeline for given ref exists' do
|
||||
before do
|
||||
pipeline.success!
|
||||
build.success!
|
||||
|
||||
old_pipeline = create_pipeline(project, '11eeffdd', branch)
|
||||
old_pipeline.drop!
|
||||
old_build = create_pipeline_and_build(project, '11eeffdd', branch, 1)
|
||||
old_build.drop!
|
||||
end
|
||||
|
||||
it 'does not take outdated pipeline into account' do
|
||||
|
|
@ -68,10 +68,10 @@ RSpec.describe Gitlab::Ci::Badge::Pipeline::Status do
|
|||
|
||||
context 'when multiple pipelines exist for given sha' do
|
||||
before do
|
||||
pipeline.drop!
|
||||
build.drop!
|
||||
|
||||
new_pipeline = create_pipeline(project, sha, branch)
|
||||
new_pipeline.success!
|
||||
new_build = create_pipeline_and_build(project, sha, branch, 3)
|
||||
new_build.success!
|
||||
end
|
||||
|
||||
it 'does not take outdated pipeline into account' do
|
||||
|
|
@ -83,7 +83,7 @@ RSpec.describe Gitlab::Ci::Badge::Pipeline::Status do
|
|||
let(:new_badge) { described_class.new(project, branch, opts: { ignore_skipped: true }) }
|
||||
|
||||
before do
|
||||
pipeline.skip!
|
||||
build.skip!
|
||||
end
|
||||
|
||||
describe '#status' do
|
||||
|
|
@ -97,7 +97,7 @@ RSpec.describe Gitlab::Ci::Badge::Pipeline::Status do
|
|||
let(:new_badge) { described_class.new(project, branch, opts: { ignore_skipped: false }) }
|
||||
|
||||
before do
|
||||
pipeline.skip!
|
||||
build.skip!
|
||||
end
|
||||
|
||||
describe '#status' do
|
||||
|
|
@ -116,8 +116,8 @@ RSpec.describe Gitlab::Ci::Badge::Pipeline::Status do
|
|||
end
|
||||
end
|
||||
|
||||
def create_pipeline(project, sha, branch)
|
||||
pipeline = create(:ci_empty_pipeline, project: project, sha: sha, ref: branch)
|
||||
def create_pipeline_and_build(project, sha, branch, id)
|
||||
pipeline = create(:ci_empty_pipeline, project: project, sha: sha, ref: branch, id: id)
|
||||
|
||||
create(:ci_build, pipeline: pipeline, stage: 'notify')
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue