diff options
author | barthc <mackintosh02@gmail.com> | 2016-08-30 21:17:13 +0100 |
---|---|---|
committer | barthc <mackintosh02@gmail.com> | 2016-08-30 21:17:13 +0100 |
commit | 5c5d13c42d152ba58818a572a51e796cba4a281d (patch) | |
tree | 139f502c4887e7669c323cb335a2e2ee03f1f4db /lib | |
parent | 29f818e6165e2e6d4a523270d115a491e261478a (diff) | |
parent | 51087cfa1a6b0bb5a7abf35081ed3b669253eb4f (diff) | |
download | gitlab-ce-5c5d13c42d152ba58818a572a51e796cba4a281d.tar.gz |
Merge branch 'master' into prevent_authored_awardable_votes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/commit_statuses.rb | 2 | ||||
-rw-r--r-- | lib/backup/repository.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/badge/coverage/report.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ci/config/node/hidden.rb (renamed from lib/gitlab/ci/config/node/hidden_job.rb) | 3 | ||||
-rw-r--r-- | lib/gitlab/ci/config/node/jobs.rb | 2 |
5 files changed, 5 insertions, 8 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb index 4df6ca8333e..5e3c9563703 100644 --- a/lib/api/commit_statuses.rb +++ b/lib/api/commit_statuses.rb @@ -64,7 +64,7 @@ module API ref = branches.first end - pipeline = @project.ensure_pipeline(commit.sha, ref, current_user) + pipeline = @project.ensure_pipeline(ref, commit.sha, current_user) name = params[:name] || params[:context] status = GenericCommitStatus.running_or_pending.find_by(pipeline: pipeline, name: name, ref: params[:ref]) diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb index f117fc3d37d..9fcd9a3f999 100644 --- a/lib/backup/repository.rb +++ b/lib/backup/repository.rb @@ -55,7 +55,7 @@ module Backup bk_repos_path = File.join(path, '..', 'repositories.old.' + Time.now.to_i.to_s) FileUtils.mv(path, bk_repos_path) # This is expected from gitlab:check - FileUtils.mkdir_p(path, mode: 2770) + FileUtils.mkdir_p(path, mode: 02770) end Project.find_each(batch_size: 1000) do |project| diff --git a/lib/gitlab/badge/coverage/report.rb b/lib/gitlab/badge/coverage/report.rb index 95d925dc7f3..9a0482306b7 100644 --- a/lib/gitlab/badge/coverage/report.rb +++ b/lib/gitlab/badge/coverage/report.rb @@ -12,9 +12,7 @@ module Gitlab @ref = ref @job = job - @pipeline = @project.pipelines - .latest_successful_for(@ref) - .first + @pipeline = @project.pipelines.latest_successful_for(@ref) end def entity diff --git a/lib/gitlab/ci/config/node/hidden_job.rb b/lib/gitlab/ci/config/node/hidden.rb index 073044b66f8..fe4ee8a7fc6 100644 --- a/lib/gitlab/ci/config/node/hidden_job.rb +++ b/lib/gitlab/ci/config/node/hidden.rb @@ -5,11 +5,10 @@ module Gitlab ## # Entry that represents a hidden CI/CD job. # - class HiddenJob < Entry + class Hidden < Entry include Validatable validations do - validates :config, type: Hash validates :config, presence: true end diff --git a/lib/gitlab/ci/config/node/jobs.rb b/lib/gitlab/ci/config/node/jobs.rb index 51683c82ceb..a1a26d4fd8f 100644 --- a/lib/gitlab/ci/config/node/jobs.rb +++ b/lib/gitlab/ci/config/node/jobs.rb @@ -30,7 +30,7 @@ module Gitlab def compose! @config.each do |name, config| - node = hidden?(name) ? Node::HiddenJob : Node::Job + node = hidden?(name) ? Node::Hidden : Node::Job factory = Node::Factory.new(node) .value(config || {}) |