mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Add tag protection manage via rest API. --------- Co-authored-by: Alexander Kogay <kogay.a@citilink.ru> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
|
||||
package structs
|
||||
|
||||
import "time"
|
||||
|
||||
// Tag represents a repository tag
|
||||
type Tag struct {
|
||||
Name string `json:"name"`
|
||||
@ -38,3 +40,29 @@ type CreateTagOption struct {
|
||||
Message string `json:"message"`
|
||||
Target string `json:"target"`
|
||||
}
|
||||
|
||||
// TagProtection represents a tag protection
|
||||
type TagProtection struct {
|
||||
ID int64 `json:"id"`
|
||||
NamePattern string `json:"name_pattern"`
|
||||
WhitelistUsernames []string `json:"whitelist_usernames"`
|
||||
WhitelistTeams []string `json:"whitelist_teams"`
|
||||
// swagger:strfmt date-time
|
||||
Created time.Time `json:"created_at"`
|
||||
// swagger:strfmt date-time
|
||||
Updated time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
// CreateTagProtectionOption options for creating a tag protection
|
||||
type CreateTagProtectionOption struct {
|
||||
NamePattern string `json:"name_pattern"`
|
||||
WhitelistUsernames []string `json:"whitelist_usernames"`
|
||||
WhitelistTeams []string `json:"whitelist_teams"`
|
||||
}
|
||||
|
||||
// EditTagProtectionOption options for editing a tag protection
|
||||
type EditTagProtectionOption struct {
|
||||
NamePattern *string `json:"name_pattern"`
|
||||
WhitelistUsernames []string `json:"whitelist_usernames"`
|
||||
WhitelistTeams []string `json:"whitelist_teams"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user