Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3a5afd36
Commit
3a5afd36
authored
Feb 28, 2020
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add web_url attribute to API response for Commits
parent
ecabb9b8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
changelogs/unreleased/rs-commit-web_url.yml
changelogs/unreleased/rs-commit-web_url.yml
+5
-0
lib/api/entities/commit.rb
lib/api/entities/commit.rb
+4
-0
spec/fixtures/api/schemas/public_api/v4/commit/basic.json
spec/fixtures/api/schemas/public_api/v4/commit/basic.json
+4
-2
No files found.
changelogs/unreleased/rs-commit-web_url.yml
0 → 100644
View file @
3a5afd36
---
title
:
Add web_url attribute to API response for Commits
merge_request
:
26173
author
:
type
:
added
lib/api/entities/commit.rb
View file @
3a5afd36
...
...
@@ -9,6 +9,10 @@ module API
expose
:safe_message
,
as: :message
expose
:author_name
,
:author_email
,
:authored_date
expose
:committer_name
,
:committer_email
,
:committed_date
expose
:web_url
do
|
commit
,
_options
|
Gitlab
::
UrlBuilder
.
build
(
commit
)
end
end
end
end
spec/fixtures/api/schemas/public_api/v4/commit/basic.json
View file @
3a5afd36
...
...
@@ -12,7 +12,8 @@
"authored_date"
,
"committer_name"
,
"committer_email"
,
"committed_date"
"committed_date"
,
"web_url"
],
"properties"
:
{
"id"
:
{
"type"
:
[
"string"
,
"null"
]
},
...
...
@@ -32,6 +33,7 @@
"authored_date"
:
{
"type"
:
"date"
},
"committer_name"
:
{
"type"
:
"string"
},
"committer_email"
:
{
"type"
:
"string"
},
"committed_date"
:
{
"type"
:
"date"
}
"committed_date"
:
{
"type"
:
"date"
},
"web_url"
:
{
"type"
:
"string"
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment