Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities/commit_with_link.rb')
-rw-r--r--lib/api/entities/commit_with_link.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/api/entities/commit_with_link.rb b/lib/api/entities/commit_with_link.rb
index 31a9efed9bc..a135cc19480 100644
--- a/lib/api/entities/commit_with_link.rb
+++ b/lib/api/entities/commit_with_link.rb
@@ -32,6 +32,14 @@ module API
render('projects/commit/_signature', signature: commit.signature) if commit.has_signature?
end
+ expose :prev_commit_id, if: { type: :full } do |commit|
+ options[:prev_commit_id]
+ end
+
+ expose :next_commit_id, if: { type: :full } do |commit|
+ options[:next_commit_id]
+ end
+
expose :pipeline_status_path, if: { type: :full } do |commit, options|
pipeline_ref = options[:pipeline_ref]
pipeline_project = options[:pipeline_project] || commit.project