summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-06-07 12:47:25 +0000
committerDouwe Maan <douwe@gitlab.com>2016-06-07 12:47:25 +0000
commit8c356ac5500d7f82e9afa7fa19b44aefa99edfe7 (patch)
treee366baed0de7e6705f94320f353dedac71986943 /lib
parent3368afd7676ac50f62be05b9817a655fb19ac0c3 (diff)
parentb0eb4cb4a73d78b45cc86b3714d7493484b2b5e7 (diff)
downloadgitlab-ce-8c356ac5500d7f82e9afa7fa19b44aefa99edfe7.tar.gz
Merge branch 'rename-ci-commit-phase-3' into 'master'
Rename ci_commit in application code This is third iteration of renaming `[ci_]commit(s)` in application code to `pipeline(s)`. See merge request !4464
Diffstat (limited to 'lib')
-rw-r--r--lib/api/commit_statuses.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb
index 088d5bac587..323a7086890 100644
--- a/lib/api/commit_statuses.rb
+++ b/lib/api/commit_statuses.rb
@@ -22,8 +22,8 @@ module API
not_found!('Commit') unless user_project.commit(params[:sha])
- ci_commits = user_project.pipelines.where(sha: params[:sha])
- statuses = ::CommitStatus.where(pipeline: ci_commits)
+ pipelines = user_project.pipelines.where(sha: params[:sha])
+ statuses = ::CommitStatus.where(pipeline: pipelines)
statuses = statuses.latest unless parse_boolean(params[:all])
statuses = statuses.where(ref: params[:ref]) if params[:ref].present?
statuses = statuses.where(stage: params[:stage]) if params[:stage].present?
@@ -64,11 +64,11 @@ module API
ref = branches.first
end
- ci_commit = @project.ensure_pipeline(commit.sha, ref)
+ pipeline = @project.ensure_pipeline(commit.sha, ref)
name = params[:name] || params[:context]
- status = GenericCommitStatus.running_or_pending.find_by(pipeline: ci_commit, name: name, ref: params[:ref])
- status ||= GenericCommitStatus.new(project: @project, pipeline: ci_commit, user: current_user)
+ status = GenericCommitStatus.running_or_pending.find_by(pipeline: pipeline, name: name, ref: params[:ref])
+ status ||= GenericCommitStatus.new(project: @project, pipeline: pipeline, user: current_user)
status.update(attrs)
case params[:state].to_s