Commit 92d67d22 authored by Sander van Harmelen's avatar Sander van Harmelen

Tweak the new protected tags code just a little

parent 3ccedfbb
......@@ -5,7 +5,8 @@ import (
"net/url"
)
// ProtectedTagsService handles the protected tag methods of the GitLab API.
// ProtectedTagsService handles communication with the protected tag methods
// of the GitLab API.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_tags.html
......@@ -13,25 +14,26 @@ type ProtectedTagsService struct {
client *Client
}
// TagAccessDescription reperesents the access decription for a protected tag.
// ProtectedTag represents a protected tag.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_tags.html
type TagAccessDescription struct {
AccessLevel AccessLevelValue `json:"access_level"`
AccessLevelDescription string `json:"access_level_description"`
type ProtectedTag struct {
Name string `json:"name"`
CreateAccessLevels []*TagAccessDescription `json:"create_access_levels"`
}
// ProtectedTag represents a protected tag.
// TagAccessDescription reperesents the access decription for a protected tag.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_tags.html
type ProtectedTag struct {
Name string `json:"name"`
CreateAccessLevels []*TagAccessDescription `json:"create_access_levels"`
type TagAccessDescription struct {
AccessLevel AccessLevelValue `json:"access_level"`
AccessLevelDescription string `json:"access_level_description"`
}
// ListProtectedTagsOptions represents available ListProtectedTags() options.
// ListProtectedTagsOptions represents the available ListProtectedTags()
// options.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_tags.html#list-protected-tags
......@@ -87,7 +89,7 @@ func (s *ProtectedTagsService) GetProtectedTag(pid interface{}, tag string, opti
return pt, resp, err
}
// ProtectRepositoryTagsOptions represents available ProtectRepositoryTags()
// ProtectRepositoryTagsOptions represents the available ProtectRepositoryTags()
// options.
//
// GitLab API docs:
......@@ -97,7 +99,8 @@ type ProtectRepositoryTagsOptions struct {
CreateAccessLevel *AccessLevelValue `url:"create_access_level,omitempty" json:"create_access_level,omitempty"`
}
// ProtectRepositoryTags protects a single tag or a wildcard tag.
// ProtectRepositoryTags protects a single repository tag or several project
// repository tags using a wildcard protected tag.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_tags.html#protect-repository-tags
......@@ -122,7 +125,8 @@ func (s *ProtectedTagsService) ProtectRepositoryTags(pid interface{}, opt *Prote
return pt, resp, err
}
// UnprotectRepositoryTags unprotects the given tag or wildcard tag.
// UnprotectRepositoryTags unprotects the given protected tag or wildcard
// protected tag.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_tags.html#unprotect-repository-tags
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment