summaryrefslogtreecommitdiff
path: root/lib/api/commit_statuses.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-07-26 14:51:52 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-07-26 14:51:52 +0800
commitb04f95a2edadd2f84bcecee59bf7001ff6362d00 (patch)
tree4c6ca2ce730f43668c68bbd11064f1af4cab31f8 /lib/api/commit_statuses.rb
parentbd44f1419784ea98ad513f2f2f67ffeb94853c04 (diff)
parent68162ba900f1b9003fa3d07613333f201be8154a (diff)
downloadgitlab-ce-b04f95a2edadd2f84bcecee59bf7001ff6362d00.tar.gz
Merge remote-tracking branch 'upstream/master' into new-issue-by-email
* upstream/master: (620 commits) Added '*.js.es6 gitlab-language=javascript' to .gitattributes Fix CI status icon link underline Update CHANGELOG after 8.10.1 Add CHANGELOG Add es6 gem Instrument Nokogiri parsing methods Fix backup restore Use project ID in repository cache to prevent stale data from persisting across projects Add iid to MR API response `WikiPage` should have a slug even when not persisted. ES6ify all the things! Make fork counter always clickable (!5463) Revert "Merge branch '17073-tagscontroller-index-is-terrible-response-time-goes-up-to-5-…" Fix CHANGELOG Add spec for dashes in paths Fix Error 500 when creating Wiki pages with hyphens or spaces Add links to the real markdown.md file for all GFM examples Remove magic comments from Ruby files (!5456) Ignore invalid trusted proxies in X-Forwarded-For header remove search_id for label dropdown filter ...
Diffstat (limited to 'lib/api/commit_statuses.rb')
-rw-r--r--lib/api/commit_statuses.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb
index 323a7086890..4df6ca8333e 100644
--- a/lib/api/commit_statuses.rb
+++ b/lib/api/commit_statuses.rb
@@ -24,7 +24,7 @@ module API
pipelines = user_project.pipelines.where(sha: params[:sha])
statuses = ::CommitStatus.where(pipeline: pipelines)
- statuses = statuses.latest unless parse_boolean(params[:all])
+ statuses = statuses.latest unless to_boolean(params[:all])
statuses = statuses.where(ref: params[:ref]) if params[:ref].present?
statuses = statuses.where(stage: params[:stage]) if params[:stage].present?
statuses = statuses.where(name: params[:name]) if params[:name].present?
@@ -64,7 +64,7 @@ module API
ref = branches.first
end
- pipeline = @project.ensure_pipeline(commit.sha, ref)
+ pipeline = @project.ensure_pipeline(commit.sha, ref, current_user)
name = params[:name] || params[:context]
status = GenericCommitStatus.running_or_pending.find_by(pipeline: pipeline, name: name, ref: params[:ref])