mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 12:46:07 +10:00
Merge branch 'api-fix-annotated-tags' into 'master'
API: Present an array of Gitlab::Git::Tag instead of array of rugged tags The annotated message was always `null` because the wrong array was presented. The entity requires an array of `Gitlab::Git::Tags` instead an array of raw rugged tags was presented. Since a rugged tag does not respond to `message` to get the annotated message, this was always `null`. See merge request !3764
This commit is contained in:
@@ -83,6 +83,7 @@ v 8.7.0 (unreleased)
|
||||
- Diffs load at the correct point when linking from from number
|
||||
- Selected diff rows highlight
|
||||
- Fix emoji categories in the emoji picker
|
||||
- API: Properly display annotated tags for GET /projects/:id/repository/tags (Robert Schilling)
|
||||
- Add encrypted credentials for imported projects and migrate old ones
|
||||
- Author and participants are displayed first on users autocompletion
|
||||
- Show number sign on external issue reference text (Florent Baldino)
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ module API
|
||||
# Example Request:
|
||||
# GET /projects/:id/repository/tags
|
||||
get ":id/repository/tags" do
|
||||
present user_project.repo.tags.sort_by(&:name).reverse,
|
||||
present user_project.repository.tags.sort_by(&:name).reverse,
|
||||
with: Entities::RepoTag, project: user_project
|
||||
end
|
||||
|
||||
|
||||
@@ -32,9 +32,11 @@ describe API::API, api: true do
|
||||
|
||||
it "should return an array of project tags with release info" do
|
||||
get api("/projects/#{project.id}/repository/tags", user)
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
expect(json_response).to be_an Array
|
||||
expect(json_response.first['name']).to eq(tag_name)
|
||||
expect(json_response.first['message']).to eq('Version 1.1.0')
|
||||
expect(json_response.first['release']['description']).to eq(description)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user