diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-03 14:09:49 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-03 14:09:49 +0300 |
commit | 3577b57f6b03a0d3c3d32daab6dc6ccf5f6e45f7 (patch) | |
tree | bb8ead689d855cc783e9eddce848d74934de9c19 /app | |
parent | 717fdd6d42f119dd1e0f457c40563cc35985fbae (diff) |
Try to use `pipeline` where applicable
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/build.rb | 12 | ||||
-rw-r--r-- | app/models/commit_status.rb | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 74441eb97dc..77837e9384a 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -118,12 +118,12 @@ module Ci .reorder(iid: :asc) merge_requests.find do |merge_request| - merge_request.commits.any? { |ci| ci.id == commit.sha } + merge_request.commits.any? { |ci| ci.id == pipeline.sha } end end def project_id - commit.project.id + pipeline.project_id end def project_name @@ -359,8 +359,8 @@ module Ci end def global_yaml_variables - if commit.config_processor - commit.config_processor.global_variables.map do |key, value| + if pipeline.config_processor + pipeline.config_processor.global_variables.map do |key, value| { key: key, value: value, public: true } end else @@ -369,8 +369,8 @@ module Ci end def job_yaml_variables - if commit.config_processor - commit.config_processor.job_variables(name).map do |key, value| + if pipeline.config_processor + pipeline.config_processor.job_variables(name).map do |key, value| { key: key, value: value, public: true } end else diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 3752bf09f16..98a8b541e96 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -55,7 +55,7 @@ class CommitStatus < ActiveRecord::Base delegate :sha, :short_sha, to: :commit def before_sha - commit.before_sha || Gitlab::Git::BLANK_SHA + pipeline.before_sha || Gitlab::Git::BLANK_SHA end def self.stages |