summaryrefslogtreecommitdiff
path: root/app/models/ci
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci')
-rw-r--r--app/models/ci/build.rb4
-rw-r--r--app/models/ci/pipeline.rb4
2 files changed, 2 insertions, 6 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 7e21eb22e27..d2a53315f1d 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -233,9 +233,7 @@ module Ci
gl_project_id
end
- def project_name
- project.name
- end
+ delegate :name, to: :project, prefix: true
def repo_url
auth = "gitlab-ci-token:#{ensure_token!}@"
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 999720d2ea3..d2312215f85 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -153,9 +153,7 @@ module Ci
builds.latest.with_artifacts_not_expired.includes(project: [:namespace])
end
- def project_id
- project.id
- end
+ delegate :id, to: :project, prefix: true
# For now the only user who participates is the user who triggered
def participants(_current_user = nil)