diff --git a/go.mod b/go.mod index a677baf4e..ba798c6d8 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 github.com/tektoncd/pipeline v0.65.1 - github.com/xanzy/go-gitlab v0.113.0 + gitlab.com/gitlab-org/api/client-go v0.116.0 go.opencensus.io v0.24.0 go.uber.org/zap v1.27.0 golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c diff --git a/go.sum b/go.sum index 09a8a601d..74b8fc17a 100644 --- a/go.sum +++ b/go.sum @@ -470,8 +470,6 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/xanzy/go-gitlab v0.113.0 h1:v5O4R+YZbJGxKqa9iIZxjMyeKkMKBN8P6sZsNl+YckM= -github.com/xanzy/go-gitlab v0.113.0/go.mod h1:wKNKh3GkYDMOsGmnfuX+ITCmDuSDWFO0G+C4AygL9RY= github.com/xlzd/gotp v0.1.0 h1:37blvlKCh38s+fkem+fFh7sMnceltoIEBYTVXyoa5Po= github.com/xlzd/gotp v0.1.0/go.mod h1:ndLJ3JKzi3xLmUProq4LLxCuECL93dG9WASNLpHz8qg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -479,6 +477,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +gitlab.com/gitlab-org/api/client-go v0.116.0 h1:Dy534gtZPMrnm3fAcmQRMadrcoUyFO4FQ4rXlSAdHAw= +gitlab.com/gitlab-org/api/client-go v0.116.0/go.mod h1:B29OfnZklmaoiR7uHANh9jTyfWEgmXvZLVEnosw2Dx0= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= diff --git a/pkg/cli/webhook/gitlab.go b/pkg/cli/webhook/gitlab.go index 1a1eaf127..01413e3d5 100644 --- a/pkg/cli/webhook/gitlab.go +++ b/pkg/cli/webhook/gitlab.go @@ -10,7 +10,7 @@ import ( "github.com/openshift-pipelines/pipelines-as-code/pkg/cli" "github.com/openshift-pipelines/pipelines-as-code/pkg/cli/prompt" "github.com/openshift-pipelines/pipelines-as-code/pkg/random" - "github.com/xanzy/go-gitlab" + gitlab "gitlab.com/gitlab-org/api/client-go" ) type gitLabConfig struct { diff --git a/pkg/matcher/annotation_matcher_test.go b/pkg/matcher/annotation_matcher_test.go index 0ecea8550..7f6f9e822 100644 --- a/pkg/matcher/annotation_matcher_test.go +++ b/pkg/matcher/annotation_matcher_test.go @@ -27,7 +27,7 @@ import ( ghtesthelper "github.com/openshift-pipelines/pipelines-as-code/pkg/test/github" testnewrepo "github.com/openshift-pipelines/pipelines-as-code/pkg/test/repository" tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" - "github.com/xanzy/go-gitlab" + gitlab "gitlab.com/gitlab-org/api/client-go" "go.uber.org/zap" zapobserver "go.uber.org/zap/zaptest/observer" "gotest.tools/v3/assert" diff --git a/pkg/provider/gitlab/acl.go b/pkg/provider/gitlab/acl.go index e9b99f1fc..a384e83a7 100644 --- a/pkg/provider/gitlab/acl.go +++ b/pkg/provider/gitlab/acl.go @@ -7,7 +7,7 @@ import ( "github.com/openshift-pipelines/pipelines-as-code/pkg/acl" "github.com/openshift-pipelines/pipelines-as-code/pkg/params/info" - "github.com/xanzy/go-gitlab" + gitlab "gitlab.com/gitlab-org/api/client-go" ) // IsAllowedOwnersFile get the owner files (OWNERS, OWNERS_ALIASES) from main branch diff --git a/pkg/provider/gitlab/detect.go b/pkg/provider/gitlab/detect.go index 5a8bf7518..2d05d8ee9 100644 --- a/pkg/provider/gitlab/detect.go +++ b/pkg/provider/gitlab/detect.go @@ -6,7 +6,7 @@ import ( "net/http" "github.com/openshift-pipelines/pipelines-as-code/pkg/provider" - "github.com/xanzy/go-gitlab" + gitlab "gitlab.com/gitlab-org/api/client-go" "go.uber.org/zap" ) diff --git a/pkg/provider/gitlab/detect_test.go b/pkg/provider/gitlab/detect_test.go index dd0592cd1..5ad943bb3 100644 --- a/pkg/provider/gitlab/detect_test.go +++ b/pkg/provider/gitlab/detect_test.go @@ -7,7 +7,7 @@ import ( thelp "github.com/openshift-pipelines/pipelines-as-code/pkg/provider/gitlab/test" "github.com/openshift-pipelines/pipelines-as-code/pkg/test/logger" - "github.com/xanzy/go-gitlab" + gitlab "gitlab.com/gitlab-org/api/client-go" "gotest.tools/v3/assert" ) diff --git a/pkg/provider/gitlab/gitlab.go b/pkg/provider/gitlab/gitlab.go index 4ca9fdf8a..d3257f669 100644 --- a/pkg/provider/gitlab/gitlab.go +++ b/pkg/provider/gitlab/gitlab.go @@ -17,7 +17,7 @@ import ( "github.com/openshift-pipelines/pipelines-as-code/pkg/params/info" "github.com/openshift-pipelines/pipelines-as-code/pkg/params/triggertype" "github.com/openshift-pipelines/pipelines-as-code/pkg/provider" - "github.com/xanzy/go-gitlab" + gitlab "gitlab.com/gitlab-org/api/client-go" "go.uber.org/zap" ) diff --git a/pkg/provider/gitlab/gitlab_test.go b/pkg/provider/gitlab/gitlab_test.go index 9265b15a8..383bd30b8 100644 --- a/pkg/provider/gitlab/gitlab_test.go +++ b/pkg/provider/gitlab/gitlab_test.go @@ -18,7 +18,7 @@ import ( thelp "github.com/openshift-pipelines/pipelines-as-code/pkg/provider/gitlab/test" testclient "github.com/openshift-pipelines/pipelines-as-code/pkg/test/clients" "github.com/openshift-pipelines/pipelines-as-code/pkg/test/logger" - "github.com/xanzy/go-gitlab" + gitlab "gitlab.com/gitlab-org/api/client-go" "go.uber.org/zap" zapobserver "go.uber.org/zap/zaptest/observer" "gotest.tools/v3/assert" diff --git a/pkg/provider/gitlab/parse_payload.go b/pkg/provider/gitlab/parse_payload.go index 31464fec1..bfcb41799 100644 --- a/pkg/provider/gitlab/parse_payload.go +++ b/pkg/provider/gitlab/parse_payload.go @@ -11,7 +11,7 @@ import ( "github.com/openshift-pipelines/pipelines-as-code/pkg/params" "github.com/openshift-pipelines/pipelines-as-code/pkg/params/info" "github.com/openshift-pipelines/pipelines-as-code/pkg/params/triggertype" - "github.com/xanzy/go-gitlab" + gitlab "gitlab.com/gitlab-org/api/client-go" ) func (v *Provider) ParsePayload(_ context.Context, _ *params.Run, request *http.Request, diff --git a/pkg/provider/gitlab/parse_payload_test.go b/pkg/provider/gitlab/parse_payload_test.go index 6f1a108b3..9960e11ac 100644 --- a/pkg/provider/gitlab/parse_payload_test.go +++ b/pkg/provider/gitlab/parse_payload_test.go @@ -9,7 +9,7 @@ import ( "github.com/openshift-pipelines/pipelines-as-code/pkg/params" "github.com/openshift-pipelines/pipelines-as-code/pkg/params/info" thelp "github.com/openshift-pipelines/pipelines-as-code/pkg/provider/gitlab/test" - "github.com/xanzy/go-gitlab" + gitlab "gitlab.com/gitlab-org/api/client-go" "gotest.tools/v3/assert" rtesting "knative.dev/pkg/reconciler/testing" ) diff --git a/pkg/provider/gitlab/test/test.go b/pkg/provider/gitlab/test/test.go index 6f0b4de72..b1a33ee28 100644 --- a/pkg/provider/gitlab/test/test.go +++ b/pkg/provider/gitlab/test/test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - "github.com/xanzy/go-gitlab" + gitlab "gitlab.com/gitlab-org/api/client-go" "gotest.tools/v3/assert" ) diff --git a/test/gitlab_delete_tag_event_test.go b/test/gitlab_delete_tag_event_test.go index 8cf5b6c12..41c35c55c 100644 --- a/test/gitlab_delete_tag_event_test.go +++ b/test/gitlab_delete_tag_event_test.go @@ -13,7 +13,7 @@ import ( tgitlab "github.com/openshift-pipelines/pipelines-as-code/test/pkg/gitlab" twait "github.com/openshift-pipelines/pipelines-as-code/test/pkg/wait" "github.com/tektoncd/pipeline/pkg/names" - "github.com/xanzy/go-gitlab" + gitlab "gitlab.com/gitlab-org/api/client-go" "gotest.tools/v3/assert" ) diff --git a/test/gitlab_merge_request_test.go b/test/gitlab_merge_request_test.go index 394865352..746a3eafa 100644 --- a/test/gitlab_merge_request_test.go +++ b/test/gitlab_merge_request_test.go @@ -20,7 +20,7 @@ import ( "github.com/openshift-pipelines/pipelines-as-code/test/pkg/scm" twait "github.com/openshift-pipelines/pipelines-as-code/test/pkg/wait" "github.com/tektoncd/pipeline/pkg/names" - clientGitlab "github.com/xanzy/go-gitlab" + clientGitlab "gitlab.com/gitlab-org/api/client-go" "gotest.tools/v3/assert" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/test/pkg/gitlab/crd.go b/test/pkg/gitlab/crd.go index a7b89ee11..c4054e47c 100644 --- a/test/pkg/gitlab/crd.go +++ b/test/pkg/gitlab/crd.go @@ -8,7 +8,7 @@ import ( "github.com/openshift-pipelines/pipelines-as-code/pkg/params" pacrepo "github.com/openshift-pipelines/pipelines-as-code/test/pkg/repository" "github.com/openshift-pipelines/pipelines-as-code/test/pkg/secret" - "github.com/xanzy/go-gitlab" + gitlab "gitlab.com/gitlab-org/api/client-go" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/test/pkg/gitlab/setup.go b/test/pkg/gitlab/setup.go index 0994597c8..fbcc00dc3 100644 --- a/test/pkg/gitlab/setup.go +++ b/test/pkg/gitlab/setup.go @@ -12,7 +12,7 @@ import ( "github.com/openshift-pipelines/pipelines-as-code/pkg/provider/gitlab" "github.com/openshift-pipelines/pipelines-as-code/test/pkg/options" "github.com/openshift-pipelines/pipelines-as-code/test/pkg/repository" - gitlab2 "github.com/xanzy/go-gitlab" + gitlab2 "gitlab.com/gitlab-org/api/client-go" "gotest.tools/v3/assert" ) diff --git a/test/pkg/gitlab/test.go b/test/pkg/gitlab/test.go index ca65acf0f..9298822bb 100644 --- a/test/pkg/gitlab/test.go +++ b/test/pkg/gitlab/test.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" - ghlib "github.com/xanzy/go-gitlab" + ghlib "gitlab.com/gitlab-org/api/client-go" ) func CreateMR(client *ghlib.Client, pid int, sourceBranch, targetBranch, title string) (int, error) { diff --git a/vendor/github.com/xanzy/go-gitlab/README.md b/vendor/github.com/xanzy/go-gitlab/README.md deleted file mode 100644 index fa5a049a3..000000000 --- a/vendor/github.com/xanzy/go-gitlab/README.md +++ /dev/null @@ -1,208 +0,0 @@ -# go-gitlab - -A GitLab API client enabling Go programs to interact with GitLab in a simple and uniform way - -[![Build Status](https://github.com/xanzy/go-gitlab/workflows/Lint%20and%20Test/badge.svg)](https://github.com/xanzy/go-gitlab/actions?workflow=Lint%20and%20Test) -[![Sourcegraph](https://sourcegraph.com/github.com/xanzy/go-gitlab/-/badge.svg)](https://sourcegraph.com/github.com/xanzy/go-gitlab?badge) -[![GoDoc](https://godoc.org/github.com/xanzy/go-gitlab?status.svg)](https://godoc.org/github.com/xanzy/go-gitlab) -[![Go Report Card](https://goreportcard.com/badge/github.com/xanzy/go-gitlab)](https://goreportcard.com/report/github.com/xanzy/go-gitlab) -[![Coverage](https://github.com/xanzy/go-gitlab/wiki/coverage.svg)](https://raw.githack.com/wiki/xanzy/go-gitlab/coverage.html) - -## NOTE - -Release v0.6.0 (released on 25-08-2017) no longer supports the older V3 GitLab API. If -you need V3 support, please use the `f-api-v3` branch. This release contains some backwards -incompatible changes that were needed to fully support the V4 GitLab API. - -## Coverage - -This API client package covers most of the existing GitLab API calls and is updated regularly -to add new and/or missing endpoints. Currently, the following services are supported: - -- [x] Applications -- [x] Award Emojis -- [x] Branches -- [x] Broadcast Messages -- [x] Commits -- [x] Container Registry -- [x] Custom Attributes -- [x] Deploy Keys -- [x] Deployments -- [x] Discussions (threaded comments) -- [x] Environments -- [x] Epic Issues -- [x] Epics -- [x] Error Tracking -- [x] Events -- [x] Feature Flags -- [x] Geo Nodes -- [x] Generic Packages -- [x] GitLab CI Config Templates -- [x] Gitignores Templates -- [x] Group Access Requests -- [x] Group Issue Boards -- [x] Group Members -- [x] Group Milestones -- [x] Group Wikis -- [x] Group-Level Variables -- [x] Groups -- [x] Instance Clusters -- [x] Invites -- [x] Issue Boards -- [x] Issues -- [x] Jobs -- [x] Keys -- [x] Labels -- [x] License -- [x] Markdown -- [x] Merge Request Approvals -- [x] Merge Requests -- [x] Namespaces -- [x] Notes (comments) -- [x] Notification Settings -- [x] Open Source License Templates -- [x] Packages -- [x] Pages -- [x] Pages Domains -- [x] Personal Access Tokens -- [x] Pipeline Schedules -- [x] Pipeline Triggers -- [x] Pipelines -- [x] Plan limits -- [x] Project Access Requests -- [x] Project Badges -- [x] Project Clusters -- [x] Project Import/export -- [x] Project Members -- [x] Project Milestones -- [x] Project Repository Storage Moves -- [x] Project Snippets -- [x] Project Vulnerabilities -- [x] Project-Level Variables -- [x] Projects (including setting Webhooks) -- [x] Protected Branches -- [x] Protected Environments -- [x] Protected Tags -- [x] Repositories -- [x] Repository Files -- [x] Repository Submodules -- [x] Runners -- [x] Search -- [x] Services -- [x] Settings -- [x] Sidekiq Metrics -- [x] System Hooks -- [x] Tags -- [x] Todos -- [x] Topics -- [x] Users -- [x] Validate CI Configuration -- [x] Version -- [x] Wikis - -## Usage - -```go -import "github.com/xanzy/go-gitlab" -``` - -Construct a new GitLab client, then use the various services on the client to -access different parts of the GitLab API. For example, to list all -users: - -```go -git, err := gitlab.NewClient("yourtokengoeshere") -if err != nil { - log.Fatalf("Failed to create client: %v", err) -} -users, _, err := git.Users.ListUsers(&gitlab.ListUsersOptions{}) -``` - -There are a few `With...` option functions that can be used to customize -the API client. For example, to set a custom base URL: - -```go -git, err := gitlab.NewClient("yourtokengoeshere", gitlab.WithBaseURL("https://git.mydomain.com/api/v4")) -if err != nil { - log.Fatalf("Failed to create client: %v", err) -} -users, _, err := git.Users.ListUsers(&gitlab.ListUsersOptions{}) -``` - -Some API methods have optional parameters that can be passed. For example, -to list all projects for user "svanharmelen": - -```go -git := gitlab.NewClient("yourtokengoeshere") -opt := &gitlab.ListProjectsOptions{Search: gitlab.Ptr("svanharmelen")} -projects, _, err := git.Projects.ListProjects(opt) -``` - -### Examples - -The [examples](https://github.com/xanzy/go-gitlab/tree/master/examples) directory -contains a couple for clear examples, of which one is partially listed here as well: - -```go -package main - -import ( - "log" - - "github.com/xanzy/go-gitlab" -) - -func main() { - git, err := gitlab.NewClient("yourtokengoeshere") - if err != nil { - log.Fatalf("Failed to create client: %v", err) - } - - // Create new project - p := &gitlab.CreateProjectOptions{ - Name: gitlab.Ptr("My Project"), - Description: gitlab.Ptr("Just a test project to play with"), - MergeRequestsAccessLevel: gitlab.Ptr(gitlab.EnabledAccessControl), - SnippetsAccessLevel: gitlab.Ptr(gitlab.EnabledAccessControl), - Visibility: gitlab.Ptr(gitlab.PublicVisibility), - } - project, _, err := git.Projects.CreateProject(p) - if err != nil { - log.Fatal(err) - } - - // Add a new snippet - s := &gitlab.CreateProjectSnippetOptions{ - Title: gitlab.Ptr("Dummy Snippet"), - FileName: gitlab.Ptr("snippet.go"), - Content: gitlab.Ptr("package main...."), - Visibility: gitlab.Ptr(gitlab.PublicVisibility), - } - _, _, err = git.ProjectSnippets.CreateSnippet(project.ID, s) - if err != nil { - log.Fatal(err) - } -} -``` - -For complete usage of go-gitlab, see the full [package docs](https://godoc.org/github.com/xanzy/go-gitlab). - -## ToDo - -- The biggest thing this package still needs is tests :disappointed: - -## Issues - -- If you have an issue: report it on the [issue tracker](https://github.com/xanzy/go-gitlab/issues) - -## Author - -Sander van Harmelen () - -## Contributing - -Contributions are always welcome. For more information, check out the [contributing guide](https://github.com/xanzy/go-gitlab/blob/master/CONTRIBUTING.md) - -## License - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/vendor/github.com/xanzy/go-gitlab/.gitignore b/vendor/gitlab.com/gitlab-org/api/client-go/.gitignore similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/.gitignore rename to vendor/gitlab.com/gitlab-org/api/client-go/.gitignore diff --git a/vendor/gitlab.com/gitlab-org/api/client-go/.gitlab-ci.yml b/vendor/gitlab.com/gitlab-org/api/client-go/.gitlab-ci.yml new file mode 100644 index 000000000..0fd8c495c --- /dev/null +++ b/vendor/gitlab.com/gitlab-org/api/client-go/.gitlab-ci.yml @@ -0,0 +1,125 @@ +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_PIPELINE_SOURCE == "schedule" + - if: $CI_COMMIT_TAG + - if: $CI_COMMIT_REF_PROTECTED == "true" + +stages: + - lint + - test + - deploy + +.go-versions: + parallel: + matrix: + - GOLANG_IMAGE_VERSION: + - '1.22' + - '1.23' + +.go:base: + tags: + - saas-linux-large-amd64 + +# From: https://docs.gitlab.com/ee/ci/caching/#cache-go-dependencies +.go-cache: + extends: + - .go:base + variables: + GOPATH: $CI_PROJECT_DIR/.go + GOLANGCI_LINT_CACHE: $CI_PROJECT_DIR/.golangci-lint + before_script: + - mkdir -p "${GOPATH}" "${GOLANGCI_LINT_CACHE}" + cache: + paths: + - $GOPATH/pkg/mod/ + - $GOLANGCI_LINT_CACHE/ + key: + files: + - go.sum + +golangci-lint: + extends: + - .go-cache + stage: lint + needs: [] + variables: + REPORT_FILENAME: 'gl-code-quality-report.json' + image: golangci/golangci-lint:v1.62.0 + script: + - golangci-lint run --print-issued-lines=false --out-format code-climate:$REPORT_FILENAME,line-number + artifacts: + reports: + codequality: $REPORT_FILENAME + paths: [$REPORT_FILENAME] + when: always + +tests:unit: + extends: + - .go-cache + - .go-versions + stage: test + needs: [] + image: golang:$GOLANG_IMAGE_VERSION + variables: + # configure tooling versions + GOTESTSUM_VERSION: 'v1.12.0' + GOCOVER_COBERTURA_VERSION: 'v1.2.1-0.20240107185409-0818f3538137' + + # configure artifact files + JUNIT_FILENAME: tests.xml + COVERPROFILE_FILENAME: coverage.out + COVERPROFILE_XML_FILENAME: coverage.xml + script: + - go run gotest.tools/gotestsum@${GOTESTSUM_VERSION} --format=standard-quiet --junitfile=$JUNIT_FILENAME -- -race -coverprofile=$COVERPROFILE_FILENAME -covermode=atomic ./... + - go run github.com/boumenot/gocover-cobertura@${GOCOVER_COBERTURA_VERSION} < $COVERPROFILE_FILENAME > $COVERPROFILE_XML_FILENAME + - go tool cover -func $COVERPROFILE_FILENAME + coverage: '/total:.+\(statements\).+\d+\.\d+/' + artifacts: + paths: + - $JUNIT_FILENAME + - $COVERPROFILE_XML_FILENAME + reports: + junit: $JUNIT_FILENAME + coverage_report: + path: $COVERPROFILE_XML_FILENAME + coverage_format: cobertura + when: always + +generate-release-notes: + stage: deploy + needs: [] + image: alpine:3.20.3 + before_script: + - apk add --update jq curl git + script: + - | + if [ -z "$CI_COMMIT_TAG" ]; then + last_stable_version_sha="$(git tag | grep -E '^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$' | sort -Vr | head -n1)" + version="${last_stable_version_sha}+${CI_COMMIT_SHA}" + else + version="$CI_COMMIT_TAG" + fi + urlencoded_version="$(jq -rn --arg x "${version}" '$x|@uri')" + - echo "Generating release notes for ${version} (urlencoded=${urlencoded_version}) ..." + - 'curl --fail-with-body --header "JOB-TOKEN: $CI_JOB_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/repository/changelog?version=${urlencoded_version}" | jq -r .notes > release-notes.md' + - cat release-notes.md + artifacts: + paths: + - release-notes.md + +release: + stage: deploy + rules: + - if: $CI_COMMIT_TAG + needs: + - job: generate-release-notes + artifacts: true + image: registry.gitlab.com/gitlab-org/release-cli:latest + script: + - echo "Create release for $CI_COMMIT_TAG" + release: + tag_name: '$CI_COMMIT_TAG' + tag_message: 'Version $CI_COMMIT_TAG' + name: '$CI_COMMIT_TAG' + description: release-notes.md diff --git a/vendor/github.com/xanzy/go-gitlab/.golangci.yml b/vendor/gitlab.com/gitlab-org/api/client-go/.golangci.yml similarity index 92% rename from vendor/github.com/xanzy/go-gitlab/.golangci.yml rename to vendor/gitlab.com/gitlab-org/api/client-go/.golangci.yml index 7c05feeef..f9c98225e 100644 --- a/vendor/github.com/xanzy/go-gitlab/.golangci.yml +++ b/vendor/gitlab.com/gitlab-org/api/client-go/.golangci.yml @@ -19,6 +19,10 @@ linters-settings: locale: US ignore-words: - noteable + revive: + enable-all-rules: false + rules: + - name: deep-exit linters: enable: @@ -30,10 +34,10 @@ linters: - gosimple - govet - ineffassign - - megacheck - misspell - nakedret - nolintlint + - revive - staticcheck - typecheck - unconvert diff --git a/vendor/gitlab.com/gitlab-org/api/client-go/.tool-versions b/vendor/gitlab.com/gitlab-org/api/client-go/.tool-versions new file mode 100644 index 000000000..e0217baa9 --- /dev/null +++ b/vendor/gitlab.com/gitlab-org/api/client-go/.tool-versions @@ -0,0 +1 @@ +golang 1.23.3 diff --git a/vendor/github.com/xanzy/go-gitlab/CONTRIBUTING.md b/vendor/gitlab.com/gitlab-org/api/client-go/CONTRIBUTING.md similarity index 63% rename from vendor/github.com/xanzy/go-gitlab/CONTRIBUTING.md rename to vendor/gitlab.com/gitlab-org/api/client-go/CONTRIBUTING.md index 32bd82274..757b71463 100644 --- a/vendor/github.com/xanzy/go-gitlab/CONTRIBUTING.md +++ b/vendor/gitlab.com/gitlab-org/api/client-go/CONTRIBUTING.md @@ -4,15 +4,16 @@ We want to make contributing to this project as easy as possible. ## Reporting Issues -If you have an issue, please report it on the [issue tracker](https://github.com/xanzy/go-gitlab/issues). +If you have an issue, please report it on the +[issue tracker](https://gitlab.com/gitlab-org/api/client-go/-/issues). -When you are up for writing a PR to solve the issue you encountered, it's not -needed to first open a separate issue. In that case only opening a PR with a +When you are up for writing a MR to solve the issue you encountered, it's not +needed to first open a separate issue. In that case only opening a MR with a description of the issue you are trying to solve is just fine. ## Contributing Code -Pull requests are always welcome. When in doubt if your contribution fits within +Merge requests are always welcome. When in doubt if your contribution fits within the rest of the project, feel free to first open an issue to discuss your idea. This is not needed when fixing a bug or adding an enhancement, as long as the @@ -26,20 +27,20 @@ We try to follow the Go best practices, where it makes sense, and use As a general rule of thumb we prefer to keep line width for comments below 80 chars and for code (where possible and sensible) below 100 chars. -Before making a PR, please look at the rest this package and try to make sure +Before making a MR, please look at the rest this package and try to make sure your contribution is consistent with the rest of the coding style. -New struct field or methods should be placed (as much as possible) in the same +New `struct` fields or methods should be placed (as much as possible) in the same order as the ordering used in the public API docs. The idea is that this makes it easier to find things. -### Setting up your local development environment to Contribute to `go-gitlab` +### Setting up your local development environment to contribute -1. [Fork](https://github.com/xanzy/go-gitlab/fork), then clone the repository. +1. [Fork](https://gitlab.com/gitlab-org/api/client-go), then clone the repository. ```sh - git clone https://github.com//go-gitlab.git + git clone https://gitlab.com//client-go.git # or via ssh - git clone git@github.com:/go-gitlab.git + git clone git@gitlab.com:/client-go.git ``` 1. Install dependencies: ```sh @@ -50,4 +51,4 @@ easier to find things. ```sh make test && make fmt ``` -1. Open up your pull request +1. Open up your merge request diff --git a/vendor/github.com/xanzy/go-gitlab/LICENSE b/vendor/gitlab.com/gitlab-org/api/client-go/LICENSE similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/LICENSE rename to vendor/gitlab.com/gitlab-org/api/client-go/LICENSE diff --git a/vendor/github.com/xanzy/go-gitlab/Makefile b/vendor/gitlab.com/gitlab-org/api/client-go/Makefile similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/Makefile rename to vendor/gitlab.com/gitlab-org/api/client-go/Makefile diff --git a/vendor/gitlab.com/gitlab-org/api/client-go/README.md b/vendor/gitlab.com/gitlab-org/api/client-go/README.md new file mode 100644 index 000000000..9459f60a4 --- /dev/null +++ b/vendor/gitlab.com/gitlab-org/api/client-go/README.md @@ -0,0 +1,113 @@ +# GitLab client-go (former `github.com/xanzy/go-gitlab`) + +A GitLab API client enabling Go programs to interact with GitLab in a simple and uniform way. + +## Usage + +```go +import "gitlab.com/gitlab-org/api/client-go" +``` + +Construct a new GitLab client, then use the various services on the client to +access different parts of the GitLab API. For example, to list all +users: + +```go +git, err := gitlab.NewClient("yourtokengoeshere") +if err != nil { + log.Fatalf("Failed to create client: %v", err) +} +users, _, err := git.Users.ListUsers(&gitlab.ListUsersOptions{}) +``` + +There are a few `With...` option functions that can be used to customize +the API client. For example, to set a custom base URL: + +```go +git, err := gitlab.NewClient("yourtokengoeshere", gitlab.WithBaseURL("https://git.mydomain.com/api/v4")) +if err != nil { + log.Fatalf("Failed to create client: %v", err) +} +users, _, err := git.Users.ListUsers(&gitlab.ListUsersOptions{}) +``` + +Some API methods have optional parameters that can be passed. For example, +to list all projects for user "svanharmelen": + +```go +git := gitlab.NewClient("yourtokengoeshere") +opt := &gitlab.ListProjectsOptions{Search: gitlab.Ptr("svanharmelen")} +projects, _, err := git.Projects.ListProjects(opt) +``` + +### Examples + +The [examples](https://gitlab.com/gitlab-org/api/client-go/tree/master/examples) directory +contains a couple for clear examples, of which one is partially listed here as well: + +```go +package main + +import ( + "log" + + "gitlab.com/gitlab-org/api/client-go" +) + +func main() { + git, err := gitlab.NewClient("yourtokengoeshere") + if err != nil { + log.Fatalf("Failed to create client: %v", err) + } + + // Create new project + p := &gitlab.CreateProjectOptions{ + Name: gitlab.Ptr("My Project"), + Description: gitlab.Ptr("Just a test project to play with"), + MergeRequestsAccessLevel: gitlab.Ptr(gitlab.EnabledAccessControl), + SnippetsAccessLevel: gitlab.Ptr(gitlab.EnabledAccessControl), + Visibility: gitlab.Ptr(gitlab.PublicVisibility), + } + project, _, err := git.Projects.CreateProject(p) + if err != nil { + log.Fatal(err) + } + + // Add a new snippet + s := &gitlab.CreateProjectSnippetOptions{ + Title: gitlab.Ptr("Dummy Snippet"), + FileName: gitlab.Ptr("snippet.go"), + Content: gitlab.Ptr("package main...."), + Visibility: gitlab.Ptr(gitlab.PublicVisibility), + } + _, _, err = git.ProjectSnippets.CreateSnippet(project.ID, s) + if err != nil { + log.Fatal(err) + } +} +``` + +For complete usage of go-gitlab, see the full [package docs](https://godoc.org/gitlab.com/gitlab-org/api/client-go). + +## Contributing + +Contributions are always welcome. For more information, check out the +[contributing guide](https://gitlab.com/gitlab-org/api/client-go/-/blob/main/CONTRIBUTING.md). + +## Maintenance + +This is a community maintained project. If you have a paid GitLab subscription, +please note that this project is not packaged as a part of GitLab, and falls outside +of the scope of support. + +For more information, see GitLab's +[Statement of Support](https://about.gitlab.com/support/statement-of-support.html). +Please fill out an issue in this projects issue tracker and someone from the community +will respond as soon as they are available to help you. + +### Known GitLab Projects using this package + +- [GitLab Terraform Provider](https://gitlab.com/gitlab-org/terraform-provider-gitlab) + maintained by the community with support from ~"group::environments" +- [GitLab CLI (`glab`)](https://gitlab.com/gitlab-org/cli) + maintained by ~"group::code review" diff --git a/vendor/github.com/xanzy/go-gitlab/access_requests.go b/vendor/gitlab.com/gitlab-org/api/client-go/access_requests.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/access_requests.go rename to vendor/gitlab.com/gitlab-org/api/client-go/access_requests.go diff --git a/vendor/github.com/xanzy/go-gitlab/appearance.go b/vendor/gitlab.com/gitlab-org/api/client-go/appearance.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/appearance.go rename to vendor/gitlab.com/gitlab-org/api/client-go/appearance.go diff --git a/vendor/github.com/xanzy/go-gitlab/applications.go b/vendor/gitlab.com/gitlab-org/api/client-go/applications.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/applications.go rename to vendor/gitlab.com/gitlab-org/api/client-go/applications.go diff --git a/vendor/github.com/xanzy/go-gitlab/audit_events.go b/vendor/gitlab.com/gitlab-org/api/client-go/audit_events.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/audit_events.go rename to vendor/gitlab.com/gitlab-org/api/client-go/audit_events.go diff --git a/vendor/github.com/xanzy/go-gitlab/avatar.go b/vendor/gitlab.com/gitlab-org/api/client-go/avatar.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/avatar.go rename to vendor/gitlab.com/gitlab-org/api/client-go/avatar.go diff --git a/vendor/github.com/xanzy/go-gitlab/award_emojis.go b/vendor/gitlab.com/gitlab-org/api/client-go/award_emojis.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/award_emojis.go rename to vendor/gitlab.com/gitlab-org/api/client-go/award_emojis.go diff --git a/vendor/github.com/xanzy/go-gitlab/boards.go b/vendor/gitlab.com/gitlab-org/api/client-go/boards.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/boards.go rename to vendor/gitlab.com/gitlab-org/api/client-go/boards.go diff --git a/vendor/github.com/xanzy/go-gitlab/branches.go b/vendor/gitlab.com/gitlab-org/api/client-go/branches.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/branches.go rename to vendor/gitlab.com/gitlab-org/api/client-go/branches.go diff --git a/vendor/github.com/xanzy/go-gitlab/broadcast_messages.go b/vendor/gitlab.com/gitlab-org/api/client-go/broadcast_messages.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/broadcast_messages.go rename to vendor/gitlab.com/gitlab-org/api/client-go/broadcast_messages.go diff --git a/vendor/github.com/xanzy/go-gitlab/ci_yml_templates.go b/vendor/gitlab.com/gitlab-org/api/client-go/ci_yml_templates.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/ci_yml_templates.go rename to vendor/gitlab.com/gitlab-org/api/client-go/ci_yml_templates.go diff --git a/vendor/github.com/xanzy/go-gitlab/client_options.go b/vendor/gitlab.com/gitlab-org/api/client-go/client_options.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/client_options.go rename to vendor/gitlab.com/gitlab-org/api/client-go/client_options.go diff --git a/vendor/github.com/xanzy/go-gitlab/cluster_agents.go b/vendor/gitlab.com/gitlab-org/api/client-go/cluster_agents.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/cluster_agents.go rename to vendor/gitlab.com/gitlab-org/api/client-go/cluster_agents.go diff --git a/vendor/github.com/xanzy/go-gitlab/commits.go b/vendor/gitlab.com/gitlab-org/api/client-go/commits.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/commits.go rename to vendor/gitlab.com/gitlab-org/api/client-go/commits.go diff --git a/vendor/github.com/xanzy/go-gitlab/container_registry.go b/vendor/gitlab.com/gitlab-org/api/client-go/container_registry.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/container_registry.go rename to vendor/gitlab.com/gitlab-org/api/client-go/container_registry.go diff --git a/vendor/github.com/xanzy/go-gitlab/custom_attributes.go b/vendor/gitlab.com/gitlab-org/api/client-go/custom_attributes.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/custom_attributes.go rename to vendor/gitlab.com/gitlab-org/api/client-go/custom_attributes.go diff --git a/vendor/gitlab.com/gitlab-org/api/client-go/dependency_list_export.go b/vendor/gitlab.com/gitlab-org/api/client-go/dependency_list_export.go new file mode 100644 index 000000000..c1e786e8d --- /dev/null +++ b/vendor/gitlab.com/gitlab-org/api/client-go/dependency_list_export.go @@ -0,0 +1,122 @@ +package gitlab + +import ( + "bytes" + "fmt" + "io" + "net/http" +) + +type DependencyListExportService struct { + client *Client +} + +// CreateDependencyListExportOptions represents the available CreateDependencyListExport() +// options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/dependency_list_export.html#create-a-pipeline-level-dependency-list-export +type CreateDependencyListExportOptions struct { + ExportType *string `url:"export_type" json:"export_type"` +} + +// DependencyListExport represents a request for a GitLab project's dependency list. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/dependency_list_export.html#create-a-pipeline-level-dependency-list-export +type DependencyListExport struct { + ID int `json:"id"` + HasFinished bool `json:"has_finished"` + Self string `json:"self"` + Download string `json:"download"` +} + +const defaultExportType = "sbom" + +// CreateDependencyListExport creates a new CycloneDX JSON export for all the project dependencies +// detected in a pipeline. +// +// If an authenticated user does not have permission to read_dependency, this request returns a 403 +// Forbidden status code. +// +// SBOM exports can be only accessed by the export’s author. +// +// GitLab docs: +// https://docs.gitlab.com/ee/api/dependency_list_export.html#create-a-pipeline-level-dependency-list-export +func (s *DependencyListExportService) CreateDependencyListExport(pipelineID int, opt *CreateDependencyListExportOptions, options ...RequestOptionFunc) (*DependencyListExport, *Response, error) { + // POST /pipelines/:id/dependency_list_exports + createExportPath := fmt.Sprintf("pipelines/%d/dependency_list_exports", pipelineID) + + if opt == nil { + opt = &CreateDependencyListExportOptions{} + } + if opt.ExportType == nil { + opt.ExportType = Ptr(defaultExportType) + } + + req, err := s.client.NewRequest(http.MethodPost, createExportPath, opt, options) + if err != nil { + return nil, nil, err + } + + export := new(DependencyListExport) + resp, err := s.client.Do(req, &export) + if err != nil { + return nil, resp, err + } + + return export, resp, nil +} + +// GetDependencyListExport gets metadata about a single dependency list export. +// +// GitLab docs: +// https://docs.gitlab.com/ee/api/dependency_list_export.html#get-single-dependency-list-export +func (s *DependencyListExportService) GetDependencyListExport(id int, options ...RequestOptionFunc) (*DependencyListExport, *Response, error) { + // GET /dependency_list_exports/:id + getExportPath := fmt.Sprintf("dependency_list_exports/%d", id) + + req, err := s.client.NewRequest(http.MethodGet, getExportPath, nil, options) + if err != nil { + return nil, nil, err + } + + export := new(DependencyListExport) + resp, err := s.client.Do(req, &export) + if err != nil { + return nil, resp, err + } + + return export, resp, nil +} + +// DownloadDependencyListExport downloads a single dependency list export. +// +// The github.com/CycloneDX/cyclonedx-go package can be used to parse the data from the returned io.Reader. +// +// sbom := new(cdx.BOM) +// decoder := cdx.NewBOMDecoder(reader, cdx.BOMFileFormatJSON) +// +// if err = decoder.Decode(sbom); err != nil { +// panic(err) +// } +// +// GitLab docs: +// https://docs.gitlab.com/ee/api/dependency_list_export.html#download-dependency-list-export +func (s *DependencyListExportService) DownloadDependencyListExport(id int, options ...RequestOptionFunc) (io.Reader, *Response, error) { + // GET /dependency_list_exports/:id/download + downloadExportPath := fmt.Sprintf("dependency_list_exports/%d/download", id) + + req, err := s.client.NewRequest(http.MethodGet, downloadExportPath, nil, options) + if err != nil { + return nil, nil, err + } + + var sbomBuffer bytes.Buffer + resp, err := s.client.Do(req, &sbomBuffer) + if err != nil { + return nil, resp, err + } + + return &sbomBuffer, resp, nil +} diff --git a/vendor/github.com/xanzy/go-gitlab/deploy_keys.go b/vendor/gitlab.com/gitlab-org/api/client-go/deploy_keys.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/deploy_keys.go rename to vendor/gitlab.com/gitlab-org/api/client-go/deploy_keys.go diff --git a/vendor/github.com/xanzy/go-gitlab/deploy_tokens.go b/vendor/gitlab.com/gitlab-org/api/client-go/deploy_tokens.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/deploy_tokens.go rename to vendor/gitlab.com/gitlab-org/api/client-go/deploy_tokens.go diff --git a/vendor/github.com/xanzy/go-gitlab/deployments.go b/vendor/gitlab.com/gitlab-org/api/client-go/deployments.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/deployments.go rename to vendor/gitlab.com/gitlab-org/api/client-go/deployments.go diff --git a/vendor/github.com/xanzy/go-gitlab/deployments_merge_requests.go b/vendor/gitlab.com/gitlab-org/api/client-go/deployments_merge_requests.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/deployments_merge_requests.go rename to vendor/gitlab.com/gitlab-org/api/client-go/deployments_merge_requests.go diff --git a/vendor/github.com/xanzy/go-gitlab/discussions.go b/vendor/gitlab.com/gitlab-org/api/client-go/discussions.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/discussions.go rename to vendor/gitlab.com/gitlab-org/api/client-go/discussions.go diff --git a/vendor/github.com/xanzy/go-gitlab/dockerfile_templates.go b/vendor/gitlab.com/gitlab-org/api/client-go/dockerfile_templates.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/dockerfile_templates.go rename to vendor/gitlab.com/gitlab-org/api/client-go/dockerfile_templates.go diff --git a/vendor/github.com/xanzy/go-gitlab/dora_metrics.go b/vendor/gitlab.com/gitlab-org/api/client-go/dora_metrics.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/dora_metrics.go rename to vendor/gitlab.com/gitlab-org/api/client-go/dora_metrics.go diff --git a/vendor/github.com/xanzy/go-gitlab/draft_notes.go b/vendor/gitlab.com/gitlab-org/api/client-go/draft_notes.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/draft_notes.go rename to vendor/gitlab.com/gitlab-org/api/client-go/draft_notes.go diff --git a/vendor/github.com/xanzy/go-gitlab/environments.go b/vendor/gitlab.com/gitlab-org/api/client-go/environments.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/environments.go rename to vendor/gitlab.com/gitlab-org/api/client-go/environments.go diff --git a/vendor/github.com/xanzy/go-gitlab/epic_issues.go b/vendor/gitlab.com/gitlab-org/api/client-go/epic_issues.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/epic_issues.go rename to vendor/gitlab.com/gitlab-org/api/client-go/epic_issues.go diff --git a/vendor/github.com/xanzy/go-gitlab/epics.go b/vendor/gitlab.com/gitlab-org/api/client-go/epics.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/epics.go rename to vendor/gitlab.com/gitlab-org/api/client-go/epics.go diff --git a/vendor/github.com/xanzy/go-gitlab/error_tracking.go b/vendor/gitlab.com/gitlab-org/api/client-go/error_tracking.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/error_tracking.go rename to vendor/gitlab.com/gitlab-org/api/client-go/error_tracking.go diff --git a/vendor/github.com/xanzy/go-gitlab/event_parsing.go b/vendor/gitlab.com/gitlab-org/api/client-go/event_parsing.go similarity index 98% rename from vendor/github.com/xanzy/go-gitlab/event_parsing.go rename to vendor/gitlab.com/gitlab-org/api/client-go/event_parsing.go index 0f474211d..eb81fa05c 100644 --- a/vendor/github.com/xanzy/go-gitlab/event_parsing.go +++ b/vendor/gitlab.com/gitlab-org/api/client-go/event_parsing.go @@ -91,7 +91,7 @@ func HookEventType(r *http.Request) EventType { // Example usage: // // func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { -// payload, err := ioutil.ReadAll(r.Body) +// payload, err := io.ReadAll(r.Body) // if err != nil { ... } // event, err := gitlab.ParseHook(gitlab.HookEventType(r), payload) // if err != nil { ... } @@ -119,7 +119,7 @@ func ParseHook(eventType EventType, payload []byte) (event interface{}, err erro // Example usage: // // func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { -// payload, err := ioutil.ReadAll(r.Body) +// payload, err := io.ReadAll(r.Body) // if err != nil { ... } // event, err := gitlab.ParseSystemhook(payload) // if err != nil { ... } @@ -203,7 +203,7 @@ func WebhookEventType(r *http.Request) EventType { // Example usage: // // func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { -// payload, err := ioutil.ReadAll(r.Body) +// payload, err := io.ReadAll(r.Body) // if err != nil { ... } // event, err := gitlab.ParseWebhook(gitlab.HookEventType(r), payload) // if err != nil { ... } diff --git a/vendor/github.com/xanzy/go-gitlab/event_systemhook_types.go b/vendor/gitlab.com/gitlab-org/api/client-go/event_systemhook_types.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/event_systemhook_types.go rename to vendor/gitlab.com/gitlab-org/api/client-go/event_systemhook_types.go diff --git a/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go b/vendor/gitlab.com/gitlab-org/api/client-go/event_webhook_types.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/event_webhook_types.go rename to vendor/gitlab.com/gitlab-org/api/client-go/event_webhook_types.go diff --git a/vendor/github.com/xanzy/go-gitlab/events.go b/vendor/gitlab.com/gitlab-org/api/client-go/events.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/events.go rename to vendor/gitlab.com/gitlab-org/api/client-go/events.go diff --git a/vendor/github.com/xanzy/go-gitlab/external_status_checks.go b/vendor/gitlab.com/gitlab-org/api/client-go/external_status_checks.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/external_status_checks.go rename to vendor/gitlab.com/gitlab-org/api/client-go/external_status_checks.go diff --git a/vendor/github.com/xanzy/go-gitlab/feature_flags.go b/vendor/gitlab.com/gitlab-org/api/client-go/feature_flags.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/feature_flags.go rename to vendor/gitlab.com/gitlab-org/api/client-go/feature_flags.go diff --git a/vendor/github.com/xanzy/go-gitlab/freeze_periods.go b/vendor/gitlab.com/gitlab-org/api/client-go/freeze_periods.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/freeze_periods.go rename to vendor/gitlab.com/gitlab-org/api/client-go/freeze_periods.go diff --git a/vendor/github.com/xanzy/go-gitlab/generic_packages.go b/vendor/gitlab.com/gitlab-org/api/client-go/generic_packages.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/generic_packages.go rename to vendor/gitlab.com/gitlab-org/api/client-go/generic_packages.go diff --git a/vendor/github.com/xanzy/go-gitlab/geo_nodes.go b/vendor/gitlab.com/gitlab-org/api/client-go/geo_nodes.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/geo_nodes.go rename to vendor/gitlab.com/gitlab-org/api/client-go/geo_nodes.go diff --git a/vendor/github.com/xanzy/go-gitlab/gitignore_templates.go b/vendor/gitlab.com/gitlab-org/api/client-go/gitignore_templates.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/gitignore_templates.go rename to vendor/gitlab.com/gitlab-org/api/client-go/gitignore_templates.go diff --git a/vendor/github.com/xanzy/go-gitlab/gitlab.go b/vendor/gitlab.com/gitlab-org/api/client-go/gitlab.go similarity index 99% rename from vendor/github.com/xanzy/go-gitlab/gitlab.go rename to vendor/gitlab.com/gitlab-org/api/client-go/gitlab.go index 19ed3eadb..594909e50 100644 --- a/vendor/github.com/xanzy/go-gitlab/gitlab.go +++ b/vendor/gitlab.com/gitlab-org/api/client-go/gitlab.go @@ -122,6 +122,7 @@ type Client struct { Commits *CommitsService ContainerRegistry *ContainerRegistryService CustomAttribute *CustomAttributesService + DependencyListExport *DependencyListExportService DeployKeys *DeployKeysService DeployTokens *DeployTokensService DeploymentMergeRequests *DeploymentMergeRequestsService @@ -195,6 +196,7 @@ type Client struct { ProjectFeatureFlags *ProjectFeatureFlagService ProjectImportExport *ProjectImportExportService ProjectIterations *ProjectIterationsService + ProjectMarkdownUploads *ProjectMarkdownUploadsService ProjectMembers *ProjectMembersService ProjectMirrors *ProjectMirrorService ProjectRepositoryStorageMove *ProjectRepositoryStorageMoveService @@ -360,6 +362,7 @@ func newClient(options ...ClientOptionFunc) (*Client, error) { c.Commits = &CommitsService{client: c} c.ContainerRegistry = &ContainerRegistryService{client: c} c.CustomAttribute = &CustomAttributesService{client: c} + c.DependencyListExport = &DependencyListExportService{client: c} c.DeployKeys = &DeployKeysService{client: c} c.DeployTokens = &DeployTokensService{client: c} c.DeploymentMergeRequests = &DeploymentMergeRequestsService{client: c} @@ -433,6 +436,7 @@ func newClient(options ...ClientOptionFunc) (*Client, error) { c.ProjectFeatureFlags = &ProjectFeatureFlagService{client: c} c.ProjectImportExport = &ProjectImportExportService{client: c} c.ProjectIterations = &ProjectIterationsService{client: c} + c.ProjectMarkdownUploads = &ProjectMarkdownUploadsService{client: c} c.ProjectMembers = &ProjectMembersService{client: c} c.ProjectMirrors = &ProjectMirrorService{client: c} c.ProjectRepositoryStorageMove = &ProjectRepositoryStorageMoveService{client: c} diff --git a/vendor/github.com/xanzy/go-gitlab/group_access_tokens.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_access_tokens.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_access_tokens.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_access_tokens.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_badges.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_badges.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_badges.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_badges.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_boards.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_boards.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_boards.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_boards.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_clusters.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_clusters.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_clusters.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_clusters.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_epic_boards.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_epic_boards.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_epic_boards.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_epic_boards.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_hooks.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_hooks.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_hooks.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_hooks.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_import_export.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_import_export.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_import_export.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_import_export.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_iterations.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_iterations.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_iterations.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_iterations.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_labels.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_labels.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_labels.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_labels.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_members.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_members.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_members.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_members.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_milestones.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_milestones.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_milestones.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_milestones.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_protected_environments.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_protected_environments.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_protected_environments.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_protected_environments.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_repository_storage_move.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_repository_storage_move.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_repository_storage_move.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_repository_storage_move.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_serviceaccounts.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_serviceaccounts.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_serviceaccounts.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_serviceaccounts.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_ssh_certificates.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_ssh_certificates.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_ssh_certificates.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_ssh_certificates.go diff --git a/vendor/github.com/xanzy/go-gitlab/group_variables.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_variables.go similarity index 98% rename from vendor/github.com/xanzy/go-gitlab/group_variables.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_variables.go index 69fe44592..7978e594e 100644 --- a/vendor/github.com/xanzy/go-gitlab/group_variables.go +++ b/vendor/gitlab.com/gitlab-org/api/client-go/group_variables.go @@ -41,6 +41,7 @@ type GroupVariable struct { VariableType VariableTypeValue `json:"variable_type"` Protected bool `json:"protected"` Masked bool `json:"masked"` + Hidden bool `json:"hidden"` Raw bool `json:"raw"` EnvironmentScope string `json:"environment_scope"` Description string `json:"description"` @@ -127,6 +128,7 @@ type CreateGroupVariableOptions struct { Description *string `url:"description,omitempty" json:"description,omitempty"` EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,omitempty"` Masked *bool `url:"masked,omitempty" json:"masked,omitempty"` + MaskedAndHidden *bool `url:"masked_and_hidden,omitempty" json:"hidden,omitempty"` Protected *bool `url:"protected,omitempty" json:"protected,omitempty"` Raw *bool `url:"raw,omitempty" json:"raw,omitempty"` VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` diff --git a/vendor/github.com/xanzy/go-gitlab/group_wikis.go b/vendor/gitlab.com/gitlab-org/api/client-go/group_wikis.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/group_wikis.go rename to vendor/gitlab.com/gitlab-org/api/client-go/group_wikis.go diff --git a/vendor/github.com/xanzy/go-gitlab/groups.go b/vendor/gitlab.com/gitlab-org/api/client-go/groups.go similarity index 99% rename from vendor/github.com/xanzy/go-gitlab/groups.go rename to vendor/gitlab.com/gitlab-org/api/client-go/groups.go index 0e85961d6..c7b9e548f 100644 --- a/vendor/github.com/xanzy/go-gitlab/groups.go +++ b/vendor/gitlab.com/gitlab-org/api/client-go/groups.go @@ -87,6 +87,7 @@ type Group struct { MarkedForDeletionOn *ISOTime `json:"marked_for_deletion_on"` CreatedAt *time.Time `json:"created_at"` IPRestrictionRanges string `json:"ip_restriction_ranges"` + AllowedEmailDomainsList string `json:"allowed_email_domains_list"` WikiAccessLevel AccessControlValue `json:"wiki_access_level"` // Deprecated: Use EmailsEnabled instead @@ -383,7 +384,6 @@ type CreateGroupOptions struct { ParentID *int `url:"parent_id,omitempty" json:"parent_id,omitempty"` SharedRunnersMinutesLimit *int `url:"shared_runners_minutes_limit,omitempty" json:"shared_runners_minutes_limit,omitempty"` ExtraSharedRunnersMinutesLimit *int `url:"extra_shared_runners_minutes_limit,omitempty" json:"extra_shared_runners_minutes_limit,omitempty"` - IPRestrictionRanges *string `url:"ip_restriction_ranges,omitempty" json:"ip_restriction_ranges,omitempty"` WikiAccessLevel *AccessControlValue `url:"wiki_access_level,omitempty" json:"wiki_access_level,omitempty"` // Deprecated: Use EmailsEnabled instead @@ -532,6 +532,7 @@ type UpdateGroupOptions struct { SharedRunnersSetting *SharedRunnersSettingValue `url:"shared_runners_setting,omitempty" json:"shared_runners_setting,omitempty"` PreventSharingGroupsOutsideHierarchy *bool `url:"prevent_sharing_groups_outside_hierarchy,omitempty" json:"prevent_sharing_groups_outside_hierarchy,omitempty"` IPRestrictionRanges *string `url:"ip_restriction_ranges,omitempty" json:"ip_restriction_ranges,omitempty"` + AllowedEmailDomainsList *string `url:"allowed_email_domains_list,omitempty" json:"allowed_email_domains_list,omitempty"` WikiAccessLevel *AccessControlValue `url:"wiki_access_level,omitempty" json:"wiki_access_level,omitempty"` // Deprecated: Use EmailsEnabled instead diff --git a/vendor/github.com/xanzy/go-gitlab/import.go b/vendor/gitlab.com/gitlab-org/api/client-go/import.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/import.go rename to vendor/gitlab.com/gitlab-org/api/client-go/import.go diff --git a/vendor/github.com/xanzy/go-gitlab/instance_clusters.go b/vendor/gitlab.com/gitlab-org/api/client-go/instance_clusters.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/instance_clusters.go rename to vendor/gitlab.com/gitlab-org/api/client-go/instance_clusters.go diff --git a/vendor/github.com/xanzy/go-gitlab/instance_variables.go b/vendor/gitlab.com/gitlab-org/api/client-go/instance_variables.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/instance_variables.go rename to vendor/gitlab.com/gitlab-org/api/client-go/instance_variables.go diff --git a/vendor/github.com/xanzy/go-gitlab/invites.go b/vendor/gitlab.com/gitlab-org/api/client-go/invites.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/invites.go rename to vendor/gitlab.com/gitlab-org/api/client-go/invites.go diff --git a/vendor/github.com/xanzy/go-gitlab/issue_links.go b/vendor/gitlab.com/gitlab-org/api/client-go/issue_links.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/issue_links.go rename to vendor/gitlab.com/gitlab-org/api/client-go/issue_links.go diff --git a/vendor/github.com/xanzy/go-gitlab/issues.go b/vendor/gitlab.com/gitlab-org/api/client-go/issues.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/issues.go rename to vendor/gitlab.com/gitlab-org/api/client-go/issues.go diff --git a/vendor/github.com/xanzy/go-gitlab/issues_statistics.go b/vendor/gitlab.com/gitlab-org/api/client-go/issues_statistics.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/issues_statistics.go rename to vendor/gitlab.com/gitlab-org/api/client-go/issues_statistics.go diff --git a/vendor/github.com/xanzy/go-gitlab/job_token_scope.go b/vendor/gitlab.com/gitlab-org/api/client-go/job_token_scope.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/job_token_scope.go rename to vendor/gitlab.com/gitlab-org/api/client-go/job_token_scope.go diff --git a/vendor/github.com/xanzy/go-gitlab/jobs.go b/vendor/gitlab.com/gitlab-org/api/client-go/jobs.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/jobs.go rename to vendor/gitlab.com/gitlab-org/api/client-go/jobs.go diff --git a/vendor/github.com/xanzy/go-gitlab/keys.go b/vendor/gitlab.com/gitlab-org/api/client-go/keys.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/keys.go rename to vendor/gitlab.com/gitlab-org/api/client-go/keys.go diff --git a/vendor/github.com/xanzy/go-gitlab/labels.go b/vendor/gitlab.com/gitlab-org/api/client-go/labels.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/labels.go rename to vendor/gitlab.com/gitlab-org/api/client-go/labels.go diff --git a/vendor/github.com/xanzy/go-gitlab/license.go b/vendor/gitlab.com/gitlab-org/api/client-go/license.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/license.go rename to vendor/gitlab.com/gitlab-org/api/client-go/license.go diff --git a/vendor/github.com/xanzy/go-gitlab/license_templates.go b/vendor/gitlab.com/gitlab-org/api/client-go/license_templates.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/license_templates.go rename to vendor/gitlab.com/gitlab-org/api/client-go/license_templates.go diff --git a/vendor/github.com/xanzy/go-gitlab/markdown.go b/vendor/gitlab.com/gitlab-org/api/client-go/markdown.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/markdown.go rename to vendor/gitlab.com/gitlab-org/api/client-go/markdown.go diff --git a/vendor/github.com/xanzy/go-gitlab/member_roles.go b/vendor/gitlab.com/gitlab-org/api/client-go/member_roles.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/member_roles.go rename to vendor/gitlab.com/gitlab-org/api/client-go/member_roles.go diff --git a/vendor/github.com/xanzy/go-gitlab/merge_request_approvals.go b/vendor/gitlab.com/gitlab-org/api/client-go/merge_request_approvals.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/merge_request_approvals.go rename to vendor/gitlab.com/gitlab-org/api/client-go/merge_request_approvals.go diff --git a/vendor/github.com/xanzy/go-gitlab/merge_requests.go b/vendor/gitlab.com/gitlab-org/api/client-go/merge_requests.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/merge_requests.go rename to vendor/gitlab.com/gitlab-org/api/client-go/merge_requests.go diff --git a/vendor/github.com/xanzy/go-gitlab/merge_trains.go b/vendor/gitlab.com/gitlab-org/api/client-go/merge_trains.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/merge_trains.go rename to vendor/gitlab.com/gitlab-org/api/client-go/merge_trains.go diff --git a/vendor/github.com/xanzy/go-gitlab/metadata.go b/vendor/gitlab.com/gitlab-org/api/client-go/metadata.go similarity index 89% rename from vendor/github.com/xanzy/go-gitlab/metadata.go rename to vendor/gitlab.com/gitlab-org/api/client-go/metadata.go index db23a81e4..3550c4944 100644 --- a/vendor/github.com/xanzy/go-gitlab/metadata.go +++ b/vendor/gitlab.com/gitlab-org/api/client-go/metadata.go @@ -33,9 +33,10 @@ type Metadata struct { Version string `json:"version"` Revision string `json:"revision"` KAS struct { - Enabled bool `json:"enabled"` - ExternalURL string `json:"externalUrl"` - Version string `json:"version"` + Enabled bool `json:"enabled"` + ExternalURL string `json:"externalUrl"` + ExternalK8SProxyURL string `json:"externalK8sProxyUrl"` + Version string `json:"version"` } `json:"kas"` Enterprise bool `json:"enterprise"` } diff --git a/vendor/github.com/xanzy/go-gitlab/milestones.go b/vendor/gitlab.com/gitlab-org/api/client-go/milestones.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/milestones.go rename to vendor/gitlab.com/gitlab-org/api/client-go/milestones.go diff --git a/vendor/github.com/xanzy/go-gitlab/namespaces.go b/vendor/gitlab.com/gitlab-org/api/client-go/namespaces.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/namespaces.go rename to vendor/gitlab.com/gitlab-org/api/client-go/namespaces.go diff --git a/vendor/github.com/xanzy/go-gitlab/notes.go b/vendor/gitlab.com/gitlab-org/api/client-go/notes.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/notes.go rename to vendor/gitlab.com/gitlab-org/api/client-go/notes.go diff --git a/vendor/github.com/xanzy/go-gitlab/notifications.go b/vendor/gitlab.com/gitlab-org/api/client-go/notifications.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/notifications.go rename to vendor/gitlab.com/gitlab-org/api/client-go/notifications.go diff --git a/vendor/github.com/xanzy/go-gitlab/packages.go b/vendor/gitlab.com/gitlab-org/api/client-go/packages.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/packages.go rename to vendor/gitlab.com/gitlab-org/api/client-go/packages.go diff --git a/vendor/github.com/xanzy/go-gitlab/pages.go b/vendor/gitlab.com/gitlab-org/api/client-go/pages.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/pages.go rename to vendor/gitlab.com/gitlab-org/api/client-go/pages.go diff --git a/vendor/github.com/xanzy/go-gitlab/pages_domains.go b/vendor/gitlab.com/gitlab-org/api/client-go/pages_domains.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/pages_domains.go rename to vendor/gitlab.com/gitlab-org/api/client-go/pages_domains.go diff --git a/vendor/github.com/xanzy/go-gitlab/personal_access_tokens.go b/vendor/gitlab.com/gitlab-org/api/client-go/personal_access_tokens.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/personal_access_tokens.go rename to vendor/gitlab.com/gitlab-org/api/client-go/personal_access_tokens.go diff --git a/vendor/github.com/xanzy/go-gitlab/pipeline_schedules.go b/vendor/gitlab.com/gitlab-org/api/client-go/pipeline_schedules.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/pipeline_schedules.go rename to vendor/gitlab.com/gitlab-org/api/client-go/pipeline_schedules.go diff --git a/vendor/github.com/xanzy/go-gitlab/pipeline_triggers.go b/vendor/gitlab.com/gitlab-org/api/client-go/pipeline_triggers.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/pipeline_triggers.go rename to vendor/gitlab.com/gitlab-org/api/client-go/pipeline_triggers.go diff --git a/vendor/github.com/xanzy/go-gitlab/pipelines.go b/vendor/gitlab.com/gitlab-org/api/client-go/pipelines.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/pipelines.go rename to vendor/gitlab.com/gitlab-org/api/client-go/pipelines.go diff --git a/vendor/github.com/xanzy/go-gitlab/plan_limits.go b/vendor/gitlab.com/gitlab-org/api/client-go/plan_limits.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/plan_limits.go rename to vendor/gitlab.com/gitlab-org/api/client-go/plan_limits.go diff --git a/vendor/github.com/xanzy/go-gitlab/project_access_tokens.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_access_tokens.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_access_tokens.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_access_tokens.go diff --git a/vendor/github.com/xanzy/go-gitlab/project_badges.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_badges.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_badges.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_badges.go diff --git a/vendor/github.com/xanzy/go-gitlab/project_clusters.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_clusters.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_clusters.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_clusters.go diff --git a/vendor/github.com/xanzy/go-gitlab/project_feature_flags.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_feature_flags.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_feature_flags.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_feature_flags.go diff --git a/vendor/github.com/xanzy/go-gitlab/project_import_export.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_import_export.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_import_export.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_import_export.go diff --git a/vendor/github.com/xanzy/go-gitlab/project_iterations.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_iterations.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_iterations.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_iterations.go diff --git a/vendor/github.com/xanzy/go-gitlab/project_managed_licenses.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_managed_licenses.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_managed_licenses.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_managed_licenses.go diff --git a/vendor/gitlab.com/gitlab-org/api/client-go/project_markdown_uploads.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_markdown_uploads.go new file mode 100644 index 000000000..a8998e07f --- /dev/null +++ b/vendor/gitlab.com/gitlab-org/api/client-go/project_markdown_uploads.go @@ -0,0 +1,210 @@ +// +// Copyright 2024, Sander van Harmelen +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package gitlab + +import ( + "bytes" + "fmt" + "io" + "net/http" + "time" +) + +// ProjectMarkdownUploadsService handles communication with the project markdown uploads +// related methods of the GitLab API. +// +// Gitlab API docs: https://docs.gitlab.com/ee/api/project_markdown_uploads.html +type ProjectMarkdownUploadsService struct { + client *Client +} + +// ProjectMarkdownUploadedFile represents a single project markdown uploaded file. +// +// Gitlab API docs: https://docs.gitlab.com/ee/api/project_markdown_uploads.html +type ProjectMarkdownUploadedFile struct { + ID int `json:"id"` + Alt string `json:"alt"` + URL string `json:"url"` + FullPath string `json:"full_path"` + Markdown string `json:"markdown"` +} + +// ProjectMarkdownUpload represents a single project markdown upload. +// +// Gitlab API docs: https://docs.gitlab.com/ee/api/project_markdown_uploads.html +type ProjectMarkdownUpload struct { + ID int `json:"id"` + Size int `json:"size"` + Filename string `json:"filename"` + CreatedAt *time.Time `json:"created_at"` + UploadedBy *User `json:"uploaded_by"` +} + +// Gets a string representation of a ProjectMarkdownUpload. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/project_markdown_uploads.html +func (m ProjectMarkdownUpload) String() string { + return Stringify(m) +} + +// UploadProjectMarkdown uploads a markdown file to a project. +// +// GitLab docs: +// https://docs.gitlab.com/ee/api/project_markdown_uploads.html#upload-a-file +func (s *ProjectMarkdownUploadsService) UploadProjectMarkdown(pid interface{}, content io.Reader, options ...RequestOptionFunc) (*ProjectMarkdownUploadedFile, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/uploads", PathEscape(project)) + + // We need to create the request as a GET request to make sure the options + // are set correctly. After the request is created we will overwrite both + // the method and the body. + req, err := s.client.NewRequest(http.MethodPost, u, nil, options) + if err != nil { + return nil, nil, err + } + + // Overwrite the method and body. + req.Method = http.MethodPost + req.SetBody(content) + + f := new(ProjectMarkdownUploadedFile) + resp, err := s.client.Do(req, f) + if err != nil { + return nil, resp, err + } + + return f, resp, nil +} + +// ListProjectMarkdownUploads gets all markdown uploads for a project. +// +// GitLab API Docs: +// https://docs.gitlab.com/ee/api/project_markdown_uploads.html#list-uploads +func (s *ProjectMarkdownUploadsService) ListProjectMarkdownUploads(pid interface{}, options ...RequestOptionFunc) ([]*ProjectMarkdownUpload, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/uploads", PathEscape(project)) + + req, err := s.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + var uploads []*ProjectMarkdownUpload + resp, err := s.client.Do(req, &uploads) + if err != nil { + return nil, resp, err + } + + return uploads, resp, err +} + +// DownloadProjectMarkdownUploadByID downloads a specific upload by ID. +// +// GitLab API Docs: +// https://docs.gitlab.com/ee/api/project_markdown_uploads.html#download-an-uploaded-file-by-id +func (s *ProjectMarkdownUploadsService) DownloadProjectMarkdownUploadByID(pid interface{}, uploadID int, options ...RequestOptionFunc) ([]byte, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/uploads/%d", PathEscape(project), uploadID) + + req, err := s.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + var f bytes.Buffer + resp, err := s.client.Do(req, &f) + if err != nil { + return nil, resp, err + } + + return f.Bytes(), resp, err +} + +// DownloadProjectMarkdownUploadBySecretAndFilename downloads a specific upload +// by secret and filename. +// +// GitLab API Docs: +// https://docs.gitlab.com/ee/api/project_markdown_uploads.html#download-an-uploaded-file-by-secret-and-filename +func (s *ProjectMarkdownUploadsService) DownloadProjectMarkdownUploadBySecretAndFilename(pid interface{}, secret string, filename string, options ...RequestOptionFunc) ([]byte, *Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, nil, err + } + u := fmt.Sprintf("projects/%s/uploads/%s/%s", PathEscape(project), PathEscape(secret), PathEscape(filename)) + + req, err := s.client.NewRequest(http.MethodGet, u, nil, options) + if err != nil { + return nil, nil, err + } + + var f bytes.Buffer + resp, err := s.client.Do(req, &f) + if err != nil { + return nil, resp, err + } + + return f.Bytes(), resp, err +} + +// DeleteProjectMarkdownUploadByID deletes an upload by ID. +// +// GitLab API Docs: +// https://docs.gitlab.com/ee/api/project_markdown_uploads.html#delete-an-uploaded-file-by-id +func (s *ProjectMarkdownUploadsService) DeleteProjectMarkdownUploadByID(pid interface{}, uploadID int, options ...RequestOptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("projects/%s/uploads/%d", PathEscape(project), uploadID) + + req, err := s.client.NewRequest(http.MethodDelete, u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} + +// DeleteProjectMarkdownUploadBySecretAndFilename deletes an upload +// by secret and filename. +// +// GitLab API Docs: +// https://docs.gitlab.com/ee/api/project_markdown_uploads.html#delete-an-uploaded-file-by-secret-and-filename +func (s *ProjectMarkdownUploadsService) DeleteProjectMarkdownUploadBySecretAndFilename(pid interface{}, secret string, filename string, options ...RequestOptionFunc) (*Response, error) { + project, err := parseID(pid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("projects/%s/uploads/%s/%s", + PathEscape(project), PathEscape(secret), PathEscape(filename)) + + req, err := s.client.NewRequest(http.MethodDelete, u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} diff --git a/vendor/github.com/xanzy/go-gitlab/project_members.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_members.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_members.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_members.go diff --git a/vendor/github.com/xanzy/go-gitlab/project_mirror.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_mirror.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_mirror.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_mirror.go diff --git a/vendor/github.com/xanzy/go-gitlab/project_repository_storage_move.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_repository_storage_move.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_repository_storage_move.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_repository_storage_move.go diff --git a/vendor/github.com/xanzy/go-gitlab/project_snippets.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_snippets.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_snippets.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_snippets.go diff --git a/vendor/github.com/xanzy/go-gitlab/project_templates.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_templates.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_templates.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_templates.go diff --git a/vendor/github.com/xanzy/go-gitlab/project_variables.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_variables.go similarity index 98% rename from vendor/github.com/xanzy/go-gitlab/project_variables.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_variables.go index e75c74634..9dea091bf 100644 --- a/vendor/github.com/xanzy/go-gitlab/project_variables.go +++ b/vendor/gitlab.com/gitlab-org/api/client-go/project_variables.go @@ -41,6 +41,7 @@ type ProjectVariable struct { VariableType VariableTypeValue `json:"variable_type"` Protected bool `json:"protected"` Masked bool `json:"masked"` + Hidden bool `json:"hidden"` Raw bool `json:"raw"` EnvironmentScope string `json:"environment_scope"` Description string `json:"description"` @@ -132,6 +133,7 @@ type CreateProjectVariableOptions struct { Description *string `url:"description,omitempty" json:"description,omitempty"` EnvironmentScope *string `url:"environment_scope,omitempty" json:"environment_scope,omitempty"` Masked *bool `url:"masked,omitempty" json:"masked,omitempty"` + MaskedAndHidden *bool `url:"masked_and_hidden,omitempty" json:"masked_and_hidden,omitempty"` Protected *bool `url:"protected,omitempty" json:"protected,omitempty"` Raw *bool `url:"raw,omitempty" json:"raw,omitempty"` VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` diff --git a/vendor/github.com/xanzy/go-gitlab/project_vulnerabilities.go b/vendor/gitlab.com/gitlab-org/api/client-go/project_vulnerabilities.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/project_vulnerabilities.go rename to vendor/gitlab.com/gitlab-org/api/client-go/project_vulnerabilities.go diff --git a/vendor/github.com/xanzy/go-gitlab/projects.go b/vendor/gitlab.com/gitlab-org/api/client-go/projects.go similarity index 87% rename from vendor/github.com/xanzy/go-gitlab/projects.go rename to vendor/gitlab.com/gitlab-org/api/client-go/projects.go index 424196b5f..0400273bc 100644 --- a/vendor/github.com/xanzy/go-gitlab/projects.go +++ b/vendor/gitlab.com/gitlab-org/api/client-go/projects.go @@ -129,49 +129,50 @@ type Project struct { GroupFullPath string `json:"group_full_path"` GroupAccessLevel int `json:"group_access_level"` } `json:"shared_with_groups"` - Statistics *Statistics `json:"statistics"` - Links *Links `json:"_links,omitempty"` - ImportURL string `json:"import_url"` - ImportType string `json:"import_type"` - ImportStatus string `json:"import_status"` - ImportError string `json:"import_error"` - CIDefaultGitDepth int `json:"ci_default_git_depth"` - CIForwardDeploymentEnabled bool `json:"ci_forward_deployment_enabled"` - CIForwardDeploymentRollbackAllowed bool `json:"ci_forward_deployment_rollback_allowed"` - CISeperateCache bool `json:"ci_separated_caches"` - CIJobTokenScopeEnabled bool `json:"ci_job_token_scope_enabled"` - CIOptInJWT bool `json:"ci_opt_in_jwt"` - CIAllowForkPipelinesToRunInParentProject bool `json:"ci_allow_fork_pipelines_to_run_in_parent_project"` - CIRestrictPipelineCancellationRole AccessControlValue `json:"ci_restrict_pipeline_cancellation_role"` - PublicJobs bool `json:"public_jobs"` - BuildTimeout int `json:"build_timeout"` - AutoCancelPendingPipelines string `json:"auto_cancel_pending_pipelines"` - CIConfigPath string `json:"ci_config_path"` - 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"` - IssueBranchTemplate string `json:"issue_branch_template"` - KeepLatestArtifact bool `json:"keep_latest_artifact"` - MergePipelinesEnabled bool `json:"merge_pipelines_enabled"` - MergeTrainsEnabled bool `json:"merge_trains_enabled"` - RestrictUserDefinedVariables bool `json:"restrict_user_defined_variables"` - MergeCommitTemplate string `json:"merge_commit_template"` - SquashCommitTemplate string `json:"squash_commit_template"` - AutoDevopsDeployStrategy string `json:"auto_devops_deploy_strategy"` - AutoDevopsEnabled bool `json:"auto_devops_enabled"` - BuildGitStrategy string `json:"build_git_strategy"` - EmailsEnabled bool `json:"emails_enabled"` - ExternalAuthorizationClassificationLabel string `json:"external_authorization_classification_label"` - RequirementsEnabled bool `json:"requirements_enabled"` - RequirementsAccessLevel AccessControlValue `json:"requirements_access_level"` - SecurityAndComplianceEnabled bool `json:"security_and_compliance_enabled"` - SecurityAndComplianceAccessLevel AccessControlValue `json:"security_and_compliance_access_level"` - 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"` + Statistics *Statistics `json:"statistics"` + Links *Links `json:"_links,omitempty"` + ImportURL string `json:"import_url"` + ImportType string `json:"import_type"` + ImportStatus string `json:"import_status"` + ImportError string `json:"import_error"` + CIDefaultGitDepth int `json:"ci_default_git_depth"` + CIForwardDeploymentEnabled bool `json:"ci_forward_deployment_enabled"` + CIForwardDeploymentRollbackAllowed bool `json:"ci_forward_deployment_rollback_allowed"` + CISeperateCache bool `json:"ci_separated_caches"` + CIJobTokenScopeEnabled bool `json:"ci_job_token_scope_enabled"` + CIOptInJWT bool `json:"ci_opt_in_jwt"` + CIAllowForkPipelinesToRunInParentProject bool `json:"ci_allow_fork_pipelines_to_run_in_parent_project"` + CIRestrictPipelineCancellationRole AccessControlValue `json:"ci_restrict_pipeline_cancellation_role"` + PublicJobs bool `json:"public_jobs"` + BuildTimeout int `json:"build_timeout"` + AutoCancelPendingPipelines string `json:"auto_cancel_pending_pipelines"` + CIConfigPath string `json:"ci_config_path"` + 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"` + IssueBranchTemplate string `json:"issue_branch_template"` + KeepLatestArtifact bool `json:"keep_latest_artifact"` + MergePipelinesEnabled bool `json:"merge_pipelines_enabled"` + MergeTrainsEnabled bool `json:"merge_trains_enabled"` + RestrictUserDefinedVariables bool `json:"restrict_user_defined_variables"` + CIPipelineVariablesMinimumOverrideRole CIPipelineVariablesMinimumOverrideRoleValue `json:"ci_pipeline_variables_minimum_override_role"` + MergeCommitTemplate string `json:"merge_commit_template"` + SquashCommitTemplate string `json:"squash_commit_template"` + AutoDevopsDeployStrategy string `json:"auto_devops_deploy_strategy"` + AutoDevopsEnabled bool `json:"auto_devops_enabled"` + BuildGitStrategy string `json:"build_git_strategy"` + EmailsEnabled bool `json:"emails_enabled"` + ExternalAuthorizationClassificationLabel string `json:"external_authorization_classification_label"` + RequirementsEnabled bool `json:"requirements_enabled"` + RequirementsAccessLevel AccessControlValue `json:"requirements_access_level"` + SecurityAndComplianceEnabled bool `json:"security_and_compliance_enabled"` + SecurityAndComplianceAccessLevel AccessControlValue `json:"security_and_compliance_access_level"` + 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"` @@ -834,89 +835,90 @@ func (s *ProjectsService) CreateProjectForUser(user int, opt *CreateProjectForUs // // GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#edit-project type EditProjectOptions struct { - AllowMergeOnSkippedPipeline *bool `url:"allow_merge_on_skipped_pipeline,omitempty" json:"allow_merge_on_skipped_pipeline,omitempty"` - AllowPipelineTriggerApproveDeployment *bool `url:"allow_pipeline_trigger_approve_deployment,omitempty" json:"allow_pipeline_trigger_approve_deployment,omitempty"` - OnlyAllowMergeIfAllStatusChecksPassed *bool `url:"only_allow_merge_if_all_status_checks_passed,omitempty" json:"only_allow_merge_if_all_status_checks_passed,omitempty"` - AnalyticsAccessLevel *AccessControlValue `url:"analytics_access_level,omitempty" json:"analytics_access_level,omitempty"` - ApprovalsBeforeMerge *int `url:"approvals_before_merge,omitempty" json:"approvals_before_merge,omitempty"` - AutoCancelPendingPipelines *string `url:"auto_cancel_pending_pipelines,omitempty" json:"auto_cancel_pending_pipelines,omitempty"` - AutoDevopsDeployStrategy *string `url:"auto_devops_deploy_strategy,omitempty" json:"auto_devops_deploy_strategy,omitempty"` - AutoDevopsEnabled *bool `url:"auto_devops_enabled,omitempty" json:"auto_devops_enabled,omitempty"` - AutocloseReferencedIssues *bool `url:"autoclose_referenced_issues,omitempty" json:"autoclose_referenced_issues,omitempty"` - Avatar *ProjectAvatar `url:"-" json:"avatar,omitempty"` - BuildCoverageRegex *string `url:"build_coverage_regex,omitempty" json:"build_coverage_regex,omitempty"` - BuildGitStrategy *string `url:"build_git_strategy,omitempty" json:"build_git_strategy,omitempty"` - BuildTimeout *int `url:"build_timeout,omitempty" json:"build_timeout,omitempty"` - BuildsAccessLevel *AccessControlValue `url:"builds_access_level,omitempty" json:"builds_access_level,omitempty"` - CIConfigPath *string `url:"ci_config_path,omitempty" json:"ci_config_path,omitempty"` - CIDefaultGitDepth *int `url:"ci_default_git_depth,omitempty" json:"ci_default_git_depth,omitempty"` - CIForwardDeploymentEnabled *bool `url:"ci_forward_deployment_enabled,omitempty" json:"ci_forward_deployment_enabled,omitempty"` - CIForwardDeploymentRollbackAllowed *bool `url:"ci_forward_deployment_rollback_allowed,omitempty" json:"ci_forward_deployment_rollback_allowed,omitempty"` - CISeperateCache *bool `url:"ci_separated_caches,omitempty" json:"ci_separated_caches,omitempty"` - CIRestrictPipelineCancellationRole *AccessControlValue `url:"ci_restrict_pipeline_cancellation_role,omitempty" json:"ci_restrict_pipeline_cancellation_role,omitempty"` - ContainerExpirationPolicyAttributes *ContainerExpirationPolicyAttributes `url:"container_expiration_policy_attributes,omitempty" json:"container_expiration_policy_attributes,omitempty"` - ContainerRegistryAccessLevel *AccessControlValue `url:"container_registry_access_level,omitempty" json:"container_registry_access_level,omitempty"` - DefaultBranch *string `url:"default_branch,omitempty" json:"default_branch,omitempty"` - Description *string `url:"description,omitempty" json:"description,omitempty"` - EmailsEnabled *bool `url:"emails_enabled,omitempty" json:"emails_enabled,omitempty"` - EnforceAuthChecksOnUploads *bool `url:"enforce_auth_checks_on_uploads,omitempty" json:"enforce_auth_checks_on_uploads,omitempty"` - ExternalAuthorizationClassificationLabel *string `url:"external_authorization_classification_label,omitempty" json:"external_authorization_classification_label,omitempty"` - ForkingAccessLevel *AccessControlValue `url:"forking_access_level,omitempty" json:"forking_access_level,omitempty"` - ImportURL *string `url:"import_url,omitempty" json:"import_url,omitempty"` - IssuesAccessLevel *AccessControlValue `url:"issues_access_level,omitempty" json:"issues_access_level,omitempty"` - IssueBranchTemplate *string `url:"issue_branch_template,omitempty" json:"issue_branch_template,omitempty"` - IssuesTemplate *string `url:"issues_template,omitempty" json:"issues_template,omitempty"` - KeepLatestArtifact *bool `url:"keep_latest_artifact,omitempty" json:"keep_latest_artifact,omitempty"` - LFSEnabled *bool `url:"lfs_enabled,omitempty" json:"lfs_enabled,omitempty"` - MergeCommitTemplate *string `url:"merge_commit_template,omitempty" json:"merge_commit_template,omitempty"` - MergeRequestDefaultTargetSelf *bool `url:"mr_default_target_self,omitempty" json:"mr_default_target_self,omitempty"` - MergeMethod *MergeMethodValue `url:"merge_method,omitempty" json:"merge_method,omitempty"` - MergePipelinesEnabled *bool `url:"merge_pipelines_enabled,omitempty" json:"merge_pipelines_enabled,omitempty"` - MergeRequestsAccessLevel *AccessControlValue `url:"merge_requests_access_level,omitempty" json:"merge_requests_access_level,omitempty"` - MergeRequestsTemplate *string `url:"merge_requests_template,omitempty" json:"merge_requests_template,omitempty"` - MergeTrainsEnabled *bool `url:"merge_trains_enabled,omitempty" json:"merge_trains_enabled,omitempty"` - Mirror *bool `url:"mirror,omitempty" json:"mirror,omitempty"` - MirrorBranchRegex *string `url:"mirror_branch_regex,omitempty" json:"mirror_branch_regex,omitempty"` - MirrorOverwritesDivergedBranches *bool `url:"mirror_overwrites_diverged_branches,omitempty" json:"mirror_overwrites_diverged_branches,omitempty"` - MirrorTriggerBuilds *bool `url:"mirror_trigger_builds,omitempty" json:"mirror_trigger_builds,omitempty"` - MirrorUserID *int `url:"mirror_user_id,omitempty" json:"mirror_user_id,omitempty"` - ModelExperimentsAccessLevel *AccessControlValue `url:"model_experiments_access_level,omitempty" json:"model_experiments_access_level,omitempty"` - ModelRegistryAccessLevel *AccessControlValue `url:"model_registry_access_level,omitempty" json:"model_registry_access_level,omitempty"` - Name *string `url:"name,omitempty" json:"name,omitempty"` - OnlyAllowMergeIfAllDiscussionsAreResolved *bool `url:"only_allow_merge_if_all_discussions_are_resolved,omitempty" json:"only_allow_merge_if_all_discussions_are_resolved,omitempty"` - OnlyAllowMergeIfPipelineSucceeds *bool `url:"only_allow_merge_if_pipeline_succeeds,omitempty" json:"only_allow_merge_if_pipeline_succeeds,omitempty"` - OnlyMirrorProtectedBranches *bool `url:"only_mirror_protected_branches,omitempty" json:"only_mirror_protected_branches,omitempty"` - OperationsAccessLevel *AccessControlValue `url:"operations_access_level,omitempty" json:"operations_access_level,omitempty"` - PackagesEnabled *bool `url:"packages_enabled,omitempty" json:"packages_enabled,omitempty"` - PagesAccessLevel *AccessControlValue `url:"pages_access_level,omitempty" json:"pages_access_level,omitempty"` - Path *string `url:"path,omitempty" json:"path,omitempty"` - PublicBuilds *bool `url:"public_builds,omitempty" json:"public_builds,omitempty"` - ReleasesAccessLevel *AccessControlValue `url:"releases_access_level,omitempty" json:"releases_access_level,omitempty"` - EnvironmentsAccessLevel *AccessControlValue `url:"environments_access_level,omitempty" json:"environments_access_level,omitempty"` - FeatureFlagsAccessLevel *AccessControlValue `url:"feature_flags_access_level,omitempty" json:"feature_flags_access_level,omitempty"` - 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"` - RequestAccessEnabled *bool `url:"request_access_enabled,omitempty" json:"request_access_enabled,omitempty"` - RequirementsAccessLevel *AccessControlValue `url:"requirements_access_level,omitempty" json:"requirements_access_level,omitempty"` - ResolveOutdatedDiffDiscussions *bool `url:"resolve_outdated_diff_discussions,omitempty" json:"resolve_outdated_diff_discussions,omitempty"` - RestrictUserDefinedVariables *bool `url:"restrict_user_defined_variables,omitempty" json:"restrict_user_defined_variables,omitempty"` - SecurityAndComplianceAccessLevel *AccessControlValue `url:"security_and_compliance_access_level,omitempty" json:"security_and_compliance_access_level,omitempty"` - ServiceDeskEnabled *bool `url:"service_desk_enabled,omitempty" json:"service_desk_enabled,omitempty"` - SharedRunnersEnabled *bool `url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"` - GroupRunnersEnabled *bool `url:"group_runners_enabled,omitempty" json:"group_runners_enabled,omitempty"` - ShowDefaultAwardEmojis *bool `url:"show_default_award_emojis,omitempty" json:"show_default_award_emojis,omitempty"` - SnippetsAccessLevel *AccessControlValue `url:"snippets_access_level,omitempty" json:"snippets_access_level,omitempty"` - SquashCommitTemplate *string `url:"squash_commit_template,omitempty" json:"squash_commit_template,omitempty"` - SquashOption *SquashOptionValue `url:"squash_option,omitempty" json:"squash_option,omitempty"` - SuggestionCommitMessage *string `url:"suggestion_commit_message,omitempty" json:"suggestion_commit_message,omitempty"` - Topics *[]string `url:"topics,omitempty" json:"topics,omitempty"` - Visibility *VisibilityValue `url:"visibility,omitempty" json:"visibility,omitempty"` - WikiAccessLevel *AccessControlValue `url:"wiki_access_level,omitempty" json:"wiki_access_level,omitempty"` + AllowMergeOnSkippedPipeline *bool `url:"allow_merge_on_skipped_pipeline,omitempty" json:"allow_merge_on_skipped_pipeline,omitempty"` + AllowPipelineTriggerApproveDeployment *bool `url:"allow_pipeline_trigger_approve_deployment,omitempty" json:"allow_pipeline_trigger_approve_deployment,omitempty"` + OnlyAllowMergeIfAllStatusChecksPassed *bool `url:"only_allow_merge_if_all_status_checks_passed,omitempty" json:"only_allow_merge_if_all_status_checks_passed,omitempty"` + AnalyticsAccessLevel *AccessControlValue `url:"analytics_access_level,omitempty" json:"analytics_access_level,omitempty"` + ApprovalsBeforeMerge *int `url:"approvals_before_merge,omitempty" json:"approvals_before_merge,omitempty"` + AutoCancelPendingPipelines *string `url:"auto_cancel_pending_pipelines,omitempty" json:"auto_cancel_pending_pipelines,omitempty"` + AutoDevopsDeployStrategy *string `url:"auto_devops_deploy_strategy,omitempty" json:"auto_devops_deploy_strategy,omitempty"` + AutoDevopsEnabled *bool `url:"auto_devops_enabled,omitempty" json:"auto_devops_enabled,omitempty"` + AutocloseReferencedIssues *bool `url:"autoclose_referenced_issues,omitempty" json:"autoclose_referenced_issues,omitempty"` + Avatar *ProjectAvatar `url:"-" json:"avatar,omitempty"` + BuildCoverageRegex *string `url:"build_coverage_regex,omitempty" json:"build_coverage_regex,omitempty"` + BuildGitStrategy *string `url:"build_git_strategy,omitempty" json:"build_git_strategy,omitempty"` + BuildTimeout *int `url:"build_timeout,omitempty" json:"build_timeout,omitempty"` + BuildsAccessLevel *AccessControlValue `url:"builds_access_level,omitempty" json:"builds_access_level,omitempty"` + CIConfigPath *string `url:"ci_config_path,omitempty" json:"ci_config_path,omitempty"` + CIDefaultGitDepth *int `url:"ci_default_git_depth,omitempty" json:"ci_default_git_depth,omitempty"` + CIForwardDeploymentEnabled *bool `url:"ci_forward_deployment_enabled,omitempty" json:"ci_forward_deployment_enabled,omitempty"` + CIForwardDeploymentRollbackAllowed *bool `url:"ci_forward_deployment_rollback_allowed,omitempty" json:"ci_forward_deployment_rollback_allowed,omitempty"` + CISeperateCache *bool `url:"ci_separated_caches,omitempty" json:"ci_separated_caches,omitempty"` + CIRestrictPipelineCancellationRole *AccessControlValue `url:"ci_restrict_pipeline_cancellation_role,omitempty" json:"ci_restrict_pipeline_cancellation_role,omitempty"` + CIPipelineVariablesMinimumOverrideRole *CIPipelineVariablesMinimumOverrideRoleValue `url:"ci_pipeline_variables_minimum_override_role,omitempty" json:"ci_pipeline_variables_minimum_override_role,omitempty"` + ContainerExpirationPolicyAttributes *ContainerExpirationPolicyAttributes `url:"container_expiration_policy_attributes,omitempty" json:"container_expiration_policy_attributes,omitempty"` + ContainerRegistryAccessLevel *AccessControlValue `url:"container_registry_access_level,omitempty" json:"container_registry_access_level,omitempty"` + DefaultBranch *string `url:"default_branch,omitempty" json:"default_branch,omitempty"` + Description *string `url:"description,omitempty" json:"description,omitempty"` + EmailsEnabled *bool `url:"emails_enabled,omitempty" json:"emails_enabled,omitempty"` + EnforceAuthChecksOnUploads *bool `url:"enforce_auth_checks_on_uploads,omitempty" json:"enforce_auth_checks_on_uploads,omitempty"` + ExternalAuthorizationClassificationLabel *string `url:"external_authorization_classification_label,omitempty" json:"external_authorization_classification_label,omitempty"` + ForkingAccessLevel *AccessControlValue `url:"forking_access_level,omitempty" json:"forking_access_level,omitempty"` + ImportURL *string `url:"import_url,omitempty" json:"import_url,omitempty"` + IssuesAccessLevel *AccessControlValue `url:"issues_access_level,omitempty" json:"issues_access_level,omitempty"` + IssueBranchTemplate *string `url:"issue_branch_template,omitempty" json:"issue_branch_template,omitempty"` + IssuesTemplate *string `url:"issues_template,omitempty" json:"issues_template,omitempty"` + KeepLatestArtifact *bool `url:"keep_latest_artifact,omitempty" json:"keep_latest_artifact,omitempty"` + LFSEnabled *bool `url:"lfs_enabled,omitempty" json:"lfs_enabled,omitempty"` + MergeCommitTemplate *string `url:"merge_commit_template,omitempty" json:"merge_commit_template,omitempty"` + MergeRequestDefaultTargetSelf *bool `url:"mr_default_target_self,omitempty" json:"mr_default_target_self,omitempty"` + MergeMethod *MergeMethodValue `url:"merge_method,omitempty" json:"merge_method,omitempty"` + MergePipelinesEnabled *bool `url:"merge_pipelines_enabled,omitempty" json:"merge_pipelines_enabled,omitempty"` + MergeRequestsAccessLevel *AccessControlValue `url:"merge_requests_access_level,omitempty" json:"merge_requests_access_level,omitempty"` + MergeRequestsTemplate *string `url:"merge_requests_template,omitempty" json:"merge_requests_template,omitempty"` + MergeTrainsEnabled *bool `url:"merge_trains_enabled,omitempty" json:"merge_trains_enabled,omitempty"` + Mirror *bool `url:"mirror,omitempty" json:"mirror,omitempty"` + MirrorBranchRegex *string `url:"mirror_branch_regex,omitempty" json:"mirror_branch_regex,omitempty"` + MirrorOverwritesDivergedBranches *bool `url:"mirror_overwrites_diverged_branches,omitempty" json:"mirror_overwrites_diverged_branches,omitempty"` + MirrorTriggerBuilds *bool `url:"mirror_trigger_builds,omitempty" json:"mirror_trigger_builds,omitempty"` + MirrorUserID *int `url:"mirror_user_id,omitempty" json:"mirror_user_id,omitempty"` + ModelExperimentsAccessLevel *AccessControlValue `url:"model_experiments_access_level,omitempty" json:"model_experiments_access_level,omitempty"` + ModelRegistryAccessLevel *AccessControlValue `url:"model_registry_access_level,omitempty" json:"model_registry_access_level,omitempty"` + Name *string `url:"name,omitempty" json:"name,omitempty"` + OnlyAllowMergeIfAllDiscussionsAreResolved *bool `url:"only_allow_merge_if_all_discussions_are_resolved,omitempty" json:"only_allow_merge_if_all_discussions_are_resolved,omitempty"` + OnlyAllowMergeIfPipelineSucceeds *bool `url:"only_allow_merge_if_pipeline_succeeds,omitempty" json:"only_allow_merge_if_pipeline_succeeds,omitempty"` + OnlyMirrorProtectedBranches *bool `url:"only_mirror_protected_branches,omitempty" json:"only_mirror_protected_branches,omitempty"` + OperationsAccessLevel *AccessControlValue `url:"operations_access_level,omitempty" json:"operations_access_level,omitempty"` + PackagesEnabled *bool `url:"packages_enabled,omitempty" json:"packages_enabled,omitempty"` + PagesAccessLevel *AccessControlValue `url:"pages_access_level,omitempty" json:"pages_access_level,omitempty"` + Path *string `url:"path,omitempty" json:"path,omitempty"` + PublicBuilds *bool `url:"public_builds,omitempty" json:"public_builds,omitempty"` + ReleasesAccessLevel *AccessControlValue `url:"releases_access_level,omitempty" json:"releases_access_level,omitempty"` + EnvironmentsAccessLevel *AccessControlValue `url:"environments_access_level,omitempty" json:"environments_access_level,omitempty"` + FeatureFlagsAccessLevel *AccessControlValue `url:"feature_flags_access_level,omitempty" json:"feature_flags_access_level,omitempty"` + 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"` + RequestAccessEnabled *bool `url:"request_access_enabled,omitempty" json:"request_access_enabled,omitempty"` + RequirementsAccessLevel *AccessControlValue `url:"requirements_access_level,omitempty" json:"requirements_access_level,omitempty"` + ResolveOutdatedDiffDiscussions *bool `url:"resolve_outdated_diff_discussions,omitempty" json:"resolve_outdated_diff_discussions,omitempty"` + RestrictUserDefinedVariables *bool `url:"restrict_user_defined_variables,omitempty" json:"restrict_user_defined_variables,omitempty"` + SecurityAndComplianceAccessLevel *AccessControlValue `url:"security_and_compliance_access_level,omitempty" json:"security_and_compliance_access_level,omitempty"` + ServiceDeskEnabled *bool `url:"service_desk_enabled,omitempty" json:"service_desk_enabled,omitempty"` + SharedRunnersEnabled *bool `url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"` + GroupRunnersEnabled *bool `url:"group_runners_enabled,omitempty" json:"group_runners_enabled,omitempty"` + ShowDefaultAwardEmojis *bool `url:"show_default_award_emojis,omitempty" json:"show_default_award_emojis,omitempty"` + SnippetsAccessLevel *AccessControlValue `url:"snippets_access_level,omitempty" json:"snippets_access_level,omitempty"` + SquashCommitTemplate *string `url:"squash_commit_template,omitempty" json:"squash_commit_template,omitempty"` + SquashOption *SquashOptionValue `url:"squash_option,omitempty" json:"squash_option,omitempty"` + SuggestionCommitMessage *string `url:"suggestion_commit_message,omitempty" json:"suggestion_commit_message,omitempty"` + Topics *[]string `url:"topics,omitempty" json:"topics,omitempty"` + Visibility *VisibilityValue `url:"visibility,omitempty" json:"visibility,omitempty"` + WikiAccessLevel *AccessControlValue `url:"wiki_access_level,omitempty" json:"wiki_access_level,omitempty"` // Deprecated: Use ContainerRegistryAccessLevel instead. ContainerRegistryEnabled *bool `url:"container_registry_enabled,omitempty" json:"container_registry_enabled,omitempty"` @@ -1268,6 +1270,8 @@ type HookCustomHeader struct { type ProjectHook struct { ID int `json:"id"` URL string `json:"url"` + Name string `json:"name"` + Description string `json:"description"` ConfidentialNoteEvents bool `json:"confidential_note_events"` ProjectID int `json:"project_id"` PushEvents bool `json:"push_events"` @@ -1350,6 +1354,8 @@ func (s *ProjectsService) GetProjectHook(pid interface{}, hook int, options ...R // GitLab API docs: // https://docs.gitlab.com/ee/api/projects.html#add-project-hook type AddProjectHookOptions struct { + Name *string `url:"name,omitempty" json:"name,omitempty"` + Description *string `url:"description,omitempty" json:"description,omitempty"` ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"` @@ -1401,6 +1407,8 @@ func (s *ProjectsService) AddProjectHook(pid interface{}, opt *AddProjectHookOpt // GitLab API docs: // https://docs.gitlab.com/ee/api/projects.html#edit-project-hook type EditProjectHookOptions struct { + Name *string `url:"name,omitempty" json:"name,omitempty"` + Description *string `url:"description,omitempty" json:"description,omitempty"` ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"` diff --git a/vendor/github.com/xanzy/go-gitlab/protected_branches.go b/vendor/gitlab.com/gitlab-org/api/client-go/protected_branches.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/protected_branches.go rename to vendor/gitlab.com/gitlab-org/api/client-go/protected_branches.go diff --git a/vendor/github.com/xanzy/go-gitlab/protected_environments.go b/vendor/gitlab.com/gitlab-org/api/client-go/protected_environments.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/protected_environments.go rename to vendor/gitlab.com/gitlab-org/api/client-go/protected_environments.go diff --git a/vendor/github.com/xanzy/go-gitlab/protected_tags.go b/vendor/gitlab.com/gitlab-org/api/client-go/protected_tags.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/protected_tags.go rename to vendor/gitlab.com/gitlab-org/api/client-go/protected_tags.go diff --git a/vendor/github.com/xanzy/go-gitlab/releaselinks.go b/vendor/gitlab.com/gitlab-org/api/client-go/releaselinks.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/releaselinks.go rename to vendor/gitlab.com/gitlab-org/api/client-go/releaselinks.go diff --git a/vendor/github.com/xanzy/go-gitlab/releases.go b/vendor/gitlab.com/gitlab-org/api/client-go/releases.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/releases.go rename to vendor/gitlab.com/gitlab-org/api/client-go/releases.go diff --git a/vendor/github.com/xanzy/go-gitlab/repositories.go b/vendor/gitlab.com/gitlab-org/api/client-go/repositories.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/repositories.go rename to vendor/gitlab.com/gitlab-org/api/client-go/repositories.go diff --git a/vendor/github.com/xanzy/go-gitlab/repository_files.go b/vendor/gitlab.com/gitlab-org/api/client-go/repository_files.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/repository_files.go rename to vendor/gitlab.com/gitlab-org/api/client-go/repository_files.go diff --git a/vendor/github.com/xanzy/go-gitlab/repository_submodules.go b/vendor/gitlab.com/gitlab-org/api/client-go/repository_submodules.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/repository_submodules.go rename to vendor/gitlab.com/gitlab-org/api/client-go/repository_submodules.go diff --git a/vendor/github.com/xanzy/go-gitlab/request_options.go b/vendor/gitlab.com/gitlab-org/api/client-go/request_options.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/request_options.go rename to vendor/gitlab.com/gitlab-org/api/client-go/request_options.go diff --git a/vendor/github.com/xanzy/go-gitlab/resource_group.go b/vendor/gitlab.com/gitlab-org/api/client-go/resource_group.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/resource_group.go rename to vendor/gitlab.com/gitlab-org/api/client-go/resource_group.go diff --git a/vendor/github.com/xanzy/go-gitlab/resource_iteration_events.go b/vendor/gitlab.com/gitlab-org/api/client-go/resource_iteration_events.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/resource_iteration_events.go rename to vendor/gitlab.com/gitlab-org/api/client-go/resource_iteration_events.go diff --git a/vendor/github.com/xanzy/go-gitlab/resource_label_events.go b/vendor/gitlab.com/gitlab-org/api/client-go/resource_label_events.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/resource_label_events.go rename to vendor/gitlab.com/gitlab-org/api/client-go/resource_label_events.go diff --git a/vendor/github.com/xanzy/go-gitlab/resource_milestone_events.go b/vendor/gitlab.com/gitlab-org/api/client-go/resource_milestone_events.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/resource_milestone_events.go rename to vendor/gitlab.com/gitlab-org/api/client-go/resource_milestone_events.go diff --git a/vendor/github.com/xanzy/go-gitlab/resource_state_events.go b/vendor/gitlab.com/gitlab-org/api/client-go/resource_state_events.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/resource_state_events.go rename to vendor/gitlab.com/gitlab-org/api/client-go/resource_state_events.go diff --git a/vendor/github.com/xanzy/go-gitlab/resource_weight_events.go b/vendor/gitlab.com/gitlab-org/api/client-go/resource_weight_events.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/resource_weight_events.go rename to vendor/gitlab.com/gitlab-org/api/client-go/resource_weight_events.go diff --git a/vendor/github.com/xanzy/go-gitlab/runners.go b/vendor/gitlab.com/gitlab-org/api/client-go/runners.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/runners.go rename to vendor/gitlab.com/gitlab-org/api/client-go/runners.go diff --git a/vendor/github.com/xanzy/go-gitlab/search.go b/vendor/gitlab.com/gitlab-org/api/client-go/search.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/search.go rename to vendor/gitlab.com/gitlab-org/api/client-go/search.go diff --git a/vendor/github.com/xanzy/go-gitlab/services.go b/vendor/gitlab.com/gitlab-org/api/client-go/services.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/services.go rename to vendor/gitlab.com/gitlab-org/api/client-go/services.go diff --git a/vendor/github.com/xanzy/go-gitlab/settings.go b/vendor/gitlab.com/gitlab-org/api/client-go/settings.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/settings.go rename to vendor/gitlab.com/gitlab-org/api/client-go/settings.go diff --git a/vendor/github.com/xanzy/go-gitlab/sidekiq_metrics.go b/vendor/gitlab.com/gitlab-org/api/client-go/sidekiq_metrics.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/sidekiq_metrics.go rename to vendor/gitlab.com/gitlab-org/api/client-go/sidekiq_metrics.go diff --git a/vendor/github.com/xanzy/go-gitlab/snippet_repository_storage_move.go b/vendor/gitlab.com/gitlab-org/api/client-go/snippet_repository_storage_move.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/snippet_repository_storage_move.go rename to vendor/gitlab.com/gitlab-org/api/client-go/snippet_repository_storage_move.go diff --git a/vendor/github.com/xanzy/go-gitlab/snippets.go b/vendor/gitlab.com/gitlab-org/api/client-go/snippets.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/snippets.go rename to vendor/gitlab.com/gitlab-org/api/client-go/snippets.go diff --git a/vendor/github.com/xanzy/go-gitlab/strings.go b/vendor/gitlab.com/gitlab-org/api/client-go/strings.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/strings.go rename to vendor/gitlab.com/gitlab-org/api/client-go/strings.go diff --git a/vendor/github.com/xanzy/go-gitlab/system_hooks.go b/vendor/gitlab.com/gitlab-org/api/client-go/system_hooks.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/system_hooks.go rename to vendor/gitlab.com/gitlab-org/api/client-go/system_hooks.go diff --git a/vendor/github.com/xanzy/go-gitlab/tags.go b/vendor/gitlab.com/gitlab-org/api/client-go/tags.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/tags.go rename to vendor/gitlab.com/gitlab-org/api/client-go/tags.go diff --git a/vendor/github.com/xanzy/go-gitlab/time_stats.go b/vendor/gitlab.com/gitlab-org/api/client-go/time_stats.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/time_stats.go rename to vendor/gitlab.com/gitlab-org/api/client-go/time_stats.go diff --git a/vendor/github.com/xanzy/go-gitlab/todos.go b/vendor/gitlab.com/gitlab-org/api/client-go/todos.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/todos.go rename to vendor/gitlab.com/gitlab-org/api/client-go/todos.go diff --git a/vendor/github.com/xanzy/go-gitlab/topics.go b/vendor/gitlab.com/gitlab-org/api/client-go/topics.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/topics.go rename to vendor/gitlab.com/gitlab-org/api/client-go/topics.go diff --git a/vendor/github.com/xanzy/go-gitlab/types.go b/vendor/gitlab.com/gitlab-org/api/client-go/types.go similarity index 97% rename from vendor/github.com/xanzy/go-gitlab/types.go rename to vendor/gitlab.com/gitlab-org/api/client-go/types.go index d3a9ecab4..a7cabc1ae 100644 --- a/vendor/github.com/xanzy/go-gitlab/types.go +++ b/vendor/gitlab.com/gitlab-org/api/client-go/types.go @@ -1002,3 +1002,19 @@ func (t *BoolValue) UnmarshalJSON(b []byte) error { return err } } + +// CIPipelineVariablesMinimumOverrideRoleValue represents an access control +// value used for managing access to the CI Pipeline Variable Override feature. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/projects.html +type CIPipelineVariablesMinimumOverrideRoleValue = string + +// List of available CIPipelineVariablesMinimumOverrideRoleValue values. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/projects.html +const ( + CIPipelineVariablesNoOneAllowedRole CIPipelineVariablesMinimumOverrideRoleValue = "no_one_allowed" + CiPipelineVariablesOwnerRole CIPipelineVariablesMinimumOverrideRoleValue = "owner" + CiPipelineVariablesMaintainerRole CIPipelineVariablesMinimumOverrideRoleValue = "maintainer" + CIPipelineVariablesDeveloperRole CIPipelineVariablesMinimumOverrideRoleValue = "developer" +) diff --git a/vendor/github.com/xanzy/go-gitlab/users.go b/vendor/gitlab.com/gitlab-org/api/client-go/users.go similarity index 98% rename from vendor/github.com/xanzy/go-gitlab/users.go rename to vendor/gitlab.com/gitlab-org/api/client-go/users.go index f85667802..5eee42833 100644 --- a/vendor/github.com/xanzy/go-gitlab/users.go +++ b/vendor/gitlab.com/gitlab-org/api/client-go/users.go @@ -1553,12 +1553,21 @@ func (s *UsersService) CreateUserRunner(opts *CreateUserRunnerOptions, options . return r, resp, nil } + +// CreateServiceAccountUserOptions represents the available CreateServiceAccountUser() options. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/user_service_accounts.html#create-a-service-account-user +type CreateServiceAccountUserOptions struct { + Name *string `url:"name,omitempty" json:"name,omitempty"` + Username *string `url:"username,omitempty" json:"username,omitempty"` +} + // CreateServiceAccountUser creates a new service account user. // // GitLab API docs: // https://docs.gitlab.com/ee/api/users.html#create-service-account-user -func (s *UsersService) CreateServiceAccountUser(options ...RequestOptionFunc) (*User, *Response, error) { - req, err := s.client.NewRequest(http.MethodPost, "service_accounts", nil, options) +func (s *UsersService) CreateServiceAccountUser(opts *CreateServiceAccountUserOptions, options ...RequestOptionFunc) (*User, *Response, error) { + req, err := s.client.NewRequest(http.MethodPost, "service_accounts", opts, options) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/xanzy/go-gitlab/validate.go b/vendor/gitlab.com/gitlab-org/api/client-go/validate.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/validate.go rename to vendor/gitlab.com/gitlab-org/api/client-go/validate.go diff --git a/vendor/github.com/xanzy/go-gitlab/version.go b/vendor/gitlab.com/gitlab-org/api/client-go/version.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/version.go rename to vendor/gitlab.com/gitlab-org/api/client-go/version.go diff --git a/vendor/github.com/xanzy/go-gitlab/wikis.go b/vendor/gitlab.com/gitlab-org/api/client-go/wikis.go similarity index 100% rename from vendor/github.com/xanzy/go-gitlab/wikis.go rename to vendor/gitlab.com/gitlab-org/api/client-go/wikis.go diff --git a/vendor/modules.txt b/vendor/modules.txt index b02480118..75730c274 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -416,12 +416,12 @@ github.com/tektoncd/pipeline/pkg/substitution # github.com/x448/float16 v0.8.4 ## explicit; go 1.11 github.com/x448/float16 -# github.com/xanzy/go-gitlab v0.113.0 -## explicit; go 1.19 -github.com/xanzy/go-gitlab # github.com/xlzd/gotp v0.1.0 ## explicit; go 1.17 github.com/xlzd/gotp +# gitlab.com/gitlab-org/api/client-go v0.116.0 +## explicit; go 1.19 +gitlab.com/gitlab-org/api/client-go # go.opencensus.io v0.24.0 ## explicit; go 1.13 go.opencensus.io