diff options
author | Robert Speicher <rspeicher@gmail.com> | 2018-07-19 00:57:08 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-07-19 01:04:45 +0300 |
commit | 6cb52964a6c0b64d422b4618c116a4ff9d044b67 (patch) | |
tree | 5559f18a9e396ce1021cc80b6a91c83a56a6f3b7 /lib/api | |
parent | 1df32177a8dfd0f1f948a48ee9cf87ba74f43417 (diff) |
Expose web_url attribute in PipelineBasic and JobBasic
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 3f3a95ea8e6..8c40d66c651 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -529,6 +529,10 @@ module API class PipelineBasic < Grape::Entity expose :id, :sha, :ref, :status + + expose :web_url do |pipeline, _options| + Gitlab::Routing.url_helpers.project_pipeline_url(pipeline.project, pipeline) + end end class MergeRequestSimple < ProjectEntity @@ -1069,6 +1073,10 @@ module API expose :user, with: User expose :commit, with: Commit expose :pipeline, with: PipelineBasic + + expose :web_url do |job, _options| + Gitlab::Routing.url_helpers.project_job_url(job.project, job) + end end class Job < JobBasic |