Vendor Update (#16121)
* update github.com/PuerkitoBio/goquery * update github.com/alecthomas/chroma * update github.com/blevesearch/bleve/v2 * update github.com/caddyserver/certmagic * update github.com/go-enry/go-enry/v2 * update github.com/go-git/go-billy/v5 * update github.com/go-git/go-git/v5 * update github.com/go-redis/redis/v8 * update github.com/go-testfixtures/testfixtures/v3 * update github.com/jaytaylor/html2text * update github.com/json-iterator/go * update github.com/klauspost/compress * update github.com/markbates/goth * update github.com/mattn/go-isatty * update github.com/mholt/archiver/v3 * update github.com/microcosm-cc/bluemonday * update github.com/minio/minio-go/v7 * update github.com/prometheus/client_golang * update github.com/unrolled/render * update github.com/xanzy/go-gitlab * update github.com/yuin/goldmark * update github.com/yuin/goldmark-highlighting Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
f088dc4ea1
commit
86e2789960
819 changed files with 38072 additions and 34969 deletions
196
vendor/github.com/xanzy/go-gitlab/projects.go
generated
vendored
196
vendor/github.com/xanzy/go-gitlab/projects.go
generated
vendored
|
@ -75,6 +75,8 @@ type Project struct {
|
|||
EmptyRepo bool `json:"empty_repo"`
|
||||
Archived bool `json:"archived"`
|
||||
AvatarURL string `json:"avatar_url"`
|
||||
LicenseURL string `json:"license_url"`
|
||||
License *ProjectLicense `json:"license"`
|
||||
SharedRunnersEnabled bool `json:"shared_runners_enabled"`
|
||||
ForksCount int `json:"forks_count"`
|
||||
StarCount int `json:"star_count"`
|
||||
|
@ -113,13 +115,15 @@ type Project struct {
|
|||
GroupName string `json:"group_name"`
|
||||
GroupAccessLevel int `json:"group_access_level"`
|
||||
} `json:"shared_with_groups"`
|
||||
Statistics *ProjectStatistics `json:"statistics"`
|
||||
Links *Links `json:"_links,omitempty"`
|
||||
CIConfigPath string `json:"ci_config_path"`
|
||||
CIDefaultGitDepth int `json:"ci_default_git_depth"`
|
||||
CustomAttributes []*CustomAttribute `json:"custom_attributes"`
|
||||
ComplianceFrameworks []string `json:"compliance_frameworks"`
|
||||
BuildCoverageRegex string `json:"build_coverage_regex"`
|
||||
Statistics *ProjectStatistics `json:"statistics"`
|
||||
Links *Links `json:"_links,omitempty"`
|
||||
CIConfigPath string `json:"ci_config_path"`
|
||||
CIDefaultGitDepth int `json:"ci_default_git_depth"`
|
||||
CustomAttributes []*CustomAttribute `json:"custom_attributes"`
|
||||
ComplianceFrameworks []string `json:"compliance_frameworks"`
|
||||
BuildCoverageRegex string `json:"build_coverage_regex"`
|
||||
IssuesTemplate string `json:"issues_template"`
|
||||
MergeRequestsTemplate string `json:"merge_requests_template"`
|
||||
}
|
||||
|
||||
// ContainerExpirationPolicy represents the container expiration policy.
|
||||
|
@ -133,6 +137,73 @@ type ContainerExpirationPolicy struct {
|
|||
NextRunAt *time.Time `json:"next_run_at"`
|
||||
}
|
||||
|
||||
// ForkParent represents the parent project when this is a fork.
|
||||
type ForkParent struct {
|
||||
HTTPURLToRepo string `json:"http_url_to_repo"`
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
NameWithNamespace string `json:"name_with_namespace"`
|
||||
Path string `json:"path"`
|
||||
PathWithNamespace string `json:"path_with_namespace"`
|
||||
WebURL string `json:"web_url"`
|
||||
}
|
||||
|
||||
// GroupAccess represents group access.
|
||||
type GroupAccess struct {
|
||||
AccessLevel AccessLevelValue `json:"access_level"`
|
||||
NotificationLevel NotificationLevelValue `json:"notification_level"`
|
||||
}
|
||||
|
||||
// Links represents a project web links for self, issues, merge_requests,
|
||||
// repo_branches, labels, events, members.
|
||||
type Links struct {
|
||||
Self string `json:"self"`
|
||||
Issues string `json:"issues"`
|
||||
MergeRequests string `json:"merge_requests"`
|
||||
RepoBranches string `json:"repo_branches"`
|
||||
Labels string `json:"labels"`
|
||||
Events string `json:"events"`
|
||||
Members string `json:"members"`
|
||||
}
|
||||
|
||||
// Permissions represents permissions.
|
||||
type Permissions struct {
|
||||
ProjectAccess *ProjectAccess `json:"project_access"`
|
||||
GroupAccess *GroupAccess `json:"group_access"`
|
||||
}
|
||||
|
||||
// ProjectAccess represents project access.
|
||||
type ProjectAccess struct {
|
||||
AccessLevel AccessLevelValue `json:"access_level"`
|
||||
NotificationLevel NotificationLevelValue `json:"notification_level"`
|
||||
}
|
||||
|
||||
// ProjectLicense represent the license for a project.
|
||||
type ProjectLicense struct {
|
||||
Key string `json:"key"`
|
||||
Name string `json:"name"`
|
||||
Nickname string `json:"nickname"`
|
||||
HTMLURL string `json:"html_url"`
|
||||
SourceURL string `json:"source_url"`
|
||||
}
|
||||
|
||||
// ProjectNamespace represents a project namespace.
|
||||
type ProjectNamespace struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Path string `json:"path"`
|
||||
Kind string `json:"kind"`
|
||||
FullPath string `json:"full_path"`
|
||||
AvatarURL string `json:"avatar_url"`
|
||||
WebURL string `json:"web_url"`
|
||||
}
|
||||
|
||||
// ProjectStatistics represents a statistics record for a project.
|
||||
type ProjectStatistics struct {
|
||||
StorageStatistics
|
||||
CommitCount int `json:"commit_count"`
|
||||
}
|
||||
|
||||
// Repository represents a repository.
|
||||
type Repository struct {
|
||||
Name string `json:"name"`
|
||||
|
@ -151,17 +222,6 @@ type Repository struct {
|
|||
HTTPURL string `json:"http_url"`
|
||||
}
|
||||
|
||||
// ProjectNamespace represents a project namespace.
|
||||
type ProjectNamespace struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Path string `json:"path"`
|
||||
Kind string `json:"kind"`
|
||||
FullPath string `json:"full_path"`
|
||||
AvatarURL string `json:"avatar_url"`
|
||||
WebURL string `json:"web_url"`
|
||||
}
|
||||
|
||||
// StorageStatistics represents a statistics record for a group or project.
|
||||
type StorageStatistics struct {
|
||||
StorageSize int64 `json:"storage_size"`
|
||||
|
@ -170,53 +230,6 @@ type StorageStatistics struct {
|
|||
JobArtifactsSize int64 `json:"job_artifacts_size"`
|
||||
}
|
||||
|
||||
// ProjectStatistics represents a statistics record for a project.
|
||||
type ProjectStatistics struct {
|
||||
StorageStatistics
|
||||
CommitCount int `json:"commit_count"`
|
||||
}
|
||||
|
||||
// Permissions represents permissions.
|
||||
type Permissions struct {
|
||||
ProjectAccess *ProjectAccess `json:"project_access"`
|
||||
GroupAccess *GroupAccess `json:"group_access"`
|
||||
}
|
||||
|
||||
// ProjectAccess represents project access.
|
||||
type ProjectAccess struct {
|
||||
AccessLevel AccessLevelValue `json:"access_level"`
|
||||
NotificationLevel NotificationLevelValue `json:"notification_level"`
|
||||
}
|
||||
|
||||
// GroupAccess represents group access.
|
||||
type GroupAccess struct {
|
||||
AccessLevel AccessLevelValue `json:"access_level"`
|
||||
NotificationLevel NotificationLevelValue `json:"notification_level"`
|
||||
}
|
||||
|
||||
// ForkParent represents the parent project when this is a fork.
|
||||
type ForkParent struct {
|
||||
HTTPURLToRepo string `json:"http_url_to_repo"`
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
NameWithNamespace string `json:"name_with_namespace"`
|
||||
Path string `json:"path"`
|
||||
PathWithNamespace string `json:"path_with_namespace"`
|
||||
WebURL string `json:"web_url"`
|
||||
}
|
||||
|
||||
// Links represents a project web links for self, issues, merge_requests,
|
||||
// repo_branches, labels, events, members.
|
||||
type Links struct {
|
||||
Self string `json:"self"`
|
||||
Issues string `json:"issues"`
|
||||
MergeRequests string `json:"merge_requests"`
|
||||
RepoBranches string `json:"repo_branches"`
|
||||
Labels string `json:"labels"`
|
||||
Events string `json:"events"`
|
||||
Members string `json:"members"`
|
||||
}
|
||||
|
||||
func (s Project) String() string {
|
||||
return Stringify(s)
|
||||
}
|
||||
|
@ -356,6 +369,53 @@ func (s *ProjectsService) ListProjectsUsers(pid interface{}, opt *ListProjectUse
|
|||
return p, resp, err
|
||||
}
|
||||
|
||||
// ProjectGroup represents a GitLab project group.
|
||||
type ProjectGroup struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
AvatarURL string `json:"avatar_url"`
|
||||
WebURL string `json:"web_url"`
|
||||
FullName string `json:"full_name"`
|
||||
FullPath string `json:"full_path"`
|
||||
}
|
||||
|
||||
// ListProjectGroupOptions represents the available ListProjectsGroups() options.
|
||||
//
|
||||
// GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-a-projects-groups
|
||||
type ListProjectGroupOptions struct {
|
||||
ListOptions
|
||||
Search *string `url:"search,omitempty" json:"search,omitempty"`
|
||||
SkipGroups []int `url:"skip_groups,omitempty" json:"skip_groups,omitempty"`
|
||||
WithShared *bool `url:"with_shared,omitempty" json:"with_shared,omitempty"`
|
||||
SharedMinAccessLevel *AccessLevelValue `url:"shared_min_access_level,omitempty" json:"shared_min_access_level,omitempty"`
|
||||
SharedVisiableOnly *bool `url:"shared_visible_only,omitempty" json:"shared_visible_only,omitempty"`
|
||||
}
|
||||
|
||||
// ListProjectsGroups gets a list of groups for the given project.
|
||||
//
|
||||
// GitLab API docs:
|
||||
// https://docs.gitlab.com/ce/api/projects.html#list-a-projects-groups
|
||||
func (s *ProjectsService) ListProjectsGroups(pid interface{}, opt *ListProjectGroupOptions, options ...RequestOptionFunc) ([]*ProjectGroup, *Response, error) {
|
||||
project, err := parseID(pid)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
u := fmt.Sprintf("projects/%s/groups", pathEscape(project))
|
||||
|
||||
req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
var p []*ProjectGroup
|
||||
resp, err := s.client.Do(req, &p)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return p, resp, err
|
||||
}
|
||||
|
||||
// ProjectLanguages is a map of strings because the response is arbitrary
|
||||
//
|
||||
// Gitlab API docs: https://docs.gitlab.com/ce/api/projects.html#languages
|
||||
|
@ -537,6 +597,8 @@ type CreateProjectOptions struct {
|
|||
ServiceDeskEnabled *bool `url:"service_desk_enabled,omitempty" json:"service_desk_enabled,omitempty"`
|
||||
AutocloseReferencedIssues *bool `url:"autoclose_referenced_issues,omitempty" json:"autoclose_referenced_issues,omitempty"`
|
||||
SuggestionCommitMessage *string `url:"suggestion_commit_message,omitempty" json:"suggestion_commit_message,omitempty"`
|
||||
IssuesTemplate *string `url:"issues_template,omitempty" json:"issues_template,omitempty"`
|
||||
MergeRequestsTemplate *string `url:"merge_requests_template,omitempty" json:"merge_requests_template,omitempty"`
|
||||
|
||||
// Deprecated members
|
||||
IssuesEnabled *bool `url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"`
|
||||
|
@ -675,6 +737,8 @@ type EditProjectOptions struct {
|
|||
ServiceDeskEnabled *bool `url:"service_desk_enabled,omitempty" json:"service_desk_enabled,omitempty"`
|
||||
AutocloseReferencedIssues *bool `url:"autoclose_referenced_issues,omitempty" json:"autoclose_referenced_issues,omitempty"`
|
||||
SuggestionCommitMessage *string `url:"suggestion_commit_message,omitempty" json:"suggestion_commit_message,omitempty"`
|
||||
IssuesTemplate *string `url:"issues_template,omitempty" json:"issues_template,omitempty"`
|
||||
MergeRequestsTemplate *string `url:"merge_requests_template,omitempty" json:"merge_requests_template,omitempty"`
|
||||
|
||||
// Deprecated members
|
||||
IssuesEnabled *bool `url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"`
|
||||
|
@ -1431,6 +1495,7 @@ type ProjectApprovals struct {
|
|||
DisableOverridingApproversPerMergeRequest bool `json:"disable_overriding_approvers_per_merge_request"`
|
||||
MergeRequestsAuthorApproval bool `json:"merge_requests_author_approval"`
|
||||
MergeRequestsDisableCommittersApproval bool `json:"merge_requests_disable_committers_approval"`
|
||||
RequirePasswordToApprove bool `json:"require_password_to_approve"`
|
||||
}
|
||||
|
||||
// GetApprovalConfiguration get the approval configuration for a project.
|
||||
|
@ -1469,6 +1534,7 @@ type ChangeApprovalConfigurationOptions struct {
|
|||
DisableOverridingApproversPerMergeRequest *bool `url:"disable_overriding_approvers_per_merge_request,omitempty" json:"disable_overriding_approvers_per_merge_request,omitempty"`
|
||||
MergeRequestsAuthorApproval *bool `url:"merge_requests_author_approval,omitempty" json:"merge_requests_author_approval,omitempty"`
|
||||
MergeRequestsDisableCommittersApproval *bool `url:"merge_requests_disable_committers_approval,omitempty" json:"merge_requests_disable_committers_approval,omitempty"`
|
||||
RequirePasswordToApprove *bool `url:"require_password_to_approve,omitempty" json:"require_password_to_approve,omitempty"`
|
||||
}
|
||||
|
||||
// ChangeApprovalConfiguration updates the approval configuration for a project.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue