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
0
Merge Requests
0
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
iv
gitlab-ce
Commits
dc3272dc
Commit
dc3272dc
authored
Apr 06, 2016
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "API: Ability to retrieve a single tag"
This reverts commit
7f287c91
.
parent
77e178b5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
64 deletions
+1
-64
doc/api/tags.md
doc/api/tags.md
+1
-33
lib/api/tags.rb
lib/api/tags.rb
+0
-14
spec/requests/api/tags_spec.rb
spec/requests/api/tags_spec.rb
+0
-17
No files found.
doc/api/tags.md
View file @
dc3272dc
...
...
@@ -38,38 +38,6 @@ Parameters:
]
```
## Get a single repository tag
Get a specific repository tag determined by its name. It returns 200 together
with the tag information if the tag exists. It returns 404 if the tag does not
exist.
Parameters:
-
`id`
(required) - The ID of a project
-
`tag_name`
(required) - The name of the tag
```
json
{
"name"
:
"v5.0.0"
,
"message"
:
null
,
"commit"
:
{
"id"
:
"60a8ff033665e1207714d6670fcd7b65304ec02f"
,
"message"
:
"v5.0.0
\n
"
,
"parent_ids"
:
[
"f61c062ff8bcbdb00e0a1b3317a91aed6ceee06b"
],
"authored_date"
:
"2015-02-01T21:56:31.000+01:00"
,
"author_name"
:
"Arthur Verschaeve"
,
"author_email"
:
"contact@arthurverschaeve.be"
,
"committed_date"
:
"2015-02-01T21:56:31.000+01:00"
,
"committer_name"
:
"Arthur Verschaeve"
,
"committer_email"
:
"contact@arthurverschaeve.be"
},
"release"
:
null
}
```
## Create a new tag
Creates a new tag in the repository that points to the supplied ref.
...
...
lib/api/tags.rb
View file @
dc3272dc
...
...
@@ -16,20 +16,6 @@ module API
with:
Entities
::
RepoTag
,
project:
user_project
end
# Get a single repository tag
#
# Parameters:
# id (required) - The ID of a project
# tag_name (required) - The name of the tag
# Example Request:
# GET /projects/:id/repository/tags/:tag_name
get
":id/repository/tags/:tag_name"
,
requirements:
{
tag_name:
/.*/
}
do
tag
=
user_project
.
repository
.
find_tag
(
params
[
:tag_name
])
not_found!
(
'Tag'
)
unless
tag
present
tag
,
with:
Entities
::
RepoTag
,
project:
user_project
end
# Create tag
#
# Parameters:
...
...
spec/requests/api/tags_spec.rb
View file @
dc3272dc
...
...
@@ -40,23 +40,6 @@ describe API::API, api: true do
end
end
describe
"GET /projects/:id/repository/tags/:tag_name"
do
let
(
:tag_name
)
{
project
.
repository
.
tag_names
.
sort
.
reverse
.
first
}
it
'should return a specific tag'
do
get
api
(
"/projects/
#{
project
.
id
}
/repository/tags/
#{
tag_name
}
"
,
user
)
expect
(
response
.
status
).
to
eq
(
200
)
expect
(
json_response
[
'name'
]).
to
eq
(
tag_name
)
end
it
'should return 404 for an invalid tag name'
do
get
api
(
"/projects/
#{
project
.
id
}
/repository/tags/foobar"
,
user
)
expect
(
response
.
status
).
to
eq
(
404
)
end
end
describe
'POST /projects/:id/repository/tags'
do
context
'lightweight tags'
do
it
'should create a new tag'
do
...
...
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