diff options
author | Grzegorz Bizon <grzegorz.bizon@ntsn.pl> | 2015-12-14 11:46:02 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzegorz.bizon@ntsn.pl> | 2015-12-14 12:26:40 +0100 |
commit | 2ec93abed7a1a3aa49b3267342824e0743de0f54 (patch) | |
tree | 7d3381dd4bd1f4d73ba234a56742edf491baa515 /app/models/commit_status.rb | |
parent | bc1cfd384f4f972ad887b0501280b9f94d4c94ac (diff) | |
parent | c81023435795766411c5954a4676ebb215af40a6 (diff) | |
download | gitlab-ce-2ec93abed7a1a3aa49b3267342824e0743de0f54.tar.gz |
Merge branch 'master' into ci/persist-registration-token
* master: (66 commits)
Fix runners admin view
Fix migrations
Rename mention of gitlab-git-http-server to gitlab-workhorse
Bump Redis requirement to 2.8 for Sidekiq 4 requirements
Fix wording on runner setup page
add details on how to change saml button label
Fix tests
Move awards back to gray panel and few improvements to sidebar
Few UI improvements to new sidebar implementation
Fix tests for new issuable sidebar
Update changelog
Implement new sidebar for merge request page
Make edit link on issuable sidebar works
Redesign issue page for new sidebar
Move awards css to separate file
Implement issuable sidebar partial
Update CHANGELOG
Clarify cache behavior
Run builds from projects with enabled CI
Use Gitlab::Git instead of Ci::Git
...
Conflicts:
db/schema.rb
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index ff619965a57..21c5c87bc3d 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -30,6 +30,7 @@ class CommitStatus < ActiveRecord::Base self.table_name = 'ci_builds' + belongs_to :project, class_name: '::Project', foreign_key: :gl_project_id belongs_to :commit, class_name: 'Ci::Commit' belongs_to :user @@ -76,7 +77,7 @@ class CommitStatus < ActiveRecord::Base end after_transition [:pending, :running] => :success do |build, transition| - MergeRequests::MergeWhenBuildSucceedsService.new(build.commit.gl_project, nil).trigger(build) + MergeRequests::MergeWhenBuildSucceedsService.new(build.commit.project, nil).trigger(build) end state :pending, value: 'pending' @@ -86,8 +87,7 @@ class CommitStatus < ActiveRecord::Base state :canceled, value: 'canceled' end - delegate :sha, :short_sha, :gl_project, - to: :commit, prefix: false + delegate :sha, :short_sha, to: :commit, prefix: false # TODO: this should be removed with all references def before_sha |