Bump github.com/xanzy/go-gitlab from 0.107.0 to 0.108.0 (#446)

Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.107.0 to 0.108.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/main/releases_test.go)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.107.0...v0.108.0)

---
updated-dependencies:
- dependency-name: github.com/xanzy/go-gitlab
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot]
2024-09-01 09:42:30 -07:00
committed by GitHub
parent 1a0529219e
commit 9dced6a4e1
16 changed files with 1055 additions and 718 deletions

2
go.mod
View File

@@ -14,7 +14,7 @@ require (
github.com/mitchellh/go-homedir v1.1.0
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/xanzy/go-gitlab v0.107.0
github.com/xanzy/go-gitlab v0.108.0
golang.org/x/oauth2 v0.22.0
gopkg.in/yaml.v2 v2.4.0
)

4
go.sum
View File

@@ -150,8 +150,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/xanzy/go-gitlab v0.107.0 h1:P2CT9Uy9yN9lJo3FLxpMZ4xj6uWcpnigXsjvqJ6nd2Y=
github.com/xanzy/go-gitlab v0.107.0/go.mod h1:wKNKh3GkYDMOsGmnfuX+ITCmDuSDWFO0G+C4AygL9RY=
github.com/xanzy/go-gitlab v0.108.0 h1:IEvEUWFR5G1seslRhJ8gC//INiIUqYXuSUoBd7/gFKE=
github.com/xanzy/go-gitlab v0.108.0/go.mod h1:wKNKh3GkYDMOsGmnfuX+ITCmDuSDWFO0G+C4AygL9RY=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=

View File

@@ -72,6 +72,13 @@ type serviceEvent struct {
ObjectKind string `json:"object_kind"`
}
const eventTokenHeader = "X-Gitlab-Token"
// HookEventToken returns the token for the given request.
func HookEventToken(r *http.Request) string {
return r.Header.Get(eventTokenHeader)
}
const eventTypeHeader = "X-Gitlab-Event"
// HookEventType returns the event type for the given request.

View File

@@ -24,6 +24,7 @@ import (
"errors"
"fmt"
"io"
"math"
"math/rand"
"mime/multipart"
"net/http"
@@ -236,15 +237,16 @@ type Client struct {
// ListOptions specifies the optional parameters to various List methods that
// support pagination.
type ListOptions struct {
// For offset-based paginated result sets, page of results to retrieve.
Page int `url:"page,omitempty" json:"page,omitempty"`
// For offset-based and keyset-based paginated result sets, the number of results to include per page.
PerPage int `url:"per_page,omitempty" json:"per_page,omitempty"`
// For keyset-based paginated result sets, name of the column by which to order
OrderBy string `url:"order_by,omitempty" json:"order_by,omitempty"`
// For keyset-based paginated result sets, the value must be `"keyset"`
Pagination string `url:"pagination,omitempty" json:"pagination,omitempty"`
// For offset-based and keyset-based paginated result sets, the number of results to include per page.
PerPage int `url:"per_page,omitempty" json:"per_page,omitempty"`
// For offset-based paginated result sets, page of results to retrieve.
Page int `url:"page,omitempty" json:"page,omitempty"`
// For keyset-based paginated result sets, tree record ID at which to fetch the next page.
PageToken string `url:"page_token,omitempty" json:"page_token,omitempty"`
// For keyset-based paginated result sets, name of the column by which to order
OrderBy string `url:"order_by,omitempty" json:"order_by,omitempty"`
// For keyset-based paginated result sets, sort order (`"asc"`` or `"desc"`)
Sort string `url:"sort,omitempty" json:"sort,omitempty"`
}
@@ -509,7 +511,7 @@ func (c *Client) retryHTTPBackoff(min, max time.Duration, attemptNum int, resp *
// min and max are mainly used for bounding the jitter that will be added to
// the reset time retrieved from the headers. But if the final wait time is
// less then min, min will be used instead.
func rateLimitBackoff(min, max time.Duration, _ int, resp *http.Response) time.Duration {
func rateLimitBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration {
// rnd is used to generate pseudo-random numbers.
rnd := rand.New(rand.NewSource(time.Now().UnixNano()))
@@ -524,6 +526,11 @@ func rateLimitBackoff(min, max time.Duration, _ int, resp *http.Response) time.D
min = wait
}
}
} else {
// In case the RateLimit-Reset header is not set, back off an additional
// 100% exponentially. With the default milliseconds being set to 100 for
// `min`, this makes the 5th retry wait 3.2 seconds (3,200 ms) by default.
min = time.Duration(float64(min) * math.Pow(2, float64(attemptNum)))
}
}

View File

@@ -58,11 +58,19 @@ func (m GroupMilestone) String() string {
// https://docs.gitlab.com/ee/api/group_milestones.html#list-group-milestones
type ListGroupMilestonesOptions struct {
ListOptions
IIDs *[]int `url:"iids[],omitempty" json:"iids,omitempty"`
State *string `url:"state,omitempty" json:"state,omitempty"`
Title *string `url:"title,omitempty" json:"title,omitempty"`
Search *string `url:"search,omitempty" json:"search,omitempty"`
IncludeParentMilestones *bool `url:"include_parent_milestones,omitempty" json:"include_parent_milestones,omitempty"`
IIDs *[]int `url:"iids[],omitempty" json:"iids,omitempty"`
State *string `url:"state,omitempty" json:"state,omitempty"`
Title *string `url:"title,omitempty" json:"title,omitempty"`
Search *string `url:"search,omitempty" json:"search,omitempty"`
SearchTitle *string `url:"search_title,omitempty" json:"search_title,omitempty"`
IncludeParentMilestones *bool `url:"include_parent_milestones,omitempty" json:"include_parent_milestones,omitempty"`
IncludeAncestors *bool `url:"include_ancestors,omitempty" json:"include_ancestors,omitempty"`
IncludeDescendents *bool `url:"include_descendents,omitempty" json:"include_descendents,omitempty"`
UpdatedBefore *ISOTime `url:"updated_before,omitempty" json:"updated_before,omitempty"`
UpdatedAfter *ISOTime `url:"updated_after,omitempty" json:"updated_after,omitempty"`
ContainingDate *ISOTime `url:"containing_date,omitempty" json:"containing_date,omitempty"`
StartDate *ISOTime `url:"start_date,omitempty" json:"start_date,omitempty"`
EndDate *ISOTime `url:"end_date,omitempty" json:"end_date,omitempty"`
}
// ListGroupMilestones returns a list of group milestones.

View File

@@ -82,18 +82,27 @@ func (s *GroupVariablesService) ListVariables(gid interface{}, opt *ListGroupVar
return vs, resp, nil
}
// GetGroupVariableOptions represents the available GetVariable()
// options.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/group_level_variables.html#show-variable-details
type GetGroupVariableOptions struct {
Filter *VariableFilter `url:"filter,omitempty" json:"filter,omitempty"`
}
// GetVariable gets a variable.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/group_level_variables.html#show-variable-details
func (s *GroupVariablesService) GetVariable(gid interface{}, key string, options ...RequestOptionFunc) (*GroupVariable, *Response, error) {
func (s *GroupVariablesService) GetVariable(gid interface{}, key string, opt *GetGroupVariableOptions, options ...RequestOptionFunc) (*GroupVariable, *Response, error) {
group, err := parseID(gid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("groups/%s/variables/%s", PathEscape(group), url.PathEscape(key))
req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
if err != nil {
return nil, nil, err
}

View File

@@ -1037,6 +1037,7 @@ type GroupPushRules struct {
CommitCommitterCheck bool `json:"commit_committer_check"`
CommitCommitterNameCheck bool `json:"commit_committer_name_check"`
RejectUnsignedCommits bool `json:"reject_unsigned_commits"`
RejectNonDCOCommits bool `json:"reject_non_dco_commits"`
}
// GetGroupPushRules gets the push rules of a group.
@@ -1082,6 +1083,7 @@ type AddGroupPushRuleOptions struct {
MemberCheck *bool `url:"member_check,omitempty" json:"member_check,omitempty"`
PreventSecrets *bool `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"`
RejectUnsignedCommits *bool `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"`
RejectNonDCOCommits *bool `url:"reject_non_dco_commits,omitempty" json:"reject_non_dco_commits,omitempty"`
}
// AddGroupPushRule adds push rules to the specified group.
@@ -1127,6 +1129,7 @@ type EditGroupPushRuleOptions struct {
MemberCheck *bool `url:"member_check,omitempty" json:"member_check,omitempty"`
PreventSecrets *bool `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"`
RejectUnsignedCommits *bool `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"`
RejectNonDCOCommits *bool `url:"reject_non_dco_commits,omitempty" json:"reject_non_dco_commits,omitempty"`
}
// EditGroupPushRule edits a push rule for a specified group.

View File

@@ -158,3 +158,109 @@ func (s *ImportService) ImportGitHubGistsIntoGitLabSnippets(opt *ImportGitHubGis
return s.client.Do(req, nil)
}
// BitbucketServerImport represents the response from an import from Bitbucket
// Server.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-server
type BitbucketServerImport struct {
ID int `json:"id"`
Name string `json:"name"`
FullPath string `json:"full_path"`
FullName string `json:"full_name"`
RefsUrl string `json:"refs_url"`
}
func (s BitbucketServerImport) String() string {
return Stringify(s)
}
// ImportRepositoryFromBitbucketServerOptions represents the available ImportRepositoryFromBitbucketServer() options.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-server
type ImportRepositoryFromBitbucketServerOptions struct {
BitbucketServerUrl *string `url:"bitbucket_server_url,omitempty" json:"bitbucket_server_url,omitempty"`
BitbucketServerUsername *string `url:"bitbucket_server_username,omitempty" json:"bitbucket_server_username,omitempty"`
PersonalAccessToken *string `url:"personal_access_token,omitempty" json:"personal_access_token,omitempty"`
BitbucketServerProject *string `url:"bitbucket_server_project,omitempty" json:"bitbucket_server_project,omitempty"`
BitbucketServerRepo *string `url:"bitbucket_server_repo,omitempty" json:"bitbucket_server_repo,omitempty"`
NewName *string `url:"new_name,omitempty" json:"new_name,omitempty"`
NewNamespace *string `url:"new_namespace,omitempty" json:"new_namespace,omitempty"`
TimeoutStrategy *string `url:"timeout_strategy,omitempty" json:"timeout_strategy,omitempty"`
}
// Import a repository from Bitbucket Server.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-server
func (s *ImportService) ImportRepositoryFromBitbucketServer(opt *ImportRepositoryFromBitbucketServerOptions, options ...RequestOptionFunc) (*BitbucketServerImport, *Response, error) {
req, err := s.client.NewRequest(http.MethodPost, "import/bitbucket_server", opt, options)
if err != nil {
return nil, nil, err
}
bsi := new(BitbucketServerImport)
resp, err := s.client.Do(req, bsi)
if err != nil {
return nil, resp, err
}
return bsi, resp, nil
}
// BitbucketCloudImport represents the response from an import from Bitbucket
// Cloud.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-cloud
type BitbucketCloudImport struct {
ID int `json:"id"`
Name string `json:"name"`
FullPath string `json:"full_path"`
FullName string `json:"full_name"`
RefsUrl string `json:"refs_url"`
ImportSource string `json:"import_source"`
ImportStatus string `json:"import_status"`
HumanImportStatusName string `json:"human_import_status_name"`
ProviderLink string `json:"provider_link"`
RelationType string `json:"relation_type"`
ImportWarning string `json:"import_warning"`
}
func (s BitbucketCloudImport) String() string {
return Stringify(s)
}
// ImportRepositoryFromBitbucketCloudOptions represents the available
// ImportRepositoryFromBitbucketCloud() options.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-cloud
type ImportRepositoryFromBitbucketCloudOptions struct {
BitbucketUsername *string `url:"bitbucket_username,omitempty" json:"bitbucket_username,omitempty"`
BitbucketAppPassword *string `url:"bitbucket_app_password,omitempty" json:"bitbucket_app_password,omitempty"`
RepoPath *string `url:"repo_path,omitempty" json:"repo_path,omitempty"`
TargetNamespace *string `url:"target_namespace,omitempty" json:"target_namespace,omitempty"`
NewName *string `url:"new_name,omitempty" json:"new_name,omitempty"`
}
// Import a repository from Bitbucket Cloud.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-cloud
func (s *ImportService) ImportRepositoryFromBitbucketCloud(opt *ImportRepositoryFromBitbucketCloudOptions, options ...RequestOptionFunc) (*BitbucketCloudImport, *Response, error) {
req, err := s.client.NewRequest(http.MethodPost, "import/bitbucket", opt, options)
if err != nil {
return nil, nil, err
}
bci := new(BitbucketCloudImport)
resp, err := s.client.Do(req, bci)
if err != nil {
return nil, resp, err
}
return bci, resp, nil
}

View File

@@ -17,23 +17,31 @@ type MemberRolesService struct {
//
// GitLab API docs: https://docs.gitlab.com/ee/api/member_roles.html
type MemberRole struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
GroupId int `json:"group_id"`
BaseAccessLevel AccessLevelValue `json:"base_access_level"`
AdminCICDVariables bool `json:"admin_cicd_variables,omitempty"`
AdminMergeRequests bool `json:"admin_merge_request,omitempty"`
AdminTerraformState bool `json:"admin_terraform_state,omitempty"`
AdminVulnerability bool `json:"admin_vulnerability,omitempty"`
ReadCode bool `json:"read_code,omitempty"`
ReadDependency bool `json:"read_dependency,omitempty"`
ReadVulnerability bool `json:"read_vulnerability,omitempty"`
AdminGroupMembers bool `json:"admin_group_member,omitempty"`
ManageProjectAccessToken bool `json:"manage_project_access_tokens,omitempty"`
ArchiveProject bool `json:"archive_project,omitempty"`
RemoveProject bool `json:"remove_project,omitempty"`
ManageGroupAccesToken bool `json:"manage_group_access_tokens,omitempty"`
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
GroupID int `json:"group_id"`
BaseAccessLevel AccessLevelValue `json:"base_access_level"`
AdminCICDVariables bool `json:"admin_cicd_variables,omitempty"`
AdminComplianceFramework bool `json:"admin_compliance_framework,omitempty"`
AdminGroupMembers bool `json:"admin_group_member,omitempty"`
AdminMergeRequests bool `json:"admin_merge_request,omitempty"`
AdminPushRules bool `json:"admin_push_rules,omitempty"`
AdminTerraformState bool `json:"admin_terraform_state,omitempty"`
AdminVulnerability bool `json:"admin_vulnerability,omitempty"`
AdminWebHook bool `json:"admin_web_hook,omitempty"`
ArchiveProject bool `json:"archive_project,omitempty"`
ManageDeployTokens bool `json:"manage_deploy_tokens,omitempty"`
ManageGroupAccesToken bool `json:"manage_group_access_tokens,omitempty"`
ManageMergeRequestSettings bool `json:"manage_merge_request_settings,omitempty"`
ManageProjectAccessToken bool `json:"manage_project_access_tokens,omitempty"`
ManageSecurityPolicyLink bool `json:"manage_security_policy_link,omitempty"`
ReadCode bool `json:"read_code,omitempty"`
ReadRunners bool `json:"read_runners,omitempty"`
ReadDependency bool `json:"read_dependency,omitempty"`
ReadVulnerability bool `json:"read_vulnerability,omitempty"`
RemoveGroup bool `json:"remove_group,omitempty"`
RemoveProject bool `json:"remove_project,omitempty"`
}
// ListMemberRoles gets a list of member roles for a specified group.
@@ -66,14 +74,29 @@ func (s *MemberRolesService) ListMemberRoles(gid interface{}, options ...Request
// GitLab API docs:
// https://docs.gitlab.com/ee/api/member_roles.html#add-a-member-role-to-a-group
type CreateMemberRoleOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"`
BaseAccessLevel *AccessLevelValue `url:"base_access_level,omitempty" json:"base_access_level,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"`
AdminMergeRequest *bool `url:"admin_merge_request,omitempty" json:"admin_merge_request,omitempty"`
AdminVulnerability *bool `url:"admin_vulnerability,omitempty" json:"admin_vulnerability,omitempty"`
ReadCode *bool `url:"read_code,omitempty" json:"read_code,omitempty"`
ReadDependency *bool `url:"read_dependency,omitempty" json:"read_dependency,omitempty"`
ReadVulnerability *bool `url:"read_vulnerability,omitempty" json:"read_vulnerability,omitempty"`
Name *string `url:"name,omitempty" json:"name,omitempty"`
BaseAccessLevel *AccessLevelValue `url:"base_access_level,omitempty" json:"base_access_level,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"`
AdminCICDVariables *bool `url:"admin_cicd_variables" json:"admin_cicd_variables,omitempty"`
AdminComplianceFramework *bool `url:"admin_compliance_framework" json:"admin_compliance_framework,omitempty"`
AdminGroupMembers *bool `url:"admin_group_member" json:"admin_group_member,omitempty"`
AdminMergeRequest *bool `url:"admin_merge_request,omitempty" json:"admin_merge_request,omitempty"`
AdminPushRules *bool `url:"admin_push_rules" json:"admin_push_rules,omitempty"`
AdminTerraformState *bool `url:"admin_terraform_state" json:"admin_terraform_state,omitempty"`
AdminVulnerability *bool `url:"admin_vulnerability,omitempty" json:"admin_vulnerability,omitempty"`
AdminWebHook *bool `url:"admin_web_hook" json:"admin_web_hook,omitempty"`
ArchiveProject *bool `url:"archive_project" json:"archive_project,omitempty"`
ManageDeployTokens *bool `url:"manage_deploy_tokens" json:"manage_deploy_tokens,omitempty"`
ManageGroupAccesToken *bool `url:"manage_group_access_tokens" json:"manage_group_access_tokens,omitempty"`
ManageMergeRequestSettings *bool `url:"manage_merge_request_settings" json:"manage_merge_request_settings,omitempty"`
ManageProjectAccessToken *bool `url:"manage_project_access_tokens" json:"manage_project_access_tokens,omitempty"`
ManageSecurityPolicyLink *bool `url:"manage_security_policy_link" json:"manage_security_policy_link,omitempty"`
ReadCode *bool `url:"read_code,omitempty" json:"read_code,omitempty"`
ReadRunners *bool `url:"read_runners" json:"read_runners,omitempty"`
ReadDependency *bool `url:"read_dependency,omitempty" json:"read_dependency,omitempty"`
ReadVulnerability *bool `url:"read_vulnerability,omitempty" json:"read_vulnerability,omitempty"`
RemoveGroup *bool `url:"remove_group" json:"remove_group,omitempty"`
RemoveProject *bool `url:"remove_project" json:"remove_project,omitempty"`
}
// CreateMemberRole creates a new member role for a specified group.

View File

@@ -94,6 +94,7 @@ type MergeRequestApprovalRule struct {
ID int `json:"id"`
Name string `json:"name"`
RuleType string `json:"rule_type"`
ReportType string `json:"report_type"`
EligibleApprovers []*BasicUser `json:"eligible_approvers"`
ApprovalsRequired int `json:"approvals_required"`
SourceRule *ProjectApprovalRule `json:"source_rule"`

View File

@@ -57,7 +57,14 @@ func (p PersonalAccessToken) String() string {
// https://docs.gitlab.com/ee/api/personal_access_tokens.html#list-personal-access-tokens
type ListPersonalAccessTokensOptions struct {
ListOptions
UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"`
CreatedAfter *ISOTime `url:"created_after,omitempty" json:"created_after,omitempty"`
CreatedBefore *ISOTime `url:"created_before,omitempty" json:"created_before,omitempty"`
LastUsedAfter *ISOTime `url:"last_used_after,omitempty" json:"last_used_after,omitempty"`
LastUsedBefore *ISOTime `url:"last_used_before,omitempty" json:"last_used_before,omitempty"`
Revoked *bool `url:"revoked,omitempty" json:"revoked,omitempty"`
Search *string `url:"search,omitempty" json:"search,omitempty"`
State *string `url:"state,omitempty" json:"state,omitempty"`
UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"`
}
// ListPersonalAccessTokens gets a list of all personal access tokens.

View File

@@ -86,6 +86,7 @@ type Project struct {
OnlyAllowMergeIfPipelineSucceeds bool `json:"only_allow_merge_if_pipeline_succeeds"`
OnlyAllowMergeIfAllDiscussionsAreResolved bool `json:"only_allow_merge_if_all_discussions_are_resolved"`
RemoveSourceBranchAfterMerge bool `json:"remove_source_branch_after_merge"`
PreventMergeWithoutJiraIssue bool `json:"prevent_merge_without_jira_issue"`
PrintingMergeRequestLinkEnabled bool `json:"printing_merge_request_link_enabled"`
LFSEnabled bool `json:"lfs_enabled"`
RepositoryStorage string `json:"repository_storage"`
@@ -168,6 +169,7 @@ type Project struct {
MergeRequestDefaultTargetSelf bool `json:"mr_default_target_self"`
ModelExperimentsAccessLevel AccessControlValue `json:"model_experiments_access_level"`
ModelRegistryAccessLevel AccessControlValue `json:"model_registry_access_level"`
PreReceiveSecretDetectionEnabled bool `json:"pre_receive_secret_detection_enabled"`
// Deprecated: Use EmailsEnabled instead
EmailsDisabled bool `json:"emails_disabled"`
@@ -292,6 +294,7 @@ type Statistics struct {
PackagesSize int64 `json:"packages_size"`
SnippetsSize int64 `json:"snippets_size"`
UploadsSize int64 `json:"uploads_size"`
ContainerRegistrySize int64 `json:"container_registry_size"`
}
func (s Project) String() string {
@@ -891,6 +894,7 @@ type EditProjectOptions struct {
InfrastructureAccessLevel *AccessControlValue `url:"infrastructure_access_level,omitempty" json:"infrastructure_access_level,omitempty"`
MonitorAccessLevel *AccessControlValue `url:"monitor_access_level,omitempty" json:"monitor_access_level,omitempty"`
RemoveSourceBranchAfterMerge *bool `url:"remove_source_branch_after_merge,omitempty" json:"remove_source_branch_after_merge,omitempty"`
PreventMergeWithoutJiraIssue *bool `url:"prevent_merge_without_jira_issue,omitempty" json:"prevent_merge_without_jira_issue,omitempty"`
PrintingMergeRequestLinkEnabled *bool `url:"printing_merge_request_link_enabled,omitempty" json:"printing_merge_request_link_enabled,omitempty"`
RepositoryAccessLevel *AccessControlValue `url:"repository_access_level,omitempty" json:"repository_access_level,omitempty"`
RepositoryStorage *string `url:"repository_storage,omitempty" json:"repository_storage,omitempty"`
@@ -1662,6 +1666,7 @@ type ProjectPushRules struct {
CommitCommitterCheck bool `json:"commit_committer_check"`
CommitCommitterNameCheck bool `json:"commit_committer_name_check"`
RejectUnsignedCommits bool `json:"reject_unsigned_commits"`
RejectNonDCOCommits bool `json:"reject_non_dco_commits"`
}
// GetProjectPushRules gets the push rules of a project.
@@ -1707,6 +1712,7 @@ type AddProjectPushRuleOptions struct {
MemberCheck *bool `url:"member_check,omitempty" json:"member_check,omitempty"`
PreventSecrets *bool `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"`
RejectUnsignedCommits *bool `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"`
RejectNonDCOCommits *bool `url:"reject_non_dco_commits,omitempty" json:"reject_non_dco_commits,omitempty"`
}
// AddProjectPushRule adds a push rule to a specified project.
@@ -1752,6 +1758,7 @@ type EditProjectPushRuleOptions struct {
MemberCheck *bool `url:"member_check,omitempty" json:"member_check,omitempty"`
PreventSecrets *bool `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"`
RejectUnsignedCommits *bool `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"`
RejectNonDCOCommits *bool `url:"reject_non_dco_commits,omitempty" json:"reject_non_dco_commits,omitempty"`
}
// EditProjectPushRule edits a push rule for a specified project.

View File

@@ -50,7 +50,7 @@ type Iteration struct {
ID int `json:"id"`
IID int `json:"iid"`
Sequence int `json:"sequence"`
GroupId int `json:"group_id"`
GroupID int `json:"group_id"`
Title string `json:"title"`
Description string `json:"description"`
State int `json:"state"`

File diff suppressed because it is too large Load Diff

View File

@@ -88,6 +88,7 @@ type User struct {
LastActivityOn *ISOTime `json:"last_activity_on"`
ColorSchemeID int `json:"color_scheme_id"`
IsAdmin bool `json:"is_admin"`
IsAuditor bool `json:"is_auditor"`
AvatarURL string `json:"avatar_url"`
CanCreateGroup bool `json:"can_create_group"`
CanCreateProject bool `json:"can_create_project"`

2
vendor/modules.txt vendored
View File

@@ -193,7 +193,7 @@ github.com/spf13/viper/internal/features
# github.com/subosito/gotenv v1.6.0
## explicit; go 1.18
github.com/subosito/gotenv
# github.com/xanzy/go-gitlab v0.107.0
# github.com/xanzy/go-gitlab v0.108.0
## explicit; go 1.19
github.com/xanzy/go-gitlab
# go.uber.org/atomic v1.9.0