diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-02 17:19:18 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-02 17:59:04 +0300 |
commit | 021d3810c300d1e0514f21ccb6f1439f59e20565 (patch) | |
tree | 771a663395f39530559c73016f26087a0489fae2 /app/models/project.rb | |
parent | 5accd87ad7b0d960e504910d896a832288e51c8d (diff) |
Rename Ci::Commit to Ci::Pipeline and rename some of the ci_commit to pipeline
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 525a82c7534..e0ea1026b9c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -119,7 +119,7 @@ class Project < ActiveRecord::Base has_one :import_data, dependent: :destroy, class_name: "ProjectImportData" has_many :commit_statuses, dependent: :destroy, class_name: 'CommitStatus', foreign_key: :gl_project_id - has_many :ci_commits, dependent: :destroy, class_name: 'Ci::Commit', foreign_key: :gl_project_id + has_many :pipelines, dependent: :destroy, class_name: 'Ci::Pipeline', foreign_key: :gl_project_id has_many :builds, class_name: 'Ci::Build', foreign_key: :gl_project_id # the builds are created from the commit_statuses has_many :runner_projects, dependent: :destroy, class_name: 'Ci::RunnerProject', foreign_key: :gl_project_id has_many :runners, through: :runner_projects, source: :runner, class_name: 'Ci::Runner' @@ -930,12 +930,12 @@ class Project < ActiveRecord::Base !namespace.share_with_group_lock end - def ci_commit(sha, ref) - ci_commits.order(id: :desc).find_by(sha: sha, ref: ref) + def pipeline(sha, ref) + pipelines.order(id: :desc).find_by(sha: sha, ref: ref) end - def ensure_ci_commit(sha, ref) - ci_commit(sha, ref) || ci_commits.create(sha: sha, ref: ref) + def ensure_pipeline(sha, ref) + pipeline(sha, ref) || pipelines.create(sha: sha, ref: ref) end def enable_ci |