summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2019-02-13 14:34:20 +0000
committerRémy Coutable <remy@rymai.me>2019-02-13 14:34:20 +0000
commitac606a677b03ec10ff5ddb018981c6546f8396b8 (patch)
tree6492da7f89e701f82833e8934dbb10f4388f2b49
parentc5e57aa89566a0a1889763d7134860c3f2a3e03a (diff)
parent314c99e36c37379eea1dc4556d0a7fcb48efc275 (diff)
downloadgitlab-ce-ac606a677b03ec10ff5ddb018981c6546f8396b8.tar.gz
Merge branch '56237-api-truncated-commit-title' into 'master'
API: Expose full commit title Closes #56237 See merge request gitlab-org/gitlab-ce!25189
-rw-r--r--changelogs/unreleased/56237-api-truncated-commit-title.yml5
-rw-r--r--lib/api/entities.rb3
-rw-r--r--spec/requests/api/commits_spec.rb2
3 files changed, 8 insertions, 2 deletions
diff --git a/changelogs/unreleased/56237-api-truncated-commit-title.yml b/changelogs/unreleased/56237-api-truncated-commit-title.yml
new file mode 100644
index 00000000000..1a48d0fda1b
--- /dev/null
+++ b/changelogs/unreleased/56237-api-truncated-commit-title.yml
@@ -0,0 +1,5 @@
+---
+title: 'API: Expose full commit title'
+merge_request: 25189
+author: Robert Schilling
+type: fixed
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 65f615b7d28..0ef56067b95 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -369,8 +369,9 @@ module API
end
class Commit < Grape::Entity
- expose :id, :short_id, :title, :created_at
+ expose :id, :short_id, :created_at
expose :parent_ids
+ expose :full_title, as: :title
expose :safe_message, as: :message
expose :author_name, :author_email, :authored_date
expose :committer_name, :committer_email, :committed_date
diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb
index 6b9bc6eda6a..bc892523cf8 100644
--- a/spec/requests/api/commits_spec.rb
+++ b/spec/requests/api/commits_spec.rb
@@ -237,7 +237,7 @@ describe API::Commits do
end
describe 'create' do
- let(:message) { 'Created file' }
+ let(:message) { 'Created a new file with a very very looooooooooooooooooooooooooooooooooooooooooooooong commit message' }
let(:invalid_c_params) do
{
branch: 'master',