diff --git a/go.mod b/go.mod index 899111bac..1a52d142d 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/hybrid-cloud-patterns/patterns-operator go 1.24.6 require ( - code.gitea.io/sdk/gitea v0.22.1 + code.gitea.io/sdk/gitea v0.23.2 github.com/Masterminds/semver/v3 v3.4.0 github.com/argoproj-labs/argocd-operator v0.15.0 github.com/bradleyfalzon/ghinstallation/v2 v2.17.0 @@ -11,8 +11,8 @@ require ( github.com/go-git/go-git/v5 v5.16.5 github.com/go-logr/logr v1.4.3 github.com/google/uuid v1.6.0 - github.com/onsi/ginkgo/v2 v2.27.4 - github.com/onsi/gomega v1.39.0 + github.com/onsi/ginkgo/v2 v2.28.1 + github.com/onsi/gomega v1.39.1 github.com/openshift/api v3.9.1-0.20190916204813-cdbe64fb0c91+incompatible github.com/openshift/client-go v0.0.0-20240115204758-e6bf7d631d5e // release-4.16 github.com/operator-framework/api v0.33.0 @@ -108,7 +108,7 @@ require ( github.com/google/go-github/v66 v66.0.0 // indirect github.com/google/go-github/v75 v75.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 // indirect + github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect @@ -185,7 +185,7 @@ require ( golang.org/x/term v0.39.0 // indirect golang.org/x/text v0.33.0 // indirect golang.org/x/time v0.12.0 // indirect - golang.org/x/tools v0.40.0 // indirect + golang.org/x/tools v0.41.0 // indirect golang.org/x/tools/go/expect v0.1.1-deprecated // indirect golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 57095a782..42bd0f6db 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= -code.gitea.io/sdk/gitea v0.22.1 h1:7K05KjRORyTcTYULQ/AwvlVS6pawLcWyXZcTr7gHFyA= -code.gitea.io/sdk/gitea v0.22.1/go.mod h1:yyF5+GhljqvA30sRDreoyHILruNiy4ASufugzYg0VHM= +code.gitea.io/sdk/gitea v0.23.2 h1:iJB1FDmLegwfwjX8gotBDHdPSbk/ZR8V9VmEJaVsJYg= +code.gitea.io/sdk/gitea v0.23.2/go.mod h1:yyF5+GhljqvA30sRDreoyHILruNiy4ASufugzYg0VHM= dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= github.com/42wim/httpsig v1.2.3 h1:xb0YyWhkYj57SPtfSttIobJUPJZB9as1nsfo7KWVcEs= @@ -252,8 +252,8 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 h1:ZI8gCoCjGzPsum4L21jHdQs8shFBIQih1TM9Rd/c+EQ= -github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -357,8 +357,8 @@ github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8Ay github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= -github.com/onsi/ginkgo/v2 v2.27.4 h1:fcEcQW/A++6aZAZQNUmNjvA9PSOzefMJBerHJ4t8v8Y= -github.com/onsi/ginkgo/v2 v2.27.4/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/ginkgo/v2 v2.28.1 h1:S4hj+HbZp40fNKuLUQOYLDgZLwNUVn19N3Atb98NCyI= +github.com/onsi/ginkgo/v2 v2.28.1/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= @@ -369,8 +369,8 @@ github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= github.com/onsi/gomega v1.25.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= -github.com/onsi/gomega v1.39.0 h1:y2ROC3hKFmQZJNFeGAMeHZKkjBL65mIZcvrLQBF9k6Q= -github.com/onsi/gomega v1.39.0/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4= +github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28= +github.com/onsi/gomega v1.39.1/go.mod h1:hL6yVALoTOxeWudERyfppUcZXjMwIMLnuSfruD2lcfg= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= @@ -635,8 +635,8 @@ golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= -golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA= -golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc= +golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= +golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= diff --git a/vendor/code.gitea.io/sdk/gitea/action_run.go b/vendor/code.gitea.io/sdk/gitea/action_run.go new file mode 100644 index 000000000..eb3b6697e --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/action_run.go @@ -0,0 +1,279 @@ +// Copyright 2025 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "fmt" + "net/url" + "time" +) + +// ActionTask represents a workflow run task (from /actions/tasks endpoint) +// This is the format returned by older Gitea versions +type ActionTask struct { + ID int64 `json:"id"` + Name string `json:"name"` // Workflow name + HeadBranch string `json:"head_branch"` + HeadSHA string `json:"head_sha"` + RunNumber int64 `json:"run_number"` + Event string `json:"event"` + DisplayTitle string `json:"display_title"` // PR title or commit message + Status string `json:"status"` + WorkflowID string `json:"workflow_id"` // e.g. "ci.yml" + URL string `json:"url"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + RunStartedAt time.Time `json:"run_started_at"` +} + +// ActionTaskResponse holds the response for listing action tasks +type ActionTaskResponse struct { + TotalCount int64 `json:"total_count"` + WorkflowRuns []*ActionTask `json:"workflow_runs"` +} + +// ActionWorkflowRun represents a workflow run (from /actions/runs endpoint) +// This is the format returned by newer Gitea versions +type ActionWorkflowRun struct { + ID int64 `json:"id"` + DisplayTitle string `json:"display_title"` + Event string `json:"event"` + HeadBranch string `json:"head_branch"` + HeadSha string `json:"head_sha"` + Path string `json:"path"` + RunAttempt int64 `json:"run_attempt"` + RunNumber int64 `json:"run_number"` + Status string `json:"status"` + Conclusion string `json:"conclusion"` + URL string `json:"url"` + HTMLURL string `json:"html_url"` + StartedAt time.Time `json:"started_at"` + CompletedAt time.Time `json:"completed_at"` + Actor *User `json:"actor"` + TriggerActor *User `json:"trigger_actor"` + Repository *Repository `json:"repository"` + HeadRepository *Repository `json:"head_repository"` + RepositoryID int64 `json:"repository_id"` +} + +// ActionWorkflowRunsResponse holds the response for listing workflow runs +type ActionWorkflowRunsResponse struct { + TotalCount int64 `json:"total_count"` + WorkflowRuns []*ActionWorkflowRun `json:"workflow_runs"` +} + +// ActionWorkflowJob represents a job within a workflow run +type ActionWorkflowJob struct { + ID int64 `json:"id"` + RunID int64 `json:"run_id"` + RunURL string `json:"run_url"` + RunAttempt int64 `json:"run_attempt"` + Name string `json:"name"` + HeadBranch string `json:"head_branch"` + HeadSha string `json:"head_sha"` + Status string `json:"status"` + Conclusion string `json:"conclusion"` + URL string `json:"url"` + HTMLURL string `json:"html_url"` + CreatedAt time.Time `json:"created_at"` + StartedAt time.Time `json:"started_at"` + CompletedAt time.Time `json:"completed_at"` + RunnerID int64 `json:"runner_id"` + RunnerName string `json:"runner_name"` + Labels []string `json:"labels"` + Steps []*ActionWorkflowStep `json:"steps"` +} + +// ActionWorkflowJobsResponse holds the response for listing workflow jobs +type ActionWorkflowJobsResponse struct { + TotalCount int64 `json:"total_count"` + Jobs []*ActionWorkflowJob `json:"jobs"` +} + +// ActionWorkflowStep represents a step within a job +type ActionWorkflowStep struct { + Name string `json:"name"` + Number int64 `json:"number"` + Status string `json:"status"` + Conclusion string `json:"conclusion"` + StartedAt time.Time `json:"started_at"` + CompletedAt time.Time `json:"completed_at"` +} + +// ListRepoActionRunsOptions options for listing repository action runs +type ListRepoActionRunsOptions struct { + ListOptions + Branch string // Filter by branch + Event string // Filter by triggering event + Status string // Filter by status (pending, queued, in_progress, failure, success, skipped) + Actor string // Filter by actor (user who triggered the run) + HeadSHA string // Filter by the SHA of the head commit +} + +// QueryEncode encodes the options to URL query parameters +func (opt *ListRepoActionRunsOptions) QueryEncode() string { + query := opt.getURLQuery() + if opt.Branch != "" { + query.Add("branch", opt.Branch) + } + if opt.Event != "" { + query.Add("event", opt.Event) + } + if opt.Status != "" { + query.Add("status", opt.Status) + } + if opt.Actor != "" { + query.Add("actor", opt.Actor) + } + if opt.HeadSHA != "" { + query.Add("head_sha", opt.HeadSHA) + } + return query.Encode() +} + +// ListRepoActionJobsOptions options for listing repository action jobs +type ListRepoActionJobsOptions struct { + ListOptions + Status string // Filter by status (pending, queued, in_progress, failure, success, skipped) +} + +// QueryEncode encodes the options to URL query parameters +func (opt *ListRepoActionJobsOptions) QueryEncode() string { + query := opt.getURLQuery() + if opt.Status != "" { + query.Add("status", opt.Status) + } + return query.Encode() +} + +// ListRepoActionRuns lists workflow runs for a repository. +// Requires Gitea 1.25.0 or later. For older versions, use ListRepoActionTasks. +func (c *Client) ListRepoActionRuns(owner, repo string, opt ListRepoActionRunsOptions) (*ActionWorkflowRunsResponse, *Response, error) { + if err := c.checkServerVersionGreaterThanOrEqual(version1_25_0); err != nil { + return nil, nil, err + } + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + opt.setDefaults() + + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/actions/runs", owner, repo)) + link.RawQuery = opt.QueryEncode() + + resp := new(ActionWorkflowRunsResponse) + response, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, resp) + return resp, response, err +} + +// GetRepoActionRun gets a single workflow run. +// Requires Gitea 1.25.0 or later. +func (c *Client) GetRepoActionRun(owner, repo string, runID int64) (*ActionWorkflowRun, *Response, error) { + if err := c.checkServerVersionGreaterThanOrEqual(version1_25_0); err != nil { + return nil, nil, err + } + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + + run := new(ActionWorkflowRun) + resp, err := c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/actions/runs/%d", owner, repo, runID), jsonHeader, nil, run) + return run, resp, err +} + +// ListRepoActionRunJobs lists jobs for a workflow run. +// Requires Gitea 1.25.0 or later. +func (c *Client) ListRepoActionRunJobs(owner, repo string, runID int64, opt ListRepoActionJobsOptions) (*ActionWorkflowJobsResponse, *Response, error) { + if err := c.checkServerVersionGreaterThanOrEqual(version1_25_0); err != nil { + return nil, nil, err + } + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + opt.setDefaults() + + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/actions/runs/%d/jobs", owner, repo, runID)) + link.RawQuery = opt.QueryEncode() + + resp := new(ActionWorkflowJobsResponse) + response, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, resp) + return resp, response, err +} + +// ListRepoActionJobs lists all jobs for a repository. +// Requires Gitea 1.25.0 or later. +func (c *Client) ListRepoActionJobs(owner, repo string, opt ListRepoActionJobsOptions) (*ActionWorkflowJobsResponse, *Response, error) { + if err := c.checkServerVersionGreaterThanOrEqual(version1_25_0); err != nil { + return nil, nil, err + } + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + opt.setDefaults() + + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/actions/jobs", owner, repo)) + link.RawQuery = opt.QueryEncode() + + resp := new(ActionWorkflowJobsResponse) + response, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, resp) + return resp, response, err +} + +// GetRepoActionJob gets a single job. +// Requires Gitea 1.25.0 or later. +func (c *Client) GetRepoActionJob(owner, repo string, jobID int64) (*ActionWorkflowJob, *Response, error) { + if err := c.checkServerVersionGreaterThanOrEqual(version1_25_0); err != nil { + return nil, nil, err + } + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + + job := new(ActionWorkflowJob) + resp, err := c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/actions/jobs/%d", owner, repo, jobID), jsonHeader, nil, job) + return job, resp, err +} + +// GetRepoActionJobLogs gets the logs for a specific job. +// Requires Gitea 1.25.0 or later. +func (c *Client) GetRepoActionJobLogs(owner, repo string, jobID int64) ([]byte, *Response, error) { + if err := c.checkServerVersionGreaterThanOrEqual(version1_25_0); err != nil { + return nil, nil, err + } + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + + return c.getResponse("GET", fmt.Sprintf("/repos/%s/%s/actions/jobs/%d/logs", owner, repo, jobID), nil, nil) +} + +// ListRepoActionTasks lists workflow tasks for a repository (Gitea 1.24.x and earlier) +// Use this for older Gitea versions that don't have /actions/runs endpoint +func (c *Client) ListRepoActionTasks(owner, repo string, opt ListOptions) (*ActionTaskResponse, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + opt.setDefaults() + + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/actions/tasks", owner, repo)) + link.RawQuery = opt.getURLQuery().Encode() + + resp := new(ActionTaskResponse) + response, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, resp) + return resp, response, err +} + +// DeleteRepoActionRun deletes a workflow run. +// Requires Gitea 1.25.0 or later. +func (c *Client) DeleteRepoActionRun(owner, repo string, runID int64) (*Response, error) { + if err := c.checkServerVersionGreaterThanOrEqual(version1_25_0); err != nil { + return nil, err + } + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, err + } + + _, resp, err := c.getResponse("DELETE", fmt.Sprintf("/repos/%s/%s/actions/runs/%d", owner, repo, runID), jsonHeader, nil) + return resp, err +} diff --git a/vendor/code.gitea.io/sdk/gitea/activity.go b/vendor/code.gitea.io/sdk/gitea/activity.go new file mode 100644 index 000000000..01dbf9f46 --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/activity.go @@ -0,0 +1,24 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import "time" + +// Activity represents a user or organization activity +type Activity struct { + ID int64 `json:"id"` + ActUserID int64 `json:"act_user_id"` + ActUser *User `json:"act_user"` + OpType string `json:"op_type"` + Content string `json:"content"` + RepoID int64 `json:"repo_id"` + Repo *Repository `json:"repo"` + CommentID int64 `json:"comment_id"` + Comment *Comment `json:"comment"` + RefName string `json:"ref_name"` + IsPrivate bool `json:"is_private"` + UserID int64 `json:"user_id"` + Created time.Time `json:"created"` +} diff --git a/vendor/code.gitea.io/sdk/gitea/activitypub.go b/vendor/code.gitea.io/sdk/gitea/activitypub.go new file mode 100644 index 000000000..82c278771 --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/activitypub.go @@ -0,0 +1,56 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "net/http" +) + +// ActivityPub represents an ActivityPub object +type ActivityPub map[string]interface{} + +// GetActivityPubPerson returns the Person actor for a user +func (c *Client) GetActivityPubPerson(userID int64) (ActivityPub, *Response, error) { + result := make(ActivityPub) + resp, err := c.getParsedResponse("GET", + fmt.Sprintf("/activitypub/user-id/%d", userID), + jsonHeader, nil, &result) + return result, resp, err +} + +// SendActivityPubInbox sends an ActivityPub message to a user's inbox +func (c *Client) SendActivityPubInbox(userID int64, activity ActivityPub) (*Response, error) { + body, err := json.Marshal(activity) + if err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("POST", + fmt.Sprintf("/activitypub/user-id/%d/inbox", userID), + jsonHeader, bytes.NewReader(body)) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// GetActivityPubPersonResponse returns the raw ActivityPub Person response +func (c *Client) GetActivityPubPersonResponse(userID int64) ([]byte, *Response, error) { + resp, err := c.doRequest("GET", + fmt.Sprintf("/activitypub/user-id/%d", userID), + jsonHeader, nil) + if err != nil { + return nil, resp, err + } + defer func() { _ = resp.Body.Close() }() + data, err := io.ReadAll(resp.Body) + return data, resp, err +} diff --git a/vendor/code.gitea.io/sdk/gitea/admin_badges.go b/vendor/code.gitea.io/sdk/gitea/admin_badges.go new file mode 100644 index 000000000..f9f2cc12e --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/admin_badges.go @@ -0,0 +1,79 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "bytes" + "encoding/json" + "fmt" + "net/http" +) + +// Badge represents a user badge +type Badge struct { + ID int64 `json:"id"` + Slug string `json:"slug"` + Description string `json:"description"` + ImageURL string `json:"image_url"` +} + +// ListUserBadges lists badges of a user +func (c *Client) ListUserBadges(username string) ([]*Badge, *Response, error) { + if err := escapeValidatePathSegments(&username); err != nil { + return nil, nil, err + } + badges := make([]*Badge, 0, 5) + resp, err := c.getParsedResponse("GET", + fmt.Sprintf("/admin/users/%s/badges", username), + jsonHeader, nil, &badges) + return badges, resp, err +} + +// UserBadgeOption represents options for adding badges to a user +type UserBadgeOption struct { + BadgeSlugs []string `json:"badge_slugs"` +} + +// AddUserBadges adds badges to a user by their slugs +func (c *Client) AddUserBadges(username string, opt UserBadgeOption) (*Response, error) { + if err := escapeValidatePathSegments(&username); err != nil { + return nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("POST", + fmt.Sprintf("/admin/users/%s/badges", username), + jsonHeader, bytes.NewReader(body)) + if err != nil { + return resp, err + } + if status != http.StatusNoContent && status != http.StatusCreated { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// DeleteUserBadge deletes a user's badge +func (c *Client) DeleteUserBadge(username string, opt UserBadgeOption) (*Response, error) { + if err := escapeValidatePathSegments(&username); err != nil { + return nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("DELETE", + fmt.Sprintf("/admin/users/%s/badges", username), + jsonHeader, bytes.NewReader(body)) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} diff --git a/vendor/code.gitea.io/sdk/gitea/admin_email.go b/vendor/code.gitea.io/sdk/gitea/admin_email.go new file mode 100644 index 000000000..063adb41c --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/admin_email.go @@ -0,0 +1,48 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "net/url" +) + +// ListAdminEmailsOptions options for listing all emails +type ListAdminEmailsOptions struct { + ListOptions +} + +// ListAdminEmails lists all email addresses +func (c *Client) ListAdminEmails(opt ListAdminEmailsOptions) ([]*Email, *Response, error) { + opt.setDefaults() + + link, _ := url.Parse("/admin/emails") + link.RawQuery = opt.getURLQuery().Encode() + + emails := make([]*Email, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &emails) + return emails, resp, err +} + +// SearchAdminEmailsOptions options for searching emails +type SearchAdminEmailsOptions struct { + ListOptions + Query string `json:"q,omitempty"` +} + +// SearchAdminEmails searches email addresses +func (c *Client) SearchAdminEmails(opt SearchAdminEmailsOptions) ([]*Email, *Response, error) { + opt.setDefaults() + + link, _ := url.Parse("/admin/emails/search") + query := opt.getURLQuery() + if opt.Query != "" { + query.Add("q", opt.Query) + } + link.RawQuery = query.Encode() + + emails := make([]*Email, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &emails) + return emails, resp, err +} diff --git a/vendor/code.gitea.io/sdk/gitea/admin_hooks.go b/vendor/code.gitea.io/sdk/gitea/admin_hooks.go new file mode 100644 index 000000000..aff01e73e --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/admin_hooks.go @@ -0,0 +1,80 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "bytes" + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +// ListAdminHooksOptions options for listing admin hooks +type ListAdminHooksOptions struct { + ListOptions + // Type of hooks to list: system, default, or all + Type string `json:"type,omitempty"` +} + +// ListAdminHooks lists all system webhooks +func (c *Client) ListAdminHooks(opt ListAdminHooksOptions) ([]*Hook, *Response, error) { + opt.setDefaults() + + link, _ := url.Parse("/admin/hooks") + query := opt.getURLQuery() + if opt.Type != "" { + query.Add("type", opt.Type) + } + link.RawQuery = query.Encode() + + hooks := make([]*Hook, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &hooks) + return hooks, resp, err +} + +// CreateAdminHook creates a system webhook +func (c *Client) CreateAdminHook(opt CreateHookOption) (*Hook, *Response, error) { + if err := opt.Validate(); err != nil { + return nil, nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, nil, err + } + hook := new(Hook) + resp, err := c.getParsedResponse("POST", "/admin/hooks", jsonHeader, bytes.NewReader(body), hook) + return hook, resp, err +} + +// GetAdminHook gets a system webhook by ID +func (c *Client) GetAdminHook(id int64) (*Hook, *Response, error) { + hook := new(Hook) + resp, err := c.getParsedResponse("GET", fmt.Sprintf("/admin/hooks/%d", id), jsonHeader, nil, hook) + return hook, resp, err +} + +// EditAdminHook edits a system webhook +func (c *Client) EditAdminHook(id int64, opt EditHookOption) (*Hook, *Response, error) { + body, err := json.Marshal(&opt) + if err != nil { + return nil, nil, err + } + hook := new(Hook) + resp, err := c.getParsedResponse("PATCH", fmt.Sprintf("/admin/hooks/%d", id), jsonHeader, bytes.NewReader(body), hook) + return hook, resp, err +} + +// DeleteAdminHook deletes a system webhook +func (c *Client) DeleteAdminHook(id int64) (*Response, error) { + status, resp, err := c.getStatusCode("DELETE", fmt.Sprintf("/admin/hooks/%d", id), jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} diff --git a/vendor/code.gitea.io/sdk/gitea/admin_repo.go b/vendor/code.gitea.io/sdk/gitea/admin_repo.go index 8666690cd..6f8fe298d 100644 --- a/vendor/code.gitea.io/sdk/gitea/admin_repo.go +++ b/vendor/code.gitea.io/sdk/gitea/admin_repo.go @@ -8,6 +8,7 @@ import ( "bytes" "encoding/json" "fmt" + "net/url" ) // AdminCreateRepo create a repo @@ -23,3 +24,45 @@ func (c *Client) AdminCreateRepo(user string, opt CreateRepoOption) (*Repository resp, err := c.getParsedResponse("POST", fmt.Sprintf("/admin/users/%s/repos", user), jsonHeader, bytes.NewReader(body), repo) return repo, resp, err } + +// ListUnadoptedReposOptions options for listing unadopted repositories +type ListUnadoptedReposOptions struct { + ListOptions + Pattern string `json:"pattern,omitempty"` +} + +// ListUnadoptedRepos lists unadopted repositories +func (c *Client) ListUnadoptedRepos(opt ListUnadoptedReposOptions) ([]string, *Response, error) { + opt.setDefaults() + + link, _ := url.Parse("/admin/unadopted") + query := opt.getURLQuery() + if opt.Pattern != "" { + query.Add("pattern", opt.Pattern) + } + link.RawQuery = query.Encode() + + repos := make([]string, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &repos) + return repos, resp, err +} + +// AdoptUnadoptedRepo adopts an unadopted repository +func (c *Client) AdoptUnadoptedRepo(owner, repo string) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, err + } + return c.doRequestWithStatusHandle("POST", + fmt.Sprintf("/admin/unadopted/%s/%s", owner, repo), + jsonHeader, nil) +} + +// DeleteUnadoptedRepo deletes an unadopted repository +func (c *Client) DeleteUnadoptedRepo(owner, repo string) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, err + } + return c.doRequestWithStatusHandle("DELETE", + fmt.Sprintf("/admin/unadopted/%s/%s", owner, repo), + jsonHeader, nil) +} diff --git a/vendor/code.gitea.io/sdk/gitea/admin_user.go b/vendor/code.gitea.io/sdk/gitea/admin_user.go index e49dbbdc0..4741d2b4b 100644 --- a/vendor/code.gitea.io/sdk/gitea/admin_user.go +++ b/vendor/code.gitea.io/sdk/gitea/admin_user.go @@ -14,13 +14,63 @@ import ( // AdminListUsersOptions options for listing admin users type AdminListUsersOptions struct { ListOptions + SourceID int64 + LoginName string + Query string + Sort string // "name", "created", "updated", "id" + Order string // "asc", "desc" + Visibility string + IsActive *bool + IsAdmin *bool + IsRestricted *bool + Is2FAEnabled *bool + IsProhibitLogin *bool +} + +// QueryEncode turns options into querystring argument +func (opt *AdminListUsersOptions) QueryEncode() string { + query := opt.getURLQuery() + if opt.SourceID > 0 { + query.Add("source_id", fmt.Sprintf("%d", opt.SourceID)) + } + if opt.LoginName != "" { + query.Add("login_name", opt.LoginName) + } + if opt.Query != "" { + query.Add("q", opt.Query) + } + if opt.Sort != "" { + query.Add("sort", opt.Sort) + } + if opt.Order != "" { + query.Add("order", opt.Order) + } + if opt.Visibility != "" { + query.Add("visibility", opt.Visibility) + } + if opt.IsActive != nil { + query.Add("is_active", fmt.Sprintf("%t", *opt.IsActive)) + } + if opt.IsAdmin != nil { + query.Add("is_admin", fmt.Sprintf("%t", *opt.IsAdmin)) + } + if opt.IsRestricted != nil { + query.Add("is_restricted", fmt.Sprintf("%t", *opt.IsRestricted)) + } + if opt.Is2FAEnabled != nil { + query.Add("is_2fa_enabled", fmt.Sprintf("%t", *opt.Is2FAEnabled)) + } + if opt.IsProhibitLogin != nil { + query.Add("is_prohibit_login", fmt.Sprintf("%t", *opt.IsProhibitLogin)) + } + return query.Encode() } // AdminListUsers lists all users func (c *Client) AdminListUsers(opt AdminListUsersOptions) ([]*User, *Response, error) { opt.setDefaults() users := make([]*User, 0, opt.PageSize) - resp, err := c.getParsedResponse("GET", fmt.Sprintf("/admin/users?%s", opt.getURLQuery().Encode()), nil, nil, &users) + resp, err := c.getParsedResponse("GET", fmt.Sprintf("/admin/users?%s", opt.QueryEncode()), nil, nil, &users) return users, resp, err } @@ -125,3 +175,22 @@ func (c *Client) AdminDeleteUserPublicKey(user string, keyID int) (*Response, er } return c.doRequestWithStatusHandle("DELETE", fmt.Sprintf("/admin/users/%s/keys/%d", user, keyID), nil, nil) } + +// RenameUserOption options for renaming a user +type RenameUserOption struct { + NewUsername string `json:"new_username"` +} + +// AdminRenameUser renames a user +func (c *Client) AdminRenameUser(username string, opt RenameUserOption) (*Response, error) { + if err := escapeValidatePathSegments(&username); err != nil { + return nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, err + } + return c.doRequestWithStatusHandle("POST", + fmt.Sprintf("/admin/users/%s/rename", username), + jsonHeader, bytes.NewReader(body)) +} diff --git a/vendor/code.gitea.io/sdk/gitea/issue_comment.go b/vendor/code.gitea.io/sdk/gitea/issue_comment.go index cafbc4a60..4510e89cc 100644 --- a/vendor/code.gitea.io/sdk/gitea/issue_comment.go +++ b/vendor/code.gitea.io/sdk/gitea/issue_comment.go @@ -151,3 +151,52 @@ func (c *Client) DeleteIssueComment(owner, repo string, commentID int64) (*Respo } return c.doRequestWithStatusHandle("DELETE", fmt.Sprintf("/repos/%s/%s/issues/comments/%d", owner, repo, commentID), nil, nil) } + +// ListIssueCommentAttachments lists all attachments for a comment +func (c *Client) ListIssueCommentAttachments(owner, repo string, commentID int64) ([]*Attachment, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + attachments := make([]*Attachment, 0, 10) + resp, err := c.getParsedResponse("GET", + fmt.Sprintf("/repos/%s/%s/issues/comments/%d/assets", owner, repo, commentID), + nil, nil, &attachments) + return attachments, resp, err +} + +// GetIssueCommentAttachment gets a comment attachment +func (c *Client) GetIssueCommentAttachment(owner, repo string, commentID, attachmentID int64) (*Attachment, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + attachment := new(Attachment) + resp, err := c.getParsedResponse("GET", + fmt.Sprintf("/repos/%s/%s/issues/comments/%d/assets/%d", owner, repo, commentID, attachmentID), + nil, nil, &attachment) + return attachment, resp, err +} + +// EditIssueCommentAttachment updates a comment attachment +func (c *Client) EditIssueCommentAttachment(owner, repo string, commentID, attachmentID int64, form EditAttachmentOptions) (*Attachment, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + body, err := json.Marshal(&form) + if err != nil { + return nil, nil, err + } + attachment := new(Attachment) + resp, err := c.getParsedResponse("PATCH", + fmt.Sprintf("/repos/%s/%s/issues/comments/%d/assets/%d", owner, repo, commentID, attachmentID), + jsonHeader, bytes.NewReader(body), attachment) + return attachment, resp, err +} + +// DeleteIssueCommentAttachment deletes a comment attachment +func (c *Client) DeleteIssueCommentAttachment(owner, repo string, commentID, attachmentID int64) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, err + } + return c.doRequestWithStatusHandle("DELETE", + fmt.Sprintf("/repos/%s/%s/issues/comments/%d/assets/%d", owner, repo, commentID, attachmentID), nil, nil) +} diff --git a/vendor/code.gitea.io/sdk/gitea/issue_ext.go b/vendor/code.gitea.io/sdk/gitea/issue_ext.go new file mode 100644 index 000000000..78c58d5b9 --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/issue_ext.go @@ -0,0 +1,191 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "bytes" + "encoding/json" + "fmt" + "net/http" + "net/url" + "time" +) + +// IssueBlockedBy represents an issue that blocks another issue +type IssueBlockedBy struct { + Index int64 `json:"index"` + Title string `json:"title"` + State string `json:"state"` + CreatedAt time.Time `json:"created_at"` +} + +// ListIssueBlocksOptions options for listing issue blocks +type ListIssueBlocksOptions struct { + ListOptions +} + +// ListIssueBlocks lists issues that are blocked by the specified issue with pagination +func (c *Client) ListIssueBlocks(owner, repo string, index int64, opt ListIssueBlocksOptions) ([]*Issue, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/issues/%d/blocks", owner, repo, index)) + opt.setDefaults() + link.RawQuery = opt.getURLQuery().Encode() + issues := make([]*Issue, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &issues) + return issues, resp, err +} + +// IssueMeta represents issue reference for blocking/dependency operations +type IssueMeta struct { + Index int64 `json:"index"` +} + +// CreateIssueBlocking blocks an issue with another issue +func (c *Client) CreateIssueBlocking(owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, nil, err + } + issue := new(Issue) + resp, err := c.getParsedResponse("POST", + fmt.Sprintf("/repos/%s/%s/issues/%d/blocks", owner, repo, index), + jsonHeader, bytes.NewReader(body), &issue) + return issue, resp, err +} + +// RemoveIssueBlocking removes an issue block +func (c *Client) RemoveIssueBlocking(owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, nil, err + } + issue := new(Issue) + resp, err := c.getParsedResponse("DELETE", + fmt.Sprintf("/repos/%s/%s/issues/%d/blocks", owner, repo, index), + jsonHeader, bytes.NewReader(body), &issue) + return issue, resp, err +} + +// ListIssueDependenciesOptions options for listing issue dependencies +type ListIssueDependenciesOptions struct { + ListOptions +} + +// ListIssueDependencies lists issues that block the specified issue (its dependencies) with pagination +func (c *Client) ListIssueDependencies(owner, repo string, index int64, opt ListIssueDependenciesOptions) ([]*Issue, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/issues/%d/dependencies", owner, repo, index)) + opt.setDefaults() + link.RawQuery = opt.getURLQuery().Encode() + issues := make([]*Issue, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &issues) + return issues, resp, err +} + +// CreateIssueDependency creates a new issue dependency +func (c *Client) CreateIssueDependency(owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, nil, err + } + issue := new(Issue) + resp, err := c.getParsedResponse("POST", + fmt.Sprintf("/repos/%s/%s/issues/%d/dependencies", owner, repo, index), + jsonHeader, bytes.NewReader(body), &issue) + return issue, resp, err +} + +// RemoveIssueDependency removes an issue dependency +func (c *Client) RemoveIssueDependency(owner, repo string, index int64, opt IssueMeta) (*Issue, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, nil, err + } + issue := new(Issue) + resp, err := c.getParsedResponse("DELETE", + fmt.Sprintf("/repos/%s/%s/issues/%d/dependencies", owner, repo, index), + jsonHeader, bytes.NewReader(body), &issue) + return issue, resp, err +} + +// LockIssueOption represents options for locking an issue +type LockIssueOption struct { + LockReason string `json:"lock_reason"` +} + +// LockIssue locks an issue +func (c *Client) LockIssue(owner, repo string, index int64, opt LockIssueOption) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("PUT", + fmt.Sprintf("/repos/%s/%s/issues/%d/lock", owner, repo, index), + jsonHeader, bytes.NewReader(body)) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// UnlockIssue unlocks an issue +func (c *Client) UnlockIssue(owner, repo string, index int64) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("DELETE", + fmt.Sprintf("/repos/%s/%s/issues/%d/lock", owner, repo, index), + jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// EditDeadlineOption represents options for updating issue deadline +type EditDeadlineOption struct { + Deadline *time.Time `json:"due_date"` +} + +// UpdateIssueDeadline updates an issue's deadline +func (c *Client) UpdateIssueDeadline(owner, repo string, index int64, opt EditDeadlineOption) (*Issue, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, nil, err + } + issue := new(Issue) + resp, err := c.getParsedResponse("POST", + fmt.Sprintf("/repos/%s/%s/issues/%d/deadline", owner, repo, index), + jsonHeader, bytes.NewReader(body), &issue) + return issue, resp, err +} diff --git a/vendor/code.gitea.io/sdk/gitea/issue_pin.go b/vendor/code.gitea.io/sdk/gitea/issue_pin.go new file mode 100644 index 000000000..bd5d426f5 --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/issue_pin.go @@ -0,0 +1,73 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "fmt" + "net/http" +) + +// ListRepoPinnedIssues lists a repo's pinned issues +func (c *Client) ListRepoPinnedIssues(owner, repo string) ([]*Issue, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + issues := make([]*Issue, 0, 5) + resp, err := c.getParsedResponse("GET", + fmt.Sprintf("/repos/%s/%s/issues/pinned", owner, repo), + jsonHeader, nil, &issues) + return issues, resp, err +} + +// PinIssue pins an issue +func (c *Client) PinIssue(owner, repo string, index int64) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("POST", + fmt.Sprintf("/repos/%s/%s/issues/%d/pin", owner, repo, index), + jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// UnpinIssue unpins an issue +func (c *Client) UnpinIssue(owner, repo string, index int64) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("DELETE", + fmt.Sprintf("/repos/%s/%s/issues/%d/pin", owner, repo, index), + jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// MoveIssuePin moves a pinned issue to the given position +func (c *Client) MoveIssuePin(owner, repo string, index, position int64) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("PATCH", + fmt.Sprintf("/repos/%s/%s/issues/%d/pin/%d", owner, repo, index, position), + jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} diff --git a/vendor/code.gitea.io/sdk/gitea/issue_reaction.go b/vendor/code.gitea.io/sdk/gitea/issue_reaction.go index 6c79faffe..ed7eb211d 100644 --- a/vendor/code.gitea.io/sdk/gitea/issue_reaction.go +++ b/vendor/code.gitea.io/sdk/gitea/issue_reaction.go @@ -8,6 +8,7 @@ import ( "bytes" "encoding/json" "fmt" + "net/url" "time" ) @@ -18,13 +19,28 @@ type Reaction struct { Created time.Time `json:"created_at"` } +// ListIssueReactionsOptions options for listing issue reactions +type ListIssueReactionsOptions struct { + ListOptions +} + // GetIssueReactions get a list reactions of an issue +// +// Deprecated: Use ListIssueReactions instead, which supports pagination. func (c *Client) GetIssueReactions(owner, repo string, index int64) ([]*Reaction, *Response, error) { + return c.ListIssueReactions(owner, repo, index, ListIssueReactionsOptions{}) +} + +// ListIssueReactions get a list of reactions for an issue with pagination +func (c *Client) ListIssueReactions(owner, repo string, index int64, opt ListIssueReactionsOptions) ([]*Reaction, *Response, error) { if err := escapeValidatePathSegments(&owner, &repo); err != nil { return nil, nil, err } - reactions := make([]*Reaction, 0, 10) - resp, err := c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/issues/%d/reactions", owner, repo, index), nil, nil, &reactions) + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/issues/%d/reactions", owner, repo, index)) + opt.setDefaults() + link.RawQuery = opt.getURLQuery().Encode() + reactions := make([]*Reaction, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), nil, nil, &reactions) return reactions, resp, err } diff --git a/vendor/code.gitea.io/sdk/gitea/issue_stopwatch.go b/vendor/code.gitea.io/sdk/gitea/issue_stopwatch.go index 72f0d7a32..51d39f44c 100644 --- a/vendor/code.gitea.io/sdk/gitea/issue_stopwatch.go +++ b/vendor/code.gitea.io/sdk/gitea/issue_stopwatch.go @@ -6,6 +6,7 @@ package gitea import ( "fmt" + "net/url" "time" ) @@ -20,10 +21,25 @@ type StopWatch struct { RepoName string `json:"repo_name"` } +// ListStopwatchesOptions options for listing stopwatches +type ListStopwatchesOptions struct { + ListOptions +} + // GetMyStopwatches list all stopwatches +// +// Deprecated: Use ListMyStopwatches instead, which supports pagination. func (c *Client) GetMyStopwatches() ([]*StopWatch, *Response, error) { - stopwatches := make([]*StopWatch, 0, 1) - resp, err := c.getParsedResponse("GET", "/user/stopwatches", nil, nil, &stopwatches) + return c.ListMyStopwatches(ListStopwatchesOptions{}) +} + +// ListMyStopwatches list all stopwatches with pagination +func (c *Client) ListMyStopwatches(opt ListStopwatchesOptions) ([]*StopWatch, *Response, error) { + link, _ := url.Parse("/user/stopwatches") + opt.setDefaults() + link.RawQuery = opt.getURLQuery().Encode() + stopwatches := make([]*StopWatch, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), nil, nil, &stopwatches) return stopwatches, resp, err } diff --git a/vendor/code.gitea.io/sdk/gitea/issue_subscription.go b/vendor/code.gitea.io/sdk/gitea/issue_subscription.go index 86853c718..e19ca883b 100644 --- a/vendor/code.gitea.io/sdk/gitea/issue_subscription.go +++ b/vendor/code.gitea.io/sdk/gitea/issue_subscription.go @@ -7,15 +7,31 @@ package gitea import ( "fmt" "net/http" + "net/url" ) +// ListIssueSubscribersOptions options for listing issue subscribers +type ListIssueSubscribersOptions struct { + ListOptions +} + // GetIssueSubscribers get list of users who subscribed on an issue +// +// Deprecated: Use ListIssueSubscribers instead, which supports pagination. func (c *Client) GetIssueSubscribers(owner, repo string, index int64) ([]*User, *Response, error) { + return c.ListIssueSubscribers(owner, repo, index, ListIssueSubscribersOptions{}) +} + +// ListIssueSubscribers get list of users who subscribed on an issue with pagination +func (c *Client) ListIssueSubscribers(owner, repo string, index int64, opt ListIssueSubscribersOptions) ([]*User, *Response, error) { if err := escapeValidatePathSegments(&owner, &repo); err != nil { return nil, nil, err } - subscribers := make([]*User, 0, 10) - resp, err := c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/issues/%d/subscriptions", owner, repo, index), nil, nil, &subscribers) + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/issues/%d/subscriptions", owner, repo, index)) + opt.setDefaults() + link.RawQuery = opt.getURLQuery().Encode() + subscribers := make([]*User, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), nil, nil, &subscribers) return subscribers, resp, err } diff --git a/vendor/code.gitea.io/sdk/gitea/issue_tracked_time.go b/vendor/code.gitea.io/sdk/gitea/issue_tracked_time.go index 164c1f0ee..286430d1d 100644 --- a/vendor/code.gitea.io/sdk/gitea/issue_tracked_time.go +++ b/vendor/code.gitea.io/sdk/gitea/issue_tracked_time.go @@ -67,9 +67,19 @@ func (c *Client) ListRepoTrackedTimes(owner, repo string, opt ListTrackedTimesOp } // GetMyTrackedTimes list tracked times of the current user +// +// Deprecated: Use ListMyTrackedTimes instead, which supports pagination and filtering. func (c *Client) GetMyTrackedTimes() ([]*TrackedTime, *Response, error) { - times := make([]*TrackedTime, 0, 10) - resp, err := c.getParsedResponse("GET", "/user/times", jsonHeader, nil, ×) + return c.ListMyTrackedTimes(ListTrackedTimesOptions{}) +} + +// ListMyTrackedTimes list tracked times of the current user with pagination and filtering +func (c *Client) ListMyTrackedTimes(opt ListTrackedTimesOptions) ([]*TrackedTime, *Response, error) { + link, _ := url.Parse("/user/times") + opt.setDefaults() + link.RawQuery = opt.QueryEncode() + times := make([]*TrackedTime, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, ×) return times, resp, err } diff --git a/vendor/code.gitea.io/sdk/gitea/miscellaneous.go b/vendor/code.gitea.io/sdk/gitea/miscellaneous.go new file mode 100644 index 000000000..8cc82d54a --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/miscellaneous.go @@ -0,0 +1,234 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "bytes" + "encoding/json" + "fmt" + "io" +) + +// GitignoreTemplateInfo represents a gitignore template +type GitignoreTemplateInfo struct { + Name string `json:"name"` + Source string `json:"source"` +} + +// LabelTemplate represents a label template +type LabelTemplate struct { + Name string `json:"name"` + Color string `json:"color"` + Description string `json:"description"` + Exclusive bool `json:"exclusive"` +} + +// LicensesTemplateListEntry represents a license in the list +type LicensesTemplateListEntry struct { + Key string `json:"key"` + Name string `json:"name"` + URL string `json:"url"` +} + +// LicenseTemplateInfo represents a license template +type LicenseTemplateInfo struct { + Key string `json:"key"` + Name string `json:"name"` + URL string `json:"url"` + Body string `json:"body"` + Implementation string `json:"implementation"` +} + +// MarkdownOption represents options for rendering markdown +type MarkdownOption struct { + Text string `json:"Text"` + Mode string `json:"Mode"` + Context string `json:"Context"` + Wiki bool `json:"Wiki"` +} + +// MarkupOption represents options for rendering markup +type MarkupOption struct { + Text string `json:"Text"` + Mode string `json:"Mode"` + Context string `json:"Context"` + FilePath string `json:"FilePath"` + Wiki bool `json:"Wiki"` +} + +// NodeInfo represents nodeinfo about the server +type NodeInfo struct { + Version string `json:"version"` + Software NodeInfoSoftware `json:"software"` + Protocols []string `json:"protocols"` + Services NodeInfoServices `json:"services"` + OpenRegistrations bool `json:"openRegistrations"` + Usage NodeInfoUsage `json:"usage"` + Metadata map[string]interface{} `json:"metadata"` +} + +// NodeInfoSoftware represents software information +type NodeInfoSoftware struct { + Name string `json:"name"` + Version string `json:"version"` + Repository string `json:"repository"` + Homepage string `json:"homepage"` +} + +// NodeInfoServices represents third party services +type NodeInfoServices struct { + Inbound []string `json:"inbound"` + Outbound []string `json:"outbound"` +} + +// NodeInfoUsage represents usage statistics +type NodeInfoUsage struct { + Users NodeInfoUsageUsers `json:"users"` + LocalPosts int64 `json:"localPosts"` + LocalComments int64 `json:"localComments"` +} + +// NodeInfoUsageUsers represents user statistics +type NodeInfoUsageUsers struct { + Total int64 `json:"total"` + ActiveHalfyear int64 `json:"activeHalfyear"` + ActiveMonth int64 `json:"activeMonth"` +} + +// ListGitignoresTemplates lists all gitignore templates +func (c *Client) ListGitignoresTemplates() ([]string, *Response, error) { + templates := make([]string, 0, 10) + resp, err := c.getParsedResponse("GET", "/gitignore/templates", jsonHeader, nil, &templates) + return templates, resp, err +} + +// GetGitignoreTemplateInfo gets information about a gitignore template +func (c *Client) GetGitignoreTemplateInfo(name string) (*GitignoreTemplateInfo, *Response, error) { + if err := escapeValidatePathSegments(&name); err != nil { + return nil, nil, err + } + template := new(GitignoreTemplateInfo) + resp, err := c.getParsedResponse("GET", + fmt.Sprintf("/gitignore/templates/%s", name), + jsonHeader, nil, &template) + return template, resp, err +} + +// ListLabelTemplates lists all label templates +func (c *Client) ListLabelTemplates() ([]string, *Response, error) { + templates := make([]string, 0, 10) + resp, err := c.getParsedResponse("GET", "/label/templates", jsonHeader, nil, &templates) + return templates, resp, err +} + +// GetLabelTemplate gets all labels in a template +func (c *Client) GetLabelTemplate(name string) ([]*LabelTemplate, *Response, error) { + if err := escapeValidatePathSegments(&name); err != nil { + return nil, nil, err + } + labels := make([]*LabelTemplate, 0, 10) + resp, err := c.getParsedResponse("GET", + fmt.Sprintf("/label/templates/%s", name), + jsonHeader, nil, &labels) + return labels, resp, err +} + +// ListLicenseTemplates lists all license templates +func (c *Client) ListLicenseTemplates() ([]*LicensesTemplateListEntry, *Response, error) { + licenses := make([]*LicensesTemplateListEntry, 0, 10) + resp, err := c.getParsedResponse("GET", "/licenses", jsonHeader, nil, &licenses) + return licenses, resp, err +} + +// GetLicenseTemplateInfo gets information about a license template +func (c *Client) GetLicenseTemplateInfo(name string) (*LicenseTemplateInfo, *Response, error) { + if err := escapeValidatePathSegments(&name); err != nil { + return nil, nil, err + } + license := new(LicenseTemplateInfo) + resp, err := c.getParsedResponse("GET", + fmt.Sprintf("/licenses/%s", name), + jsonHeader, nil, &license) + return license, resp, err +} + +// RenderMarkdown renders a markdown document as HTML +func (c *Client) RenderMarkdown(opt MarkdownOption) (string, *Response, error) { + body, err := json.Marshal(&opt) + if err != nil { + return "", nil, err + } + + resp, err := c.doRequest("POST", "/markdown", jsonHeader, bytes.NewReader(body)) + if err != nil { + return "", resp, err + } + defer func() { _ = resp.Body.Close() }() + + html, err := io.ReadAll(resp.Body) + return string(html), resp, err +} + +// RenderMarkdownRaw renders raw markdown as HTML +func (c *Client) RenderMarkdownRaw(markdown string) (string, *Response, error) { + resp, err := c.doRequest("POST", "/markdown/raw", + map[string][]string{"Content-Type": {"text/plain"}}, + bytes.NewReader([]byte(markdown))) + if err != nil { + return "", resp, err + } + defer func() { _ = resp.Body.Close() }() + + html, err := io.ReadAll(resp.Body) + return string(html), resp, err +} + +// RenderMarkup renders a markup document as HTML +func (c *Client) RenderMarkup(opt MarkupOption) (string, *Response, error) { + body, err := json.Marshal(&opt) + if err != nil { + return "", nil, err + } + + resp, err := c.doRequest("POST", "/markup", jsonHeader, bytes.NewReader(body)) + if err != nil { + return "", resp, err + } + defer func() { _ = resp.Body.Close() }() + + html, err := io.ReadAll(resp.Body) + return string(html), resp, err +} + +// GetNodeInfo gets the nodeinfo of the Gitea application +func (c *Client) GetNodeInfo() (*NodeInfo, *Response, error) { + nodeInfo := new(NodeInfo) + resp, err := c.getParsedResponse("GET", "/nodeinfo", jsonHeader, nil, &nodeInfo) + return nodeInfo, resp, err +} + +// GetSigningKeyGPG gets the default GPG signing key +func (c *Client) GetSigningKeyGPG() (string, *Response, error) { + resp, err := c.doRequest("GET", "/signing-key.gpg", nil, nil) + if err != nil { + return "", resp, err + } + defer func() { _ = resp.Body.Close() }() + + key, err := io.ReadAll(resp.Body) + return string(key), resp, err +} + +// GetSigningKeySSH gets the default SSH signing key +func (c *Client) GetSigningKeySSH() (string, *Response, error) { + resp, err := c.doRequest("GET", "/signing-key.pub", nil, nil) + if err != nil { + return "", resp, err + } + defer func() { _ = resp.Body.Close() }() + + key, err := io.ReadAll(resp.Body) + return string(key), resp, err +} diff --git a/vendor/code.gitea.io/sdk/gitea/org.go b/vendor/code.gitea.io/sdk/gitea/org.go index 729b638c7..59d143b89 100644 --- a/vendor/code.gitea.io/sdk/gitea/org.go +++ b/vendor/code.gitea.io/sdk/gitea/org.go @@ -9,18 +9,23 @@ import ( "bytes" "encoding/json" "fmt" + "net/url" ) // Organization represents an organization type Organization struct { - ID int64 `json:"id"` - UserName string `json:"username"` - FullName string `json:"full_name"` - AvatarURL string `json:"avatar_url"` - Description string `json:"description"` - Website string `json:"website"` - Location string `json:"location"` - Visibility string `json:"visibility"` + ID int64 `json:"id"` + Name string `json:"name"` + // Deprecated: Use Name instead. See https://github.com/go-gitea/gitea/blob/main/modules/structs/org.go#L29 + UserName string `json:"username"` + FullName string `json:"full_name"` + Email string `json:"email"` + AvatarURL string `json:"avatar_url"` + Description string `json:"description"` + Website string `json:"website"` + Location string `json:"location"` + Visibility string `json:"visibility"` + RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"` } // VisibleType defines the visibility @@ -42,6 +47,16 @@ type ListOrgsOptions struct { ListOptions } +// ListOrgs lists all public organizations +func (c *Client) ListOrgs(opt ListOrgsOptions) ([]*Organization, *Response, error) { + opt.setDefaults() + link, _ := url.Parse("/orgs") + link.RawQuery = opt.getURLQuery().Encode() + orgs := make([]*Organization, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), nil, nil, &orgs) + return orgs, resp, err +} + // ListMyOrgs list all of current user's organizations func (c *Client) ListMyOrgs(opt ListOrgsOptions) ([]*Organization, *Response, error) { opt.setDefaults() @@ -75,6 +90,7 @@ func (c *Client) GetOrg(orgname string) (*Organization, *Response, error) { type CreateOrgOption struct { Name string `json:"username"` FullName string `json:"full_name"` + Email string `json:"email"` Description string `json:"description"` Website string `json:"website"` Location string `json:"location"` @@ -114,11 +130,13 @@ func (c *Client) CreateOrg(opt CreateOrgOption) (*Organization, *Response, error // EditOrgOption options for editing an organization type EditOrgOption struct { - FullName string `json:"full_name"` - Description string `json:"description"` - Website string `json:"website"` - Location string `json:"location"` - Visibility VisibleType `json:"visibility"` + FullName string `json:"full_name"` + Email string `json:"email"` + Description string `json:"description"` + Website string `json:"website"` + Location string `json:"location"` + Visibility VisibleType `json:"visibility"` + RepoAdminChangeTeamAccess *bool `json:"repo_admin_change_team_access"` } // Validate the EditOrgOption struct diff --git a/vendor/code.gitea.io/sdk/gitea/org_block.go b/vendor/code.gitea.io/sdk/gitea/org_block.go new file mode 100644 index 000000000..4261ec898 --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/org_block.go @@ -0,0 +1,79 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "fmt" + "net/http" + "net/url" +) + +// ListOrgBlocksOptions options for listing organization blocks +type ListOrgBlocksOptions struct { + ListOptions +} + +// ListOrgBlocks lists users blocked by the organization +func (c *Client) ListOrgBlocks(org string, opt ListOrgBlocksOptions) ([]*User, *Response, error) { + if err := escapeValidatePathSegments(&org); err != nil { + return nil, nil, err + } + opt.setDefaults() + + link, _ := url.Parse(fmt.Sprintf("/orgs/%s/blocks", org)) + link.RawQuery = opt.getURLQuery().Encode() + + users := make([]*User, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &users) + return users, resp, err +} + +// CheckOrgBlock checks if a user is blocked by the organization +func (c *Client) CheckOrgBlock(org, username string) (bool, *Response, error) { + if err := escapeValidatePathSegments(&org, &username); err != nil { + return false, nil, err + } + status, resp, err := c.getStatusCode("GET", + fmt.Sprintf("/orgs/%s/blocks/%s", org, username), + jsonHeader, nil) + if err != nil { + return false, resp, err + } + return status == http.StatusNoContent, resp, nil +} + +// BlockOrgUser blocks a user from the organization +func (c *Client) BlockOrgUser(org, username string) (*Response, error) { + if err := escapeValidatePathSegments(&org, &username); err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("PUT", + fmt.Sprintf("/orgs/%s/blocks/%s", org, username), + jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// UnblockOrgUser unblocks a user from the organization +func (c *Client) UnblockOrgUser(org, username string) (*Response, error) { + if err := escapeValidatePathSegments(&org, &username); err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("DELETE", + fmt.Sprintf("/orgs/%s/blocks/%s", org, username), + jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} diff --git a/vendor/code.gitea.io/sdk/gitea/org_social.go b/vendor/code.gitea.io/sdk/gitea/org_social.go new file mode 100644 index 000000000..430fe94e9 --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/org_social.go @@ -0,0 +1,124 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "bytes" + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +// UpdateOrgAvatar updates the organization's avatar +func (c *Client) UpdateOrgAvatar(org string, opt UpdateUserAvatarOption) (*Response, error) { + if err := escapeValidatePathSegments(&org); err != nil { + return nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("POST", + fmt.Sprintf("/orgs/%s/avatar", org), + jsonHeader, bytes.NewReader(body)) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// DeleteOrgAvatar deletes the organization's avatar +func (c *Client) DeleteOrgAvatar(org string) (*Response, error) { + if err := escapeValidatePathSegments(&org); err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("DELETE", + fmt.Sprintf("/orgs/%s/avatar", org), + jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// RenameOrgOption options for renaming an organization +type RenameOrgOption struct { + NewName string `json:"new_name"` +} + +// RenameOrg renames an organization +func (c *Client) RenameOrg(org string, opt RenameOrgOption) (*Response, error) { + if err := escapeValidatePathSegments(&org); err != nil { + return nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("POST", + fmt.Sprintf("/orgs/%s/rename", org), + jsonHeader, bytes.NewReader(body)) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// ListOrgActivityFeedsOptions options for listing organization activity feeds +type ListOrgActivityFeedsOptions struct { + ListOptions + Date string `json:"date,omitempty"` +} + +// ListOrgActivityFeeds lists the organization's activity feeds +func (c *Client) ListOrgActivityFeeds(org string, opt ListOrgActivityFeedsOptions) ([]*Activity, *Response, error) { + if err := escapeValidatePathSegments(&org); err != nil { + return nil, nil, err + } + opt.setDefaults() + + link, _ := url.Parse(fmt.Sprintf("/orgs/%s/activities/feeds", org)) + query := opt.getURLQuery() + if opt.Date != "" { + query.Add("date", opt.Date) + } + link.RawQuery = query.Encode() + + activities := make([]*Activity, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &activities) + return activities, resp, err +} + +// ListTeamActivityFeedsOptions options for listing team activity feeds +type ListTeamActivityFeedsOptions struct { + ListOptions + Date string `json:"date,omitempty"` +} + +// ListTeamActivityFeeds lists the team's activity feeds +func (c *Client) ListTeamActivityFeeds(teamID int64, opt ListTeamActivityFeedsOptions) ([]*Activity, *Response, error) { + opt.setDefaults() + + link, _ := url.Parse(fmt.Sprintf("/teams/%d/activities/feeds", teamID)) + query := opt.getURLQuery() + if opt.Date != "" { + query.Add("date", opt.Date) + } + link.RawQuery = query.Encode() + + activities := make([]*Activity, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &activities) + return activities, resp, err +} diff --git a/vendor/code.gitea.io/sdk/gitea/package.go b/vendor/code.gitea.io/sdk/gitea/package.go index c55933c07..1a2c2cc81 100644 --- a/vendor/code.gitea.io/sdk/gitea/package.go +++ b/vendor/code.gitea.io/sdk/gitea/package.go @@ -90,3 +90,29 @@ func (c *Client) ListPackageFiles(owner, packageType, name, version string) ([]* resp, err := c.getParsedResponse("GET", fmt.Sprintf("/packages/%s/%s/%s/%s/files", owner, packageType, name, version), nil, nil, &packageFiles) return packageFiles, resp, err } + +// GetLatestPackage gets the details of the latest version of a package +func (c *Client) GetLatestPackage(owner, packageType, name string) (*Package, *Response, error) { + if err := escapeValidatePathSegments(&owner, &packageType, &name); err != nil { + return nil, nil, err + } + foundPackage := new(Package) + resp, err := c.getParsedResponse("GET", fmt.Sprintf("/packages/%s/%s/%s/-/latest", owner, packageType, name), nil, nil, foundPackage) + return foundPackage, resp, err +} + +// LinkPackage links a package to a repository +func (c *Client) LinkPackage(owner, packageType, name, repoName string) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &packageType, &name, &repoName); err != nil { + return nil, err + } + return c.doRequestWithStatusHandle("POST", fmt.Sprintf("/packages/%s/%s/%s/-/link/%s", owner, packageType, name, repoName), nil, nil) +} + +// UnlinkPackage unlinks a package from a repository +func (c *Client) UnlinkPackage(owner, packageType, name string) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &packageType, &name); err != nil { + return nil, err + } + return c.doRequestWithStatusHandle("POST", fmt.Sprintf("/packages/%s/%s/%s/-/unlink", owner, packageType, name), nil, nil) +} diff --git a/vendor/code.gitea.io/sdk/gitea/pull.go b/vendor/code.gitea.io/sdk/gitea/pull.go index 5c615869a..7da580492 100644 --- a/vendor/code.gitea.io/sdk/gitea/pull.go +++ b/vendor/code.gitea.io/sdk/gitea/pull.go @@ -25,20 +25,23 @@ type PRBranchInfo struct { // PullRequest represents a pull request type PullRequest struct { - ID int64 `json:"id"` - URL string `json:"url"` - Index int64 `json:"number"` - Poster *User `json:"user"` - Title string `json:"title"` - Body string `json:"body"` - Labels []*Label `json:"labels"` - Milestone *Milestone `json:"milestone"` - Assignee *User `json:"assignee"` - Assignees []*User `json:"assignees"` - State StateType `json:"state"` - Draft bool `json:"draft"` - IsLocked bool `json:"is_locked"` - Comments int `json:"comments"` + ID int64 `json:"id"` + URL string `json:"url"` + Index int64 `json:"number"` + Poster *User `json:"user"` + Title string `json:"title"` + Body string `json:"body"` + Labels []*Label `json:"labels"` + Milestone *Milestone `json:"milestone"` + Assignee *User `json:"assignee"` + Assignees []*User `json:"assignees"` + RequestedReviewers []*User `json:"requested_reviewers"` + RequestedReviewersTeams []*Team `json:"requested_reviewers_teams"` + State StateType `json:"state"` + Draft bool `json:"draft"` + IsLocked bool `json:"is_locked"` + Comments int `json:"comments"` + ReviewComments int `json:"review_comments,omitempty"` HTMLURL string `json:"html_url"` DiffURL string `json:"diff_url"` @@ -59,6 +62,11 @@ type PullRequest struct { Created *time.Time `json:"created_at"` Updated *time.Time `json:"updated_at"` Closed *time.Time `json:"closed_at"` + + Additions *int `json:"additions,omitempty"` + Deletions *int `json:"deletions,omitempty"` + ChangedFiles *int `json:"changed_files,omitempty"` + PinOrder int `json:"pin_order"` } // ChangedFile is a changed file in a diff diff --git a/vendor/code.gitea.io/sdk/gitea/repo.go b/vendor/code.gitea.io/sdk/gitea/repo.go index 3f8e7a998..f8d8a70d8 100644 --- a/vendor/code.gitea.io/sdk/gitea/repo.go +++ b/vendor/code.gitea.io/sdk/gitea/repo.go @@ -10,6 +10,7 @@ import ( "encoding/json" "fmt" "io" + "net/http" "net/url" "strings" "time" @@ -60,6 +61,13 @@ const ( ProjectsModeAll ProjectsMode = "all" ) +// RepoTransfer represents a pending repository transfer +type RepoTransfer struct { + Doer *User `json:"doer"` + Recipient *User `json:"recipient"` + Teams []*Team `json:"teams"` +} + // Repository represents a repository type Repository struct { ID int64 `json:"id"` @@ -74,7 +82,11 @@ type Repository struct { Parent *Repository `json:"parent"` Mirror bool `json:"mirror"` Size int `json:"size"` + Language string `json:"language"` + LanguagesURL string `json:"languages_url"` HTMLURL string `json:"html_url"` + URL string `json:"url"` + Link string `json:"link"` SSHURL string `json:"ssh_url"` CloneURL string `json:"clone_url"` OriginalURL string `json:"original_url"` @@ -87,10 +99,12 @@ type Repository struct { Releases int `json:"release_counter"` DefaultBranch string `json:"default_branch"` Archived bool `json:"archived"` + ArchivedAt time.Time `json:"archived_at"` Created time.Time `json:"created_at"` Updated time.Time `json:"updated_at"` Permissions *Permission `json:"permissions,omitempty"` HasIssues bool `json:"has_issues"` + HasCode bool `json:"has_code"` InternalTracker *InternalTracker `json:"internal_tracker,omitempty"` ExternalTracker *ExternalTracker `json:"external_tracker,omitempty"` HasWiki bool `json:"has_wiki"` @@ -105,7 +119,9 @@ type Repository struct { AllowMerge bool `json:"allow_merge_commits"` AllowRebase bool `json:"allow_rebase"` AllowRebaseMerge bool `json:"allow_rebase_explicit"` + AllowRebaseUpdate bool `json:"allow_rebase_update"` AllowSquash bool `json:"allow_squash_merge"` + DefaultAllowMaintainerEdit bool `json:"default_allow_maintainer_edit"` AvatarURL string `json:"avatar_url"` Internal bool `json:"internal"` MirrorInterval string `json:"mirror_interval"` @@ -114,6 +130,9 @@ type Repository struct { ProjectsMode *ProjectsMode `json:"projects_mode"` DefaultDeleteBranchAfterMerge bool `json:"default_delete_branch_after_merge"` ObjectFormatName string `json:"object_format_name"` + Topics []string `json:"topics"` + Licenses []string `json:"licenses"` + RepoTransfer *RepoTransfer `json:"repo_transfer,omitempty"` } // RepoType represent repo type @@ -574,3 +593,46 @@ func (c *Client) GetArchiveReader(owner, repo, ref string, ext ArchiveType) (io. return resp.Body, resp, nil } + +// UpdateRepoAvatarOption options for updating repository avatar +type UpdateRepoAvatarOption struct { + Image string `json:"image"` // base64 encoded image +} + +// UpdateRepoAvatar updates a repository's avatar +func (c *Client) UpdateRepoAvatar(owner, repo string, opt UpdateRepoAvatarOption) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, err + } + body, err := json.Marshal(&opt) + if err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("POST", + fmt.Sprintf("/repos/%s/%s/avatar", owner, repo), + jsonHeader, bytes.NewReader(body)) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// DeleteRepoAvatar deletes a repository's avatar +func (c *Client) DeleteRepoAvatar(owner, repo string) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("DELETE", + fmt.Sprintf("/repos/%s/%s/avatar", owner, repo), + jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} diff --git a/vendor/code.gitea.io/sdk/gitea/repo_action.go b/vendor/code.gitea.io/sdk/gitea/repo_action.go index 1764dbb4c..9c421c6eb 100644 --- a/vendor/code.gitea.io/sdk/gitea/repo_action.go +++ b/vendor/code.gitea.io/sdk/gitea/repo_action.go @@ -42,6 +42,25 @@ func (c *Client) ListRepoActionSecret(user, repo string, opt ListRepoActionSecre return secrets, resp, err } +// ListRepoActionVariableOption lists RepoActionVariable options +type ListRepoActionVariableOption struct { + ListOptions +} + +// ListRepoActionVariable lists a repository's action variables +func (c *Client) ListRepoActionVariable(user, repo string, opt ListRepoActionVariableOption) ([]*RepoActionVariable, *Response, error) { + if err := escapeValidatePathSegments(&user, &repo); err != nil { + return nil, nil, err + } + opt.setDefaults() + variables := make([]*RepoActionVariable, 0, opt.PageSize) + + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/actions/variables", user, repo)) + link.RawQuery = opt.getURLQuery().Encode() + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &variables) + return variables, resp, err +} + // CreateRepoActionSecret creates a secret for the specified repository in the Gitea Actions. // It takes the organization name and the secret options as parameters. // The function returns the HTTP response and an error, if any. diff --git a/vendor/code.gitea.io/sdk/gitea/repo_file_ext.go b/vendor/code.gitea.io/sdk/gitea/repo_file_ext.go new file mode 100644 index 000000000..111269810 --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/repo_file_ext.go @@ -0,0 +1,136 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "fmt" + "io" + "net/url" +) + +// ContentsExtResponse contains extended information about a repo's contents +type ContentsExtResponse struct { + DirContents []*ContentsResponse `json:"dir_contents,omitempty"` + FileContents *ContentsResponse `json:"file_contents,omitempty"` +} + +// GetContentsExtOptions options for getting extended contents +type GetContentsExtOptions struct { + // The name of the commit/branch/tag. Default to the repository's default branch + Ref string `json:"ref,omitempty"` + // Comma-separated includes options: file_content, lfs_metadata, commit_metadata, commit_message + Includes string `json:"includes,omitempty"` +} + +// GetContentsExt gets extended file metadata and/or content from a repository +// The extended "contents" API, to get file metadata and/or content, or list a directory +func (c *Client) GetContentsExt(owner, repo, filepath string, opt GetContentsExtOptions) (*ContentsExtResponse, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + + // filepath doesn't need escaping since it's already part of the path + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/contents-ext/%s", owner, repo, filepath)) + query := link.Query() + + if opt.Ref != "" { + query.Add("ref", opt.Ref) + } + if opt.Includes != "" { + query.Add("includes", opt.Includes) + } + + link.RawQuery = query.Encode() + + result := new(ContentsExtResponse) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, result) + return result, resp, err +} + +// GetEditorConfig gets the EditorConfig definitions of a file in a repository +func (c *Client) GetEditorConfig(owner, repo, filepath string, ref ...string) ([]byte, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/editorconfig/%s", owner, repo, filepath)) + + if len(ref) > 0 && ref[0] != "" { + query := link.Query() + query.Add("ref", ref[0]) + link.RawQuery = query.Encode() + } + + resp, err := c.doRequest("GET", link.String(), nil, nil) + if err != nil { + return nil, resp, err + } + defer func() { + if closeErr := resp.Body.Close(); closeErr != nil && err == nil { + err = closeErr + } + }() + + data, err := io.ReadAll(resp.Body) + return data, resp, err +} + +// GetRawFileOrLFS gets a file or its LFS object from a repository +// This endpoint resolves LFS pointers and returns actual LFS objects +func (c *Client) GetRawFileOrLFS(owner, repo, filepath string, ref ...string) ([]byte, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/media/%s", owner, repo, filepath)) + + if len(ref) > 0 && ref[0] != "" { + query := link.Query() + query.Add("ref", ref[0]) + link.RawQuery = query.Encode() + } + + resp, err := c.doRequest("GET", link.String(), nil, nil) + if err != nil { + return nil, resp, err + } + defer func() { + if closeErr := resp.Body.Close(); closeErr != nil && err == nil { + err = closeErr + } + }() + + data, err := io.ReadAll(resp.Body) + return data, resp, err +} + +// GetRawFile gets a file from a repository +// Unlike GetRawFileOrLFS, this does NOT resolve LFS pointers +func (c *Client) GetRawFile(owner, repo, filepath string, ref ...string) ([]byte, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/raw/%s", owner, repo, filepath)) + + if len(ref) > 0 && ref[0] != "" { + query := link.Query() + query.Add("ref", ref[0]) + link.RawQuery = query.Encode() + } + + resp, err := c.doRequest("GET", link.String(), nil, nil) + if err != nil { + return nil, resp, err + } + defer func() { + if closeErr := resp.Body.Close(); closeErr != nil && err == nil { + err = closeErr + } + }() + + data, err := io.ReadAll(resp.Body) + return data, resp, err +} diff --git a/vendor/code.gitea.io/sdk/gitea/repo_git_notes.go b/vendor/code.gitea.io/sdk/gitea/repo_git_notes.go new file mode 100644 index 000000000..fdc03ce63 --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/repo_git_notes.go @@ -0,0 +1,56 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "fmt" + "net/url" +) + +// Note represents a git note +type Note struct { + Message string `json:"message"` + Commit *Commit `json:"commit"` +} + +// GetRepoNoteOptions options for getting a note +type GetRepoNoteOptions struct { + // include verification for every commit (disable for speedup, default 'true') + Verification *bool `json:"verification,omitempty"` + // include a list of affected files for every commit (disable for speedup, default 'true') + Files *bool `json:"files,omitempty"` +} + +// GetRepoNote gets a note corresponding to a single commit from a repository +func (c *Client) GetRepoNote(owner, repo, sha string, opt GetRepoNoteOptions) (*Note, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo, &sha); err != nil { + return nil, nil, err + } + + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/git/notes/%s", owner, repo, sha)) + query := link.Query() + + if opt.Verification != nil { + if *opt.Verification { + query.Add("verification", "true") + } else { + query.Add("verification", "false") + } + } + + if opt.Files != nil { + if *opt.Files { + query.Add("files", "true") + } else { + query.Add("files", "false") + } + } + + link.RawQuery = query.Encode() + + note := new(Note) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, ¬e) + return note, resp, err +} diff --git a/vendor/code.gitea.io/sdk/gitea/repo_label.go b/vendor/code.gitea.io/sdk/gitea/repo_label.go index 097928ade..2cee0be99 100644 --- a/vendor/code.gitea.io/sdk/gitea/repo_label.go +++ b/vendor/code.gitea.io/sdk/gitea/repo_label.go @@ -20,6 +20,7 @@ type Label struct { Color string `json:"color"` Description string `json:"description"` Exclusive bool `json:"exclusive"` + IsArchived bool `json:"is_archived"` URL string `json:"url"` } @@ -56,6 +57,7 @@ type CreateLabelOption struct { Color string `json:"color"` Description string `json:"description"` Exclusive bool `json:"exclusive"` + IsArchived bool `json:"is_archived"` } // Validate the CreateLabelOption struct @@ -103,6 +105,7 @@ type EditLabelOption struct { Color *string `json:"color"` Description *string `json:"description"` Exclusive *bool `json:"exclusive"` + IsArchived *bool `json:"is_archived"` } // Validate the EditLabelOption struct diff --git a/vendor/code.gitea.io/sdk/gitea/repo_refs.go b/vendor/code.gitea.io/sdk/gitea/repo_refs.go index c954a80ef..bb41c36a5 100644 --- a/vendor/code.gitea.io/sdk/gitea/repo_refs.go +++ b/vendor/code.gitea.io/sdk/gitea/repo_refs.go @@ -76,3 +76,13 @@ func (c *Client) GetRepoRefs(user, repo, ref string) ([]*Reference, *Response, e return nil, resp, fmt.Errorf("unmarshalling failed for both single and multiple refs: %s and %s", refErr, refsErr) } + +// ListAllGitRefs gets all refs from a repository without filtering +func (c *Client) ListAllGitRefs(owner, repo string) ([]*Reference, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + refs := make([]*Reference, 0, 10) + resp, err := c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/git/refs", owner, repo), nil, nil, &refs) + return refs, resp, err +} diff --git a/vendor/code.gitea.io/sdk/gitea/repo_wiki.go b/vendor/code.gitea.io/sdk/gitea/repo_wiki.go new file mode 100644 index 000000000..6346f193f --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/repo_wiki.go @@ -0,0 +1,164 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "bytes" + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +// WikiPage represents a wiki page +type WikiPage struct { + Title string `json:"title"` + ContentBase64 string `json:"content_base64"` + CommitCount int64 `json:"commit_count"` + Sidebar string `json:"sidebar"` + Footer string `json:"footer"` + HTMLURL string `json:"html_url"` + SubURL string `json:"sub_url"` + LastCommit *WikiCommit `json:"last_commit,omitempty"` +} + +// WikiPageMetaData represents metadata for a wiki page (without content) +type WikiPageMetaData struct { + Title string `json:"title"` + HTMLURL string `json:"html_url"` + SubURL string `json:"sub_url"` + LastCommit *WikiCommit `json:"last_commit,omitempty"` +} + +// WikiCommit represents a wiki commit/revision +type WikiCommit struct { + ID string `json:"sha"` + Message string `json:"message"` + Author *CommitUser `json:"author,omitempty"` + Commiter *CommitUser `json:"commiter,omitempty"` +} + +// WikiCommitList represents a list of wiki commits +type WikiCommitList struct { + WikiCommits []*WikiCommit `json:"commits"` + Count int64 `json:"count"` +} + +// CreateWikiPageOptions options for creating or editing a wiki page +type CreateWikiPageOptions struct { + Title string `json:"title,omitempty"` + ContentBase64 string `json:"content_base64,omitempty"` + Message string `json:"message,omitempty"` +} + +// ListWikiPagesOptions options for listing wiki pages +type ListWikiPagesOptions struct { + ListOptions +} + +// ListWikiPageRevisionsOptions options for listing wiki page revisions +type ListWikiPageRevisionsOptions struct { + Page int `json:"page,omitempty"` +} + +// CreateWikiPage creates a new wiki page +func (c *Client) CreateWikiPage(owner, repo string, opt CreateWikiPageOptions) (*WikiPage, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + + body, err := json.Marshal(&opt) + if err != nil { + return nil, nil, err + } + + page := new(WikiPage) + resp, err := c.getParsedResponse("POST", + fmt.Sprintf("/repos/%s/%s/wiki/new", owner, repo), + jsonHeader, bytes.NewReader(body), &page) + return page, resp, err +} + +// GetWikiPage gets a wiki page by name +func (c *Client) GetWikiPage(owner, repo, pageName string) (*WikiPage, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo, &pageName); err != nil { + return nil, nil, err + } + + page := new(WikiPage) + resp, err := c.getParsedResponse("GET", + fmt.Sprintf("/repos/%s/%s/wiki/page/%s", owner, repo, pageName), + jsonHeader, nil, &page) + return page, resp, err +} + +// EditWikiPage edits an existing wiki page +func (c *Client) EditWikiPage(owner, repo, pageName string, opt CreateWikiPageOptions) (*WikiPage, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo, &pageName); err != nil { + return nil, nil, err + } + + body, err := json.Marshal(&opt) + if err != nil { + return nil, nil, err + } + + page := new(WikiPage) + resp, err := c.getParsedResponse("PATCH", + fmt.Sprintf("/repos/%s/%s/wiki/page/%s", owner, repo, pageName), + jsonHeader, bytes.NewReader(body), &page) + return page, resp, err +} + +// DeleteWikiPage deletes a wiki page +func (c *Client) DeleteWikiPage(owner, repo, pageName string) (*Response, error) { + if err := escapeValidatePathSegments(&owner, &repo, &pageName); err != nil { + return nil, err + } + + status, resp, err := c.getStatusCode("DELETE", + fmt.Sprintf("/repos/%s/%s/wiki/page/%s", owner, repo, pageName), + jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// ListWikiPages lists all wiki pages in a repository +func (c *Client) ListWikiPages(owner, repo string, opt ListWikiPagesOptions) ([]*WikiPageMetaData, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo); err != nil { + return nil, nil, err + } + opt.setDefaults() + + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/wiki/pages", owner, repo)) + link.RawQuery = opt.getURLQuery().Encode() + + pages := make([]*WikiPageMetaData, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &pages) + return pages, resp, err +} + +// GetWikiPageRevisions gets all revisions of a wiki page +func (c *Client) GetWikiPageRevisions(owner, repo, pageName string, opt ListWikiPageRevisionsOptions) (*WikiCommitList, *Response, error) { + if err := escapeValidatePathSegments(&owner, &repo, &pageName); err != nil { + return nil, nil, err + } + + link, _ := url.Parse(fmt.Sprintf("/repos/%s/%s/wiki/revisions/%s", owner, repo, pageName)) + if opt.Page > 0 { + query := link.Query() + query.Add("page", fmt.Sprintf("%d", opt.Page)) + link.RawQuery = query.Encode() + } + + commitList := new(WikiCommitList) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &commitList) + return commitList, resp, err +} diff --git a/vendor/code.gitea.io/sdk/gitea/user.go b/vendor/code.gitea.io/sdk/gitea/user.go index f44b12a9d..ce9f85e06 100644 --- a/vendor/code.gitea.io/sdk/gitea/user.go +++ b/vendor/code.gitea.io/sdk/gitea/user.go @@ -26,6 +26,8 @@ type User struct { Email string `json:"email"` // URL to the user's avatar AvatarURL string `json:"avatar_url"` + // URL to the user's profile + HTMLURL string `json:"html_url"` // User locale Language string `json:"language"` // Is the user an administrator diff --git a/vendor/code.gitea.io/sdk/gitea/user_block.go b/vendor/code.gitea.io/sdk/gitea/user_block.go new file mode 100644 index 000000000..011a5208a --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/user_block.go @@ -0,0 +1,76 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "fmt" + "net/http" + "net/url" +) + +// ListUserBlocksOptions options for listing user blocks +type ListUserBlocksOptions struct { + ListOptions +} + +// ListMyBlocks lists users blocked by the authenticated user +func (c *Client) ListMyBlocks(opt ListUserBlocksOptions) ([]*User, *Response, error) { + opt.setDefaults() + + link, _ := url.Parse("/user/blocks") + link.RawQuery = opt.getURLQuery().Encode() + + users := make([]*User, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &users) + return users, resp, err +} + +// CheckUserBlock checks if a user is blocked by the authenticated user +func (c *Client) CheckUserBlock(username string) (bool, *Response, error) { + if err := escapeValidatePathSegments(&username); err != nil { + return false, nil, err + } + status, resp, err := c.getStatusCode("GET", + fmt.Sprintf("/user/blocks/%s", username), + jsonHeader, nil) + if err != nil { + return false, resp, err + } + return status == http.StatusNoContent, resp, nil +} + +// BlockUser blocks a user +func (c *Client) BlockUser(username string) (*Response, error) { + if err := escapeValidatePathSegments(&username); err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("PUT", + fmt.Sprintf("/user/blocks/%s", username), + jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// UnblockUser unblocks a user +func (c *Client) UnblockUser(username string) (*Response, error) { + if err := escapeValidatePathSegments(&username); err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("DELETE", + fmt.Sprintf("/user/blocks/%s", username), + jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} diff --git a/vendor/code.gitea.io/sdk/gitea/user_email.go b/vendor/code.gitea.io/sdk/gitea/user_email.go index 4c24a4246..ca9c039a3 100644 --- a/vendor/code.gitea.io/sdk/gitea/user_email.go +++ b/vendor/code.gitea.io/sdk/gitea/user_email.go @@ -15,6 +15,8 @@ type Email struct { Email string `json:"email"` Verified bool `json:"verified"` Primary bool `json:"primary"` + UserID int64 `json:"user_id,omitempty"` + Username string `json:"username,omitempty"` } // ListEmailsOptions options for listing current's user emails diff --git a/vendor/code.gitea.io/sdk/gitea/user_ext.go b/vendor/code.gitea.io/sdk/gitea/user_ext.go new file mode 100644 index 000000000..36ef735db --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/user_ext.go @@ -0,0 +1,58 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "fmt" + "net/url" +) + +// UserHeatmapData represents the data needed to create a heatmap +type UserHeatmapData struct { + Timestamp int64 `json:"timestamp"` + Contributions int64 `json:"contributions"` +} + +// GetUserHeatmap gets a user's heatmap data +func (c *Client) GetUserHeatmap(username string) ([]*UserHeatmapData, *Response, error) { + if err := escapeValidatePathSegments(&username); err != nil { + return nil, nil, err + } + + heatmap := make([]*UserHeatmapData, 0, 365) + resp, err := c.getParsedResponse("GET", + fmt.Sprintf("/users/%s/heatmap", username), + jsonHeader, nil, &heatmap) + return heatmap, resp, err +} + +// ListUserActivityFeedsOptions options for listing user activity feeds +type ListUserActivityFeedsOptions struct { + ListOptions + OnlyPerformedBy bool `json:"only-performed-by,omitempty"` + Date string `json:"date,omitempty"` +} + +// ListUserActivityFeeds lists a user's activity feeds +func (c *Client) ListUserActivityFeeds(username string, opt ListUserActivityFeedsOptions) ([]*Activity, *Response, error) { + if err := escapeValidatePathSegments(&username); err != nil { + return nil, nil, err + } + opt.setDefaults() + + link, _ := url.Parse(fmt.Sprintf("/users/%s/activities/feeds", username)) + query := opt.getURLQuery() + if opt.OnlyPerformedBy { + query.Add("only-performed-by", "true") + } + if opt.Date != "" { + query.Add("date", opt.Date) + } + link.RawQuery = query.Encode() + + activities := make([]*Activity, 0, opt.PageSize) + resp, err := c.getParsedResponse("GET", link.String(), jsonHeader, nil, &activities) + return activities, resp, err +} diff --git a/vendor/code.gitea.io/sdk/gitea/user_gpgkey.go b/vendor/code.gitea.io/sdk/gitea/user_gpgkey.go index 15c2794a6..95070cac3 100644 --- a/vendor/code.gitea.io/sdk/gitea/user_gpgkey.go +++ b/vendor/code.gitea.io/sdk/gitea/user_gpgkey.go @@ -23,6 +23,7 @@ type GPGKey struct { CanEncryptComms bool `json:"can_encrypt_comms"` CanEncryptStorage bool `json:"can_encrypt_storage"` CanCertify bool `json:"can_certify"` + Verified bool `json:"verified"` Created time.Time `json:"created_at,omitempty"` Expires time.Time `json:"expires_at,omitempty"` } @@ -67,8 +68,9 @@ func (c *Client) GetGPGKey(keyID int64) (*GPGKey, *Response, error) { // CreateGPGKeyOption options create user GPG key type CreateGPGKeyOption struct { // An armored GPG key to add - // ArmoredKey string `json:"armored_public_key"` + // An optional armored signature for the GPG key + Signature string `json:"armored_signature,omitempty"` } // CreateGPGKey create GPG key with options @@ -86,3 +88,33 @@ func (c *Client) CreateGPGKey(opt CreateGPGKeyOption) (*GPGKey, *Response, error func (c *Client) DeleteGPGKey(keyID int64) (*Response, error) { return c.doRequestWithStatusHandle("DELETE", fmt.Sprintf("/user/gpg_keys/%d", keyID), nil, nil) } + +// GetGPGKeyVerificationToken gets a verification token for adding a GPG key. +// Returns the token as a plain string (API returns text/plain, not JSON). +// The user should sign this token with their GPG key and submit via VerifyGPGKey. +func (c *Client) GetGPGKeyVerificationToken() (string, *Response, error) { + body, resp, err := c.getResponse("GET", "/user/gpg_key_token", nil, nil) + return string(body), resp, err +} + +// VerifyGPGKeyOption options for verifying a GPG key +type VerifyGPGKeyOption struct { + // KeyID is the GPG key ID to verify + KeyID string `json:"key_id"` + // Signature is the ASCII-armored signature of the verification token + Signature string `json:"armored_signature"` +} + +// VerifyGPGKey verifies a GPG key by submitting a signed verification token. +// First call GetGPGKeyVerificationToken to get the token, sign it with the GPG key, +// then call this with the key ID and armored signature. +func (c *Client) VerifyGPGKey(opt VerifyGPGKeyOption) (*GPGKey, *Response, error) { + body, err := json.Marshal(&opt) + if err != nil { + return nil, nil, err + } + key := new(GPGKey) + resp, err := c.getParsedResponse("POST", "/user/gpg_key_verify", + jsonHeader, bytes.NewReader(body), key) + return key, resp, err +} diff --git a/vendor/code.gitea.io/sdk/gitea/user_search.go b/vendor/code.gitea.io/sdk/gitea/user_search.go index 5ea0c45f8..0e042a54b 100644 --- a/vendor/code.gitea.io/sdk/gitea/user_search.go +++ b/vendor/code.gitea.io/sdk/gitea/user_search.go @@ -17,6 +17,7 @@ type searchUsersResponse struct { type SearchUsersOption struct { ListOptions KeyWord string + UID int64 } // QueryEncode turns options into querystring argument @@ -31,6 +32,9 @@ func (opt *SearchUsersOption) QueryEncode() string { if len(opt.KeyWord) > 0 { query.Add("q", opt.KeyWord) } + if opt.UID > 0 { + query.Add("uid", fmt.Sprintf("%d", opt.UID)) + } return query.Encode() } diff --git a/vendor/code.gitea.io/sdk/gitea/user_social.go b/vendor/code.gitea.io/sdk/gitea/user_social.go new file mode 100644 index 000000000..eef284db5 --- /dev/null +++ b/vendor/code.gitea.io/sdk/gitea/user_social.go @@ -0,0 +1,46 @@ +// Copyright 2026 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitea + +import ( + "bytes" + "encoding/json" + "fmt" + "net/http" +) + +// UpdateUserAvatarOption options for updating user avatar +type UpdateUserAvatarOption struct { + Image string `json:"image"` // base64 encoded image +} + +// UpdateUserAvatar updates the authenticated user's avatar +func (c *Client) UpdateUserAvatar(opt UpdateUserAvatarOption) (*Response, error) { + body, err := json.Marshal(&opt) + if err != nil { + return nil, err + } + status, resp, err := c.getStatusCode("POST", "/user/avatar", + jsonHeader, bytes.NewReader(body)) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} + +// DeleteUserAvatar deletes the authenticated user's avatar +func (c *Client) DeleteUserAvatar() (*Response, error) { + status, resp, err := c.getStatusCode("DELETE", "/user/avatar", jsonHeader, nil) + if err != nil { + return resp, err + } + if status != http.StatusNoContent { + return resp, fmt.Errorf("unexpected status: %d", status) + } + return resp, nil +} diff --git a/vendor/code.gitea.io/sdk/gitea/version.go b/vendor/code.gitea.io/sdk/gitea/version.go index 5357e7d00..43c67dfca 100644 --- a/vendor/code.gitea.io/sdk/gitea/version.go +++ b/vendor/code.gitea.io/sdk/gitea/version.go @@ -71,6 +71,7 @@ var ( version1_17_0 = version.Must(version.NewVersion("1.17.0")) version1_22_0 = version.Must(version.NewVersion("1.22.0")) version1_23_0 = version.Must(version.NewVersion("1.23.0")) + version1_25_0 = version.Must(version.NewVersion("1.25.0")) ) // ErrUnknownVersion is an unknown version from the API diff --git a/vendor/github.com/google/pprof/profile/profile.go b/vendor/github.com/google/pprof/profile/profile.go index 43f561d44..18df65a8d 100644 --- a/vendor/github.com/google/pprof/profile/profile.go +++ b/vendor/github.com/google/pprof/profile/profile.go @@ -278,7 +278,7 @@ func (p *Profile) massageMappings() { // Use heuristics to identify main binary and move it to the top of the list of mappings for i, m := range p.Mapping { - file := strings.TrimSpace(strings.Replace(m.File, "(deleted)", "", -1)) + file := strings.TrimSpace(strings.ReplaceAll(m.File, "(deleted)", "")) if len(file) == 0 { continue } diff --git a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md index 69be62380..70050f35d 100644 --- a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md +++ b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md @@ -1,3 +1,30 @@ +## 2.28.1 + +Update all dependencies. This auto-updated the required version of Go to 1.24, consistent with the fact that Go 1.23 has been out of support for almost six months. + +## 2.28.0 + +Ginkgo's SemVer filter now supports filtering multiple components by SemVer version: + +```go +It("should work in a specific version range (1.0.0, 2.0.0) and third-party dependency redis in [8.0.0, ~)", SemVerConstraint(">= 3.2.0"), ComponentSemVerConstraint("redis", ">= 8.0.0") func() { + // This test will only run when version is between 1.0.0 (exclusive) and 2.0.0 (exclusive) and redis version is >= 8.0.0 +}) +``` + +can be filtered in or out with an invocation like: + +```bash +ginkgo --sem-ver-filter="2.1.1, redis=8.2.0" +``` + +Huge thanks to @Icarus9913 for working on this! + +## 2.27.5 + +### Fixes +Don't make a new formatter for each GinkgoT(); that's just silly and uses precious memory + ## 2.27.4 ### Fixes diff --git a/vendor/github.com/onsi/ginkgo/v2/README.md b/vendor/github.com/onsi/ginkgo/v2/README.md index 7b7ab9e39..b4c3ce0ad 100644 --- a/vendor/github.com/onsi/ginkgo/v2/README.md +++ b/vendor/github.com/onsi/ginkgo/v2/README.md @@ -119,7 +119,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) Sponsors commit to a [sponsorship](https://github.com/sponsors/onsi) for a year. If you're an organization that makes use of Ginkgo please consider becoming a sponsor!

Browser testing via - - + +

diff --git a/vendor/github.com/onsi/ginkgo/v2/core_dsl.go b/vendor/github.com/onsi/ginkgo/v2/core_dsl.go index 7e165e473..1c5a39a1f 100644 --- a/vendor/github.com/onsi/ginkgo/v2/core_dsl.go +++ b/vendor/github.com/onsi/ginkgo/v2/core_dsl.go @@ -20,6 +20,7 @@ import ( "io" "os" "path/filepath" + "slices" "strings" "github.com/go-logr/logr" @@ -268,7 +269,7 @@ func RunSpecs(t GinkgoTestingT, description string, args ...any) bool { } defer global.PopClone() - suiteLabels, suiteSemVerConstraints, suiteAroundNodes := extractSuiteConfiguration(args) + suiteLabels, suiteSemVerConstraints, suiteComponentSemVerConstraints, suiteAroundNodes := extractSuiteConfiguration(args) var reporter reporters.Reporter if suiteConfig.ParallelTotal == 1 { @@ -311,7 +312,7 @@ func RunSpecs(t GinkgoTestingT, description string, args ...any) bool { suitePath, err = filepath.Abs(suitePath) exitIfErr(err) - passed, hasFocusedTests := global.Suite.Run(description, suiteLabels, suiteSemVerConstraints, suiteAroundNodes, suitePath, global.Failer, reporter, writer, outputInterceptor, interrupt_handler.NewInterruptHandler(client), client, internal.RegisterForProgressSignal, suiteConfig) + passed, hasFocusedTests := global.Suite.Run(description, suiteLabels, suiteSemVerConstraints, suiteComponentSemVerConstraints, suiteAroundNodes, suitePath, global.Failer, reporter, writer, outputInterceptor, interrupt_handler.NewInterruptHandler(client), client, internal.RegisterForProgressSignal, suiteConfig) outputInterceptor.Shutdown() flagSet.ValidateDeprecations(deprecationTracker) @@ -330,9 +331,10 @@ func RunSpecs(t GinkgoTestingT, description string, args ...any) bool { return passed } -func extractSuiteConfiguration(args []any) (Labels, SemVerConstraints, types.AroundNodes) { +func extractSuiteConfiguration(args []any) (Labels, SemVerConstraints, ComponentSemVerConstraints, types.AroundNodes) { suiteLabels := Labels{} suiteSemVerConstraints := SemVerConstraints{} + suiteComponentSemVerConstraints := ComponentSemVerConstraints{} aroundNodes := types.AroundNodes{} configErrors := []error{} for _, arg := range args { @@ -345,6 +347,11 @@ func extractSuiteConfiguration(args []any) (Labels, SemVerConstraints, types.Aro suiteLabels = append(suiteLabels, arg...) case SemVerConstraints: suiteSemVerConstraints = append(suiteSemVerConstraints, arg...) + case ComponentSemVerConstraints: + for component, constraints := range arg { + suiteComponentSemVerConstraints[component] = append(suiteComponentSemVerConstraints[component], constraints...) + suiteComponentSemVerConstraints[component] = slices.Compact(suiteComponentSemVerConstraints[component]) + } case types.AroundNodeDecorator: aroundNodes = append(aroundNodes, arg) default: @@ -355,14 +362,14 @@ func extractSuiteConfiguration(args []any) (Labels, SemVerConstraints, types.Aro configErrors = types.VetConfig(flagSet, suiteConfig, reporterConfig) if len(configErrors) > 0 { - fmt.Fprintf(formatter.ColorableStdErr, formatter.F("{{red}}Ginkgo detected configuration issues:{{/}}\n")) + fmt.Fprint(formatter.ColorableStdErr, formatter.F("{{red}}Ginkgo detected configuration issues:{{/}}\n")) for _, err := range configErrors { - fmt.Fprintf(formatter.ColorableStdErr, err.Error()) + fmt.Fprint(formatter.ColorableStdErr, err.Error()) } os.Exit(1) } - return suiteLabels, suiteSemVerConstraints, aroundNodes + return suiteLabels, suiteSemVerConstraints, suiteComponentSemVerConstraints, aroundNodes } func getwd() (string, error) { @@ -385,7 +392,7 @@ func PreviewSpecs(description string, args ...any) Report { } defer global.PopClone() - suiteLabels, suiteSemVerConstraints, suiteAroundNodes := extractSuiteConfiguration(args) + suiteLabels, suiteSemVerConstraints, suiteComponentSemVerConstraints, suiteAroundNodes := extractSuiteConfiguration(args) priorDryRun, priorParallelTotal, priorParallelProcess := suiteConfig.DryRun, suiteConfig.ParallelTotal, suiteConfig.ParallelProcess suiteConfig.DryRun, suiteConfig.ParallelTotal, suiteConfig.ParallelProcess = true, 1, 1 defer func() { @@ -403,7 +410,7 @@ func PreviewSpecs(description string, args ...any) Report { suitePath, err = filepath.Abs(suitePath) exitIfErr(err) - global.Suite.Run(description, suiteLabels, suiteSemVerConstraints, suiteAroundNodes, suitePath, global.Failer, reporter, writer, outputInterceptor, interrupt_handler.NewInterruptHandler(client), client, internal.RegisterForProgressSignal, suiteConfig) + global.Suite.Run(description, suiteLabels, suiteSemVerConstraints, suiteComponentSemVerConstraints, suiteAroundNodes, suitePath, global.Failer, reporter, writer, outputInterceptor, interrupt_handler.NewInterruptHandler(client), client, internal.RegisterForProgressSignal, suiteConfig) return global.Suite.GetPreviewReport() } diff --git a/vendor/github.com/onsi/ginkgo/v2/decorator_dsl.go b/vendor/github.com/onsi/ginkgo/v2/decorator_dsl.go index e331d7cf8..ce1d71cec 100644 --- a/vendor/github.com/onsi/ginkgo/v2/decorator_dsl.go +++ b/vendor/github.com/onsi/ginkgo/v2/decorator_dsl.go @@ -117,6 +117,27 @@ You can learn more here: https://onsi.github.io/ginkgo/#spec-semantic-version-fi */ type SemVerConstraints = internal.SemVerConstraints +/* +ComponentSemVerConstraint decorates specs with ComponentSemVerConstraints. Multiple components semantic version constraints can be passed to ComponentSemVerConstraint and the component can't be empy, also the version strings must follow the semantic version constraint rules. +ComponentSemVerConstraints can be applied to container and subject nodes, but not setup nodes. You can provide multiple ComponentSemVerConstraints to a given node and a spec's component semantic version constraints is the union of all component semantic version constraints in its node hierarchy. + +You can learn more here: https://onsi.github.io/ginkgo/#spec-semantic-version-filtering +You can learn more about decorators here: https://onsi.github.io/ginkgo/#decorator-reference +*/ +func ComponentSemVerConstraint(component string, semVerConstraints ...string) ComponentSemVerConstraints { + componentSemVerConstraints := ComponentSemVerConstraints{ + component: semVerConstraints, + } + + return componentSemVerConstraints +} + +/* +ComponentSemVerConstraints are the type for spec ComponentSemVerConstraint decorators. Use ComponentSemVerConstraint(...) to construct ComponentSemVerConstraints. +You can learn more here: https://onsi.github.io/ginkgo/#spec-semantic-version-filtering +*/ +type ComponentSemVerConstraints = internal.ComponentSemVerConstraints + /* PollProgressAfter allows you to override the configured value for --poll-progress-after for a particular node. diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go index 79b83a3af..a30a2ecc9 100644 --- a/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go @@ -22,11 +22,11 @@ type Command struct { func (c Command) Run(args []string, additionalArgs []string) { args, err := c.Flags.Parse(args) if err != nil { - AbortWithUsage(err.Error()) + AbortWithUsage("%s", err.Error()) } for _, arg := range args { if len(arg) > 1 && strings.HasPrefix(arg, "-") { - AbortWith(types.GinkgoErrors.FlagAfterPositionalParameter().Error()) + AbortWith("%s", types.GinkgoErrors.FlagAfterPositionalParameter().Error()) } } c.Command(args, additionalArgs) @@ -49,6 +49,6 @@ func (c Command) EmitUsage(writer io.Writer) { } flagUsage := c.Flags.Usage() if flagUsage != "" { - fmt.Fprintf(writer, formatter.F(flagUsage)) + fmt.Fprint(writer, formatter.F(flagUsage)) } } diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/run.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/run.go index 48c69a1d8..68830d9ae 100644 --- a/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/run.go +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/run.go @@ -268,9 +268,9 @@ func runParallel(suite TestSuite, ginkgoConfig types.SuiteConfig, reporterConfig fmt.Fprint(formatter.ColorableStdErr, formatter.Fiw(0, formatter.COLS, "This occurs if a parallel process exits before it reports its results to the Ginkgo CLI. The CLI will now print out all the stdout/stderr output it's collected from the running processes. However you may not see anything useful in these logs because the individual test processes usually intercept output to stdout/stderr in order to capture it in the spec reports.\n\nYou may want to try rerunning your test suite with {{light-gray}}--output-interceptor-mode=none{{/}} to see additional output here and debug your suite.\n")) fmt.Fprintln(formatter.ColorableStdErr, " ") for proc := 1; proc <= cliConfig.ComputedProcs(); proc++ { - fmt.Fprintf(formatter.ColorableStdErr, formatter.F("{{bold}}Output from proc %d:{{/}}\n", proc)) + fmt.Fprint(formatter.ColorableStdErr, formatter.F("{{bold}}Output from proc %d:{{/}}\n", proc)) fmt.Fprintln(os.Stderr, formatter.Fi(1, "%s", procOutput[proc-1].String())) - fmt.Fprintf(formatter.ColorableStdErr, formatter.F("{{bold}}Exit result of proc %d:{{/}}\n", proc)) + fmt.Fprint(formatter.ColorableStdErr, formatter.F("{{bold}}Exit result of proc %d:{{/}}\n", proc)) fmt.Fprintln(os.Stderr, formatter.Fi(1, "%s\n", procExitResult[proc-1])) } fmt.Fprintf(os.Stderr, "** End **") diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go index 03875b979..c5091e6de 100644 --- a/vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go @@ -33,7 +33,7 @@ func BuildRunCommand() command.Command { Usage: "ginkgo run -- ", ShortDoc: "Run the tests in the passed in (or the package in the current directory if left blank)", Documentation: "Any arguments after -- will be passed to the test.", - DocLink: "running-tests", + DocLink: "running-specs", Command: func(args []string, additionalArgs []string) { var errors []error cliConfig, goFlagsConfig, errors = types.VetAndInitializeCLIAndGoConfig(cliConfig, goFlagsConfig) diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/focus.go b/vendor/github.com/onsi/ginkgo/v2/internal/focus.go index a39daf5a6..498e707db 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/focus.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/focus.go @@ -56,7 +56,7 @@ This function sets the `Skip` property on specs by applying Ginkgo's focus polic *Note:* specs with pending nodes are Skipped when created by NewSpec. */ -func ApplyFocusToSpecs(specs Specs, description string, suiteLabels Labels, suiteSemVerConstraints SemVerConstraints, suiteConfig types.SuiteConfig) (Specs, bool) { +func ApplyFocusToSpecs(specs Specs, description string, suiteLabels Labels, suiteSemVerConstraints SemVerConstraints, suiteComponentSemVerConstraints ComponentSemVerConstraints, suiteConfig types.SuiteConfig) (Specs, bool) { focusString := strings.Join(suiteConfig.FocusStrings, "|") skipString := strings.Join(suiteConfig.SkipStrings, "|") @@ -87,7 +87,24 @@ func ApplyFocusToSpecs(specs Specs, description string, suiteLabels Labels, suit if suiteConfig.SemVerFilter != "" { semVerFilter, _ := types.ParseSemVerFilter(suiteConfig.SemVerFilter) skipChecks = append(skipChecks, func(spec Spec) bool { - return !semVerFilter(UnionOfSemVerConstraints(suiteSemVerConstraints, spec.Nodes.UnionOfSemVerConstraints())) + noRun := false + + // non-component-specific constraints + constraints := UnionOfSemVerConstraints(suiteSemVerConstraints, spec.Nodes.UnionOfSemVerConstraints()) + if len(constraints) != 0 && semVerFilter("", constraints) == false { + noRun = true + } + + // component-specific constraints + componentConstraints := UnionOfComponentSemVerConstraints(suiteComponentSemVerConstraints, spec.Nodes.UnionOfComponentSemVerConstraints()) + for component, constraints := range componentConstraints { + if semVerFilter(component, constraints) == false { + noRun = true + break + } + } + + return noRun }) } diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/group.go b/vendor/github.com/onsi/ginkgo/v2/internal/group.go index cc794903e..5e6611334 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/group.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/group.go @@ -113,22 +113,24 @@ func newGroup(suite *Suite) *group { // initialReportForSpec constructs a new SpecReport right before running the spec. func (g *group) initialReportForSpec(spec Spec) types.SpecReport { return types.SpecReport{ - ContainerHierarchyTexts: spec.Nodes.WithType(types.NodeTypeContainer).Texts(), - ContainerHierarchyLocations: spec.Nodes.WithType(types.NodeTypeContainer).CodeLocations(), - ContainerHierarchyLabels: spec.Nodes.WithType(types.NodeTypeContainer).Labels(), - ContainerHierarchySemVerConstraints: spec.Nodes.WithType(types.NodeTypeContainer).SemVerConstraints(), - LeafNodeLocation: spec.FirstNodeWithType(types.NodeTypeIt).CodeLocation, - LeafNodeType: types.NodeTypeIt, - LeafNodeText: spec.FirstNodeWithType(types.NodeTypeIt).Text, - LeafNodeLabels: []string(spec.FirstNodeWithType(types.NodeTypeIt).Labels), - LeafNodeSemVerConstraints: []string(spec.FirstNodeWithType(types.NodeTypeIt).SemVerConstraints), - ParallelProcess: g.suite.config.ParallelProcess, - RunningInParallel: g.suite.isRunningInParallel(), - IsSerial: spec.Nodes.HasNodeMarkedSerial(), - IsInOrderedContainer: !spec.Nodes.FirstNodeMarkedOrdered().IsZero(), - MaxFlakeAttempts: spec.Nodes.GetMaxFlakeAttempts(), - MaxMustPassRepeatedly: spec.Nodes.GetMaxMustPassRepeatedly(), - SpecPriority: spec.Nodes.GetSpecPriority(), + ContainerHierarchyTexts: spec.Nodes.WithType(types.NodeTypeContainer).Texts(), + ContainerHierarchyLocations: spec.Nodes.WithType(types.NodeTypeContainer).CodeLocations(), + ContainerHierarchyLabels: spec.Nodes.WithType(types.NodeTypeContainer).Labels(), + ContainerHierarchySemVerConstraints: spec.Nodes.WithType(types.NodeTypeContainer).SemVerConstraints(), + ContainerHierarchyComponentSemVerConstraints: spec.Nodes.WithType(types.NodeTypeContainer).ComponentSemVerConstraints(), + LeafNodeLocation: spec.FirstNodeWithType(types.NodeTypeIt).CodeLocation, + LeafNodeType: types.NodeTypeIt, + LeafNodeText: spec.FirstNodeWithType(types.NodeTypeIt).Text, + LeafNodeLabels: []string(spec.FirstNodeWithType(types.NodeTypeIt).Labels), + LeafNodeSemVerConstraints: []string(spec.FirstNodeWithType(types.NodeTypeIt).SemVerConstraints), + LeafNodeComponentSemVerConstraints: map[string][]string(spec.FirstNodeWithType(types.NodeTypeIt).ComponentSemVerConstraints), + ParallelProcess: g.suite.config.ParallelProcess, + RunningInParallel: g.suite.isRunningInParallel(), + IsSerial: spec.Nodes.HasNodeMarkedSerial(), + IsInOrderedContainer: !spec.Nodes.FirstNodeMarkedOrdered().IsZero(), + MaxFlakeAttempts: spec.Nodes.GetMaxFlakeAttempts(), + MaxMustPassRepeatedly: spec.Nodes.GetMaxMustPassRepeatedly(), + SpecPriority: spec.Nodes.GetSpecPriority(), } } @@ -152,6 +154,7 @@ func addNodeToReportForNode(report *types.ConstructionNodeReport, node *TreeNode report.ContainerHierarchyLocations = append(report.ContainerHierarchyLocations, node.Node.CodeLocation) report.ContainerHierarchyLabels = append(report.ContainerHierarchyLabels, node.Node.Labels) report.ContainerHierarchySemVerConstraints = append(report.ContainerHierarchySemVerConstraints, node.Node.SemVerConstraints) + report.ContainerHierarchyComponentSemVerConstraints = append(report.ContainerHierarchyComponentSemVerConstraints, node.Node.ComponentSemVerConstraints) if node.Node.MarkedSerial { report.IsSerial = true } diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/node.go b/vendor/github.com/onsi/ginkgo/v2/internal/node.go index 2bccec2db..b0c8de8d6 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/node.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/node.go @@ -57,6 +57,7 @@ type Node struct { MustPassRepeatedly int Labels Labels SemVerConstraints SemVerConstraints + ComponentSemVerConstraints ComponentSemVerConstraints PollProgressAfter time.Duration PollProgressInterval time.Duration NodeTimeout time.Duration @@ -106,7 +107,24 @@ func (l Labels) MatchesLabelFilter(query string) bool { type SemVerConstraints []string func (svc SemVerConstraints) MatchesSemVerFilter(version string) bool { - return types.MustParseSemVerFilter(version)(svc) + return types.MustParseSemVerFilter(version)("", svc) +} + +type ComponentSemVerConstraints map[string][]string + +func (csvc ComponentSemVerConstraints) MatchesSemVerFilter(component, version string) bool { + for comp, constraints := range csvc { + if comp != component { + continue + } + + input := version + if len(component) > 0 { + input = fmt.Sprintf("%s=%s", component, version) + } + return types.MustParseSemVerFilter(input)(component, constraints) + } + return false } func unionOf[S ~[]E, E comparable](slices ...S) S { @@ -131,6 +149,16 @@ func UnionOfSemVerConstraints(semVerConstraints ...SemVerConstraints) SemVerCons return unionOf(semVerConstraints...) } +func UnionOfComponentSemVerConstraints(componentSemVerConstraintsSlice ...ComponentSemVerConstraints) ComponentSemVerConstraints { + unionComponentSemVerConstraints := ComponentSemVerConstraints{} + for _, componentSemVerConstraints := range componentSemVerConstraintsSlice { + for component, constraints := range componentSemVerConstraints { + unionComponentSemVerConstraints[component] = unionOf(unionComponentSemVerConstraints[component], constraints) + } + } + return unionComponentSemVerConstraints +} + func PartitionDecorations(args ...any) ([]any, []any) { decorations := []any{} remainingArgs := []any{} @@ -174,6 +202,8 @@ func isDecoration(arg any) bool { return true case t == reflect.TypeOf(SemVerConstraints{}): return true + case t == reflect.TypeOf(ComponentSemVerConstraints{}): + return true case t == reflect.TypeOf(PollProgressInterval(0)): return true case t == reflect.TypeOf(PollProgressAfter(0)): @@ -214,16 +244,17 @@ var specContextType = reflect.TypeOf(new(SpecContext)).Elem() func NewNode(deprecationTracker *types.DeprecationTracker, nodeType types.NodeType, text string, args ...any) (Node, []error) { baseOffset := 2 node := Node{ - ID: UniqueNodeID(), - NodeType: nodeType, - Text: text, - Labels: Labels{}, - SemVerConstraints: SemVerConstraints{}, - CodeLocation: types.NewCodeLocation(baseOffset), - NestingLevel: -1, - PollProgressAfter: -1, - PollProgressInterval: -1, - GracePeriod: -1, + ID: UniqueNodeID(), + NodeType: nodeType, + Text: text, + Labels: Labels{}, + SemVerConstraints: SemVerConstraints{}, + ComponentSemVerConstraints: ComponentSemVerConstraints{}, + CodeLocation: types.NewCodeLocation(baseOffset), + NestingLevel: -1, + PollProgressAfter: -1, + PollProgressInterval: -1, + GracePeriod: -1, } errors := []error{} @@ -360,6 +391,36 @@ func NewNode(deprecationTracker *types.DeprecationTracker, nodeType types.NodeTy appendError(err) } } + case t == reflect.TypeOf(ComponentSemVerConstraints{}): + if !nodeType.Is(types.NodeTypesForContainerAndIt) { + appendError(types.GinkgoErrors.InvalidDecoratorForNodeType(node.CodeLocation, nodeType, "ComponentSemVerConstraint")) + } + for component, semVerConstraints := range arg.(ComponentSemVerConstraints) { + // while using ComponentSemVerConstraints, we should not allow empty component names. + // you should use SemVerConstraints for that. + hasErr := false + if len(component) == 0 { + appendError(types.GinkgoErrors.InvalidEmptyComponentForSemVerConstraint(node.CodeLocation)) + hasErr = true + } + for _, semVerConstraint := range semVerConstraints { + _, err := types.ValidateAndCleanupSemVerConstraint(semVerConstraint, node.CodeLocation) + if err != nil { + appendError(err) + hasErr = true + } + } + + if !hasErr { + // merge constraints if the component already exists + constraints := slices.Clone(semVerConstraints) + if existingConstraints, exists := node.ComponentSemVerConstraints[component]; exists { + constraints = UnionOfSemVerConstraints([]string(existingConstraints), constraints) + } + + node.ComponentSemVerConstraints[component] = slices.Clone(constraints) + } + } case t.Kind() == reflect.Func: if nodeType.Is(types.NodeTypeContainer) { if node.Body != nil { @@ -899,6 +960,34 @@ func (n Nodes) UnionOfSemVerConstraints() []string { return out } +func (n Nodes) ComponentSemVerConstraints() []map[string][]string { + out := make([]map[string][]string, len(n)) + for i := range n { + if n[i].ComponentSemVerConstraints == nil { + out[i] = map[string][]string{} + } else { + out[i] = map[string][]string(n[i].ComponentSemVerConstraints) + } + } + return out +} + +func (n Nodes) UnionOfComponentSemVerConstraints() map[string][]string { + out := map[string][]string{} + seen := map[string]bool{} + for i := range n { + for component := range n[i].ComponentSemVerConstraints { + if !seen[component] { + seen[component] = true + out[component] = n[i].ComponentSemVerConstraints[component] + } else { + out[component] = UnionOfSemVerConstraints(out[component], n[i].ComponentSemVerConstraints[component]) + } + } + } + return out +} + func (n Nodes) CodeLocations() []types.CodeLocation { out := make([]types.CodeLocation, len(n)) for i := range n { diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson.go b/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson.go index 8b7a9ceab..751543ea7 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson.go @@ -83,7 +83,7 @@ func goJSONActionFromSpecState(state types.SpecState) GoJSONAction { type gojsonReport struct { o types.Report // Extra calculated fields - goPkg string + goPkg string elapsed float64 } @@ -109,8 +109,8 @@ type gojsonSpecReport struct { o types.SpecReport // extra calculated fields testName string - elapsed float64 - action GoJSONAction + elapsed float64 + action GoJSONAction } func newSpecReport(in types.SpecReport) *gojsonSpecReport { @@ -141,18 +141,31 @@ func suitePathToPkg(dir string) (string, error) { } func createTestName(spec types.SpecReport) string { - name := fmt.Sprintf("[%s]", spec.LeafNodeType) - if spec.FullText() != "" { - name = name + " " + spec.FullText() - } - labels := spec.Labels() - if len(labels) > 0 { - name = name + " [" + strings.Join(labels, ", ") + "]" - } - semVerConstraints := spec.SemVerConstraints() - if len(semVerConstraints) > 0 { - name = name + " [" + strings.Join(semVerConstraints, ", ") + "]" - } - name = strings.TrimSpace(name) - return name + name := fmt.Sprintf("[%s]", spec.LeafNodeType) + if spec.FullText() != "" { + name = name + " " + spec.FullText() + } + labels := spec.Labels() + if len(labels) > 0 { + name = name + " [" + strings.Join(labels, ", ") + "]" + } + semVerConstraints := spec.SemVerConstraints() + if len(semVerConstraints) > 0 { + name = name + " [" + strings.Join(semVerConstraints, ", ") + "]" + } + componentSemVerConstraints := spec.ComponentSemVerConstraints() + if len(componentSemVerConstraints) > 0 { + name = name + " [" + formatComponentSemVerConstraintsToString(componentSemVerConstraints) + "]" + } + name = strings.TrimSpace(name) + return name +} + +func formatComponentSemVerConstraintsToString(componentSemVerConstraints map[string][]string) string { + var tmpStr string + for component, semVerConstraints := range componentSemVerConstraints { + tmpStr = tmpStr + fmt.Sprintf("%s: %s, ", component, semVerConstraints) + } + tmpStr = strings.TrimSuffix(tmpStr, ", ") + return tmpStr } diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/suite.go b/vendor/github.com/onsi/ginkgo/v2/internal/suite.go index 9d5f59001..57c1cffe7 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/suite.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/suite.go @@ -108,13 +108,13 @@ func (suite *Suite) BuildTree() error { return nil } -func (suite *Suite) Run(description string, suiteLabels Labels, suiteSemVerConstraints SemVerConstraints, suiteAroundNodes types.AroundNodes, suitePath string, failer *Failer, reporter reporters.Reporter, writer WriterInterface, outputInterceptor OutputInterceptor, interruptHandler interrupt_handler.InterruptHandlerInterface, client parallel_support.Client, progressSignalRegistrar ProgressSignalRegistrar, suiteConfig types.SuiteConfig) (bool, bool) { +func (suite *Suite) Run(description string, suiteLabels Labels, suiteSemVerConstraints SemVerConstraints, suiteComponentSemVerConstraints ComponentSemVerConstraints, suiteAroundNodes types.AroundNodes, suitePath string, failer *Failer, reporter reporters.Reporter, writer WriterInterface, outputInterceptor OutputInterceptor, interruptHandler interrupt_handler.InterruptHandlerInterface, client parallel_support.Client, progressSignalRegistrar ProgressSignalRegistrar, suiteConfig types.SuiteConfig) (bool, bool) { if suite.phase != PhaseBuildTree { panic("cannot run before building the tree = call suite.BuildTree() first") } ApplyNestedFocusPolicyToTree(suite.tree) specs := GenerateSpecsFromTreeRoot(suite.tree) - specs, hasProgrammaticFocus := ApplyFocusToSpecs(specs, description, suiteLabels, suiteSemVerConstraints, suiteConfig) + specs, hasProgrammaticFocus := ApplyFocusToSpecs(specs, description, suiteLabels, suiteSemVerConstraints, suiteComponentSemVerConstraints, suiteConfig) specs = ComputeAroundNodes(specs) suite.phase = PhaseRun @@ -133,7 +133,7 @@ func (suite *Suite) Run(description string, suiteLabels Labels, suiteSemVerConst cancelProgressHandler := progressSignalRegistrar(suite.handleProgressSignal) - success := suite.runSpecs(description, suiteLabels, suiteSemVerConstraints, suitePath, hasProgrammaticFocus, specs) + success := suite.runSpecs(description, suiteLabels, suiteSemVerConstraints, suiteComponentSemVerConstraints, suitePath, hasProgrammaticFocus, specs) cancelProgressHandler() @@ -456,16 +456,17 @@ func (suite *Suite) processCurrentSpecReport() { } } -func (suite *Suite) runSpecs(description string, suiteLabels Labels, suiteSemVerConstraints SemVerConstraints, suitePath string, hasProgrammaticFocus bool, specs Specs) bool { +func (suite *Suite) runSpecs(description string, suiteLabels Labels, suiteSemVerConstraints SemVerConstraints, suiteComponentSemVerConstraints ComponentSemVerConstraints, suitePath string, hasProgrammaticFocus bool, specs Specs) bool { numSpecsThatWillBeRun := specs.CountWithoutSkip() suite.report = types.Report{ - SuitePath: suitePath, - SuiteDescription: description, - SuiteLabels: suiteLabels, - SuiteSemVerConstraints: suiteSemVerConstraints, - SuiteConfig: suite.config, - SuiteHasProgrammaticFocus: hasProgrammaticFocus, + SuitePath: suitePath, + SuiteDescription: description, + SuiteLabels: suiteLabels, + SuiteSemVerConstraints: suiteSemVerConstraints, + SuiteComponentSemVerConstraints: suiteComponentSemVerConstraints, + SuiteConfig: suite.config, + SuiteHasProgrammaticFocus: hasProgrammaticFocus, PreRunStats: types.PreRunStats{ TotalSpecs: len(specs), SpecsThatWillRun: numSpecsThatWillBeRun, @@ -1042,7 +1043,7 @@ func (suite *Suite) runNode(node Node, specDeadline time.Time, text string) (typ } progressReport = progressReport.WithoutOtherGoroutines() - sc.cancel(fmt.Errorf(interruptStatus.Message())) + sc.cancel(fmt.Errorf("%s", interruptStatus.Message())) if interruptStatus.Level == interrupt_handler.InterruptLevelBailOut { if interruptStatus.ShouldIncludeProgressReport() { diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go b/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go index 9806e315a..5704f0fdf 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go @@ -27,6 +27,11 @@ type ginkgoWriterInterface interface { type ginkgoRecoverFunc func() type attachProgressReporterFunc func(func() string) func() +var formatters = map[bool]formatter.Formatter{ + true: formatter.NewWithNoColorBool(true), + false: formatter.NewWithNoColorBool(false), +} + func New(writer ginkgoWriterInterface, fail failFunc, skip skipFunc, cleanup cleanupFunc, report reportFunc, addReportEntry addReportEntryFunc, ginkgoRecover ginkgoRecoverFunc, attachProgressReporter attachProgressReporterFunc, randomSeed int64, parallelProcess int, parallelTotal int, noColor bool, offset int) *ginkgoTestingTProxy { return &ginkgoTestingTProxy{ fail: fail, @@ -41,7 +46,7 @@ func New(writer ginkgoWriterInterface, fail failFunc, skip skipFunc, cleanup cle randomSeed: randomSeed, parallelProcess: parallelProcess, parallelTotal: parallelTotal, - f: formatter.NewWithNoColorBool(noColor), + f: formatters[noColor], //minimize allocations by reusing formatters } } diff --git a/vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go b/vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go index 026d9cf9b..ef66b2289 100644 --- a/vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go +++ b/vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go @@ -75,6 +75,9 @@ func (r *DefaultReporter) SuiteWillBegin(report types.Report) { if len(report.SuiteSemVerConstraints) > 0 { r.emit(r.f("{{coral}}[%s]{{/}} ", strings.Join(report.SuiteSemVerConstraints, ", "))) } + if len(report.SuiteComponentSemVerConstraints) > 0 { + r.emit(r.f("{{coral}}[Components: %s]{{/}} ", formatComponentSemVerConstraintsToString(report.SuiteComponentSemVerConstraints))) + } r.emit(r.f("- %d/%d specs ", report.PreRunStats.SpecsThatWillRun, report.PreRunStats.TotalSpecs)) if report.SuiteConfig.ParallelTotal > 1 { r.emit(r.f("- %d procs ", report.SuiteConfig.ParallelTotal)) @@ -97,6 +100,13 @@ func (r *DefaultReporter) SuiteWillBegin(report types.Report) { bannerWidth = len(semVerConstraints) + 2 } } + if len(report.SuiteComponentSemVerConstraints) > 0 { + componentSemVerConstraints := formatComponentSemVerConstraintsToString(report.SuiteComponentSemVerConstraints) + r.emitBlock(r.f("{{coral}}[Components: %s]{{/}} ", componentSemVerConstraints)) + if len(componentSemVerConstraints)+2 > bannerWidth { + bannerWidth = len(componentSemVerConstraints) + 2 + } + } r.emitBlock(strings.Repeat("=", bannerWidth)) out := r.f("Random Seed: {{bold}}%d{{/}}", report.SuiteConfig.RandomSeed) @@ -725,8 +735,12 @@ func (r *DefaultReporter) cycleJoin(elements []string, joiner string) string { } func (r *DefaultReporter) codeLocationBlock(report types.SpecReport, highlightColor string, veryVerbose bool, usePreciseFailureLocation bool) string { - texts, locations, labels, semVerConstraints := []string{}, []types.CodeLocation{}, [][]string{}, [][]string{} - texts, locations, labels, semVerConstraints = append(texts, report.ContainerHierarchyTexts...), append(locations, report.ContainerHierarchyLocations...), append(labels, report.ContainerHierarchyLabels...), append(semVerConstraints, report.ContainerHierarchySemVerConstraints...) + texts, locations, labels, semVerConstraints, componentSemVerConstraints := []string{}, []types.CodeLocation{}, [][]string{}, [][]string{}, []map[string][]string{} + texts = append(texts, report.ContainerHierarchyTexts...) + locations = append(locations, report.ContainerHierarchyLocations...) + labels = append(labels, report.ContainerHierarchyLabels...) + semVerConstraints = append(semVerConstraints, report.ContainerHierarchySemVerConstraints...) + componentSemVerConstraints = append(componentSemVerConstraints, report.ContainerHierarchyComponentSemVerConstraints...) if report.LeafNodeType.Is(types.NodeTypesForSuiteLevelNodes) { texts = append(texts, r.f("[%s] %s", report.LeafNodeType, report.LeafNodeText)) @@ -735,6 +749,7 @@ func (r *DefaultReporter) codeLocationBlock(report types.SpecReport, highlightCo } labels = append(labels, report.LeafNodeLabels) semVerConstraints = append(semVerConstraints, report.LeafNodeSemVerConstraints) + componentSemVerConstraints = append(componentSemVerConstraints, report.LeafNodeComponentSemVerConstraints) locations = append(locations, report.LeafNodeLocation) failureLocation := report.Failure.FailureNodeLocation @@ -749,6 +764,7 @@ func (r *DefaultReporter) codeLocationBlock(report types.SpecReport, highlightCo locations = append([]types.CodeLocation{failureLocation}, locations...) labels = append([][]string{{}}, labels...) semVerConstraints = append([][]string{{}}, semVerConstraints...) + componentSemVerConstraints = append([]map[string][]string{{}}, componentSemVerConstraints...) highlightIndex = 0 case types.FailureNodeInContainer: i := report.Failure.FailureNodeContainerIndex @@ -779,6 +795,9 @@ func (r *DefaultReporter) codeLocationBlock(report types.SpecReport, highlightCo if len(semVerConstraints[i]) > 0 { out += r.f(" {{coral}}[%s]{{/}}", strings.Join(semVerConstraints[i], ", ")) } + if len(componentSemVerConstraints[i]) > 0 { + out += r.f(" {{coral}}[%s]{{/}}", formatComponentSemVerConstraintsToString(componentSemVerConstraints[i])) + } out += "\n" out += r.fi(uint(i), "{{gray}}%s{{/}}\n", locations[i]) } @@ -806,6 +825,10 @@ func (r *DefaultReporter) codeLocationBlock(report types.SpecReport, highlightCo if len(flattenedSemVerConstraints) > 0 { out += r.f(" {{coral}}[%s]{{/}}", strings.Join(flattenedSemVerConstraints, ", ")) } + flattenedComponentSemVerConstraints := report.ComponentSemVerConstraints() + if len(flattenedComponentSemVerConstraints) > 0 { + out += r.f(" {{coral}}[%s]{{/}}", formatComponentSemVerConstraintsToString(flattenedComponentSemVerConstraints)) + } out += "\n" if usePreciseFailureLocation { out += r.f("{{gray}}%s{{/}}", failureLocation) diff --git a/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go b/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go index 828f893fb..d4720ee94 100644 --- a/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go +++ b/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go @@ -13,9 +13,11 @@ package reporters import ( "encoding/xml" "fmt" + "maps" "os" "path" "regexp" + "slices" "strings" "github.com/onsi/ginkgo/v2/config" @@ -39,6 +41,9 @@ type JunitReportConfig struct { // Enable OmitSpecSemVerConstraints to prevent semantic version constraints from appearing in the spec name OmitSpecSemVerConstraints bool + // Enable OmitSpecComponentSemVerConstraints to prevent component semantic version constraints from appearing in the spec name + OmitSpecComponentSemVerConstraints bool + // Enable OmitLeafNodeType to prevent the spec leaf node type from appearing in the spec name OmitLeafNodeType bool @@ -173,6 +178,7 @@ func GenerateJUnitReportWithConfig(report types.Report, dst string, config Junit {"SpecialSuiteFailureReason", strings.Join(report.SpecialSuiteFailureReasons, ",")}, {"SuiteLabels", fmt.Sprintf("[%s]", strings.Join(report.SuiteLabels, ","))}, {"SuiteSemVerConstraints", fmt.Sprintf("[%s]", strings.Join(report.SuiteSemVerConstraints, ","))}, + {"SuiteComponentSemVerConstraints", fmt.Sprintf("[%s]", formatComponentSemVerConstraintsToString(report.SuiteComponentSemVerConstraints))}, {"RandomSeed", fmt.Sprintf("%d", report.SuiteConfig.RandomSeed)}, {"RandomizeAllSpecs", fmt.Sprintf("%t", report.SuiteConfig.RandomizeAllSpecs)}, {"LabelFilter", report.SuiteConfig.LabelFilter}, @@ -216,6 +222,10 @@ func GenerateJUnitReportWithConfig(report types.Report, dst string, config Junit if len(semVerConstraints) > 0 && !config.OmitSpecSemVerConstraints { name = name + " [" + strings.Join(semVerConstraints, ", ") + "]" } + componentSemVerConstraints := spec.ComponentSemVerConstraints() + if len(componentSemVerConstraints) > 0 && !config.OmitSpecComponentSemVerConstraints { + name = name + " [" + formatComponentSemVerConstraintsToString(componentSemVerConstraints) + "]" + } name = strings.TrimSpace(name) test := JUnitTestCase{ @@ -387,6 +397,16 @@ func systemOutForUnstructuredReporters(spec types.SpecReport) string { return spec.CapturedStdOutErr } +func formatComponentSemVerConstraintsToString(componentSemVerConstraints map[string][]string) string { + var tmpStr string + for _, key := range slices.Sorted(maps.Keys(componentSemVerConstraints)) { + tmpStr = tmpStr + fmt.Sprintf("%s: %s, ", key, componentSemVerConstraints[key]) + } + + tmpStr = strings.TrimSuffix(tmpStr, ", ") + return tmpStr +} + // Deprecated JUnitReporter (so folks can still compile their suites) type JUnitReporter struct{} diff --git a/vendor/github.com/onsi/ginkgo/v2/reporters/teamcity_report.go b/vendor/github.com/onsi/ginkgo/v2/reporters/teamcity_report.go index 55e1d1f4f..ed3e3a2bb 100644 --- a/vendor/github.com/onsi/ginkgo/v2/reporters/teamcity_report.go +++ b/vendor/github.com/onsi/ginkgo/v2/reporters/teamcity_report.go @@ -39,12 +39,16 @@ func GenerateTeamcityReport(report types.Report, dst string) error { name := report.SuiteDescription labels := report.SuiteLabels semVerConstraints := report.SuiteSemVerConstraints + componentSemVerConstraints := report.SuiteComponentSemVerConstraints if len(labels) > 0 { name = name + " [" + strings.Join(labels, ", ") + "]" } if len(semVerConstraints) > 0 { name = name + " [" + strings.Join(semVerConstraints, ", ") + "]" } + if len(componentSemVerConstraints) > 0 { + name = name + " [" + formatComponentSemVerConstraintsToString(componentSemVerConstraints) + "]" + } fmt.Fprintf(f, "##teamcity[testSuiteStarted name='%s']\n", tcEscape(name)) for _, spec := range report.SpecReports { name := fmt.Sprintf("[%s]", spec.LeafNodeType) @@ -59,6 +63,10 @@ func GenerateTeamcityReport(report types.Report, dst string) error { if len(semVerConstraints) > 0 { name = name + " [" + strings.Join(semVerConstraints, ", ") + "]" } + componentSemVerConstraints := spec.ComponentSemVerConstraints() + if len(componentSemVerConstraints) > 0 { + name = name + " [" + formatComponentSemVerConstraintsToString(componentSemVerConstraints) + "]" + } name = tcEscape(name) fmt.Fprintf(f, "##teamcity[testStarted name='%s']\n", name) diff --git a/vendor/github.com/onsi/ginkgo/v2/types/errors.go b/vendor/github.com/onsi/ginkgo/v2/types/errors.go index 59313238c..623e54b66 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/errors.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/errors.go @@ -450,6 +450,15 @@ func (g ginkgoErrors) InvalidEmptySemVerConstraint(cl CodeLocation) error { } } +func (g ginkgoErrors) InvalidEmptyComponentForSemVerConstraint(cl CodeLocation) error { + return GinkgoError{ + Heading: "Invalid Empty Component for ComponentSemVerConstraint", + Message: "ComponentSemVerConstraint requires a non-empty component name", + CodeLocation: cl, + DocLink: "spec-semantic-version-filtering", + } +} + /* Table errors */ func (g ginkgoErrors) MultipleEntryBodyFunctionsForTable(cl CodeLocation) error { return GinkgoError{ diff --git a/vendor/github.com/onsi/ginkgo/v2/types/semver_filter.go b/vendor/github.com/onsi/ginkgo/v2/types/semver_filter.go index 3fc2ed144..71778078d 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/semver_filter.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/semver_filter.go @@ -2,11 +2,12 @@ package types import ( "fmt" + "strings" "github.com/Masterminds/semver/v3" ) -type SemVerFilter func([]string) bool +type SemVerFilter func(component string, constraints []string) bool func MustParseSemVerFilter(input string) SemVerFilter { filter, err := ParseSemVerFilter(input) @@ -16,30 +17,90 @@ func MustParseSemVerFilter(input string) SemVerFilter { return filter } -func ParseSemVerFilter(filterVersion string) (SemVerFilter, error) { - if filterVersion == "" { - return func(_ []string) bool { return true }, nil +// ParseSemVerFilter parses non-component and component-specific semantic version filter string. +// The filter string can contain multiple non-component and component-specific versions separated by commas. +// Each component-specific version is in the format "component=version". +// If a version is specified without a component, it applies to non-component-specific constraints. +func ParseSemVerFilter(componentFilterVersions string) (SemVerFilter, error) { + if componentFilterVersions == "" { + return func(_ string, _ []string) bool { return true }, nil } - targetVersion, err := semver.NewVersion(filterVersion) - if err != nil { - return nil, fmt.Errorf("invalid filter version: %w", err) + result := map[string]*semver.Version{} + parts := strings.Split(componentFilterVersions, ",") + for _, part := range parts { + part = strings.TrimSpace(part) + if len(part) == 0 { + continue + } + if strings.Contains(part, "=") { + // validate component-specific version string + invalidPart, invalidErr := false, fmt.Errorf("invalid component filter version: %s", part) + subParts := strings.Split(part, "=") + if len(subParts) != 2 { + invalidPart = true + } + component := strings.TrimSpace(subParts[0]) + versionStr := strings.TrimSpace(subParts[1]) + if len(component) == 0 || len(versionStr) == 0 { + invalidPart = true + } + if invalidPart { + return nil, invalidErr + } + + // validate semver + v, err := semver.NewVersion(versionStr) + if err != nil { + return nil, fmt.Errorf("invalid component filter version: %s, error: %w", part, err) + } + result[component] = v + } else { + v, err := semver.NewVersion(part) + if err != nil { + return nil, fmt.Errorf("invalid filter version: %s, error: %w", part, err) + } + result[""] = v + } } - return func(constraints []string) bool { + return func(component string, constraints []string) bool { // unconstrained specs always run - if len(constraints) == 0 { + if len(component) == 0 && len(constraints) == 0 { return true } - for _, constraintStr := range constraints { - constraint, err := semver.NewConstraint(constraintStr) - if err != nil { - return false + // check non-component specific version constraints + if len(component) == 0 && len(constraints) != 0 { + v := result[""] + if v != nil { + for _, constraintStr := range constraints { + constraint, err := semver.NewConstraint(constraintStr) + if err != nil { + return false + } + + if !constraint.Check(v) { + return false + } + } } + } + + // check component-specific version constraints + if len(component) != 0 && len(constraints) != 0 { + v := result[component] + if v != nil { + for _, constraintStr := range constraints { + constraint, err := semver.NewConstraint(constraintStr) + if err != nil { + return false + } - if !constraint.Check(targetVersion) { - return false + if !constraint.Check(v) { + return false + } + } } } diff --git a/vendor/github.com/onsi/ginkgo/v2/types/types.go b/vendor/github.com/onsi/ginkgo/v2/types/types.go index 9981a0dd6..240150512 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/types.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/types.go @@ -38,6 +38,10 @@ type ConstructionNodeReport struct { // all Describe/Context/When containers in this spec's hierarchy ContainerHierarchySemVerConstraints [][]string + // ContainerHierarchyComponentSemVerConstraints is a slice containing the component-specific semVerConstraints of + // all Describe/Context/When containers in this spec's hierarchy + ContainerHierarchyComponentSemVerConstraints []map[string][]string + // IsSerial captures whether the any container has the Serial decorator IsSerial bool @@ -85,6 +89,9 @@ type Report struct { //SuiteSemVerConstraints captures any semVerConstraints attached to the suite by the DSL's RunSpecs() function SuiteSemVerConstraints []string + //SuiteComponentSemVerConstraints captures any component-specific semVerConstraints attached to the suite by the DSL's RunSpecs() function + SuiteComponentSemVerConstraints map[string][]string + //SuiteSucceeded captures the success or failure status of the test run //If true, the test run is considered successful. //If false, the test run is considered unsuccessful @@ -188,14 +195,19 @@ type SpecReport struct { // all Describe/Context/When containers in this spec's hierarchy ContainerHierarchySemVerConstraints [][]string + // ContainerHierarchyComponentSemVerConstraints is a slice containing the component-specific semVerConstraints of + // all Describe/Context/When containers in this spec's hierarchy + ContainerHierarchyComponentSemVerConstraints []map[string][]string + // LeafNodeType, LeafNodeLocation, LeafNodeLabels, LeafNodeSemVerConstraints and LeafNodeText capture the NodeType, CodeLocation, and text // of the Ginkgo node being tested (typically an NodeTypeIt node, though this can also be // one of the NodeTypesForSuiteLevelNodes node types) - LeafNodeType NodeType - LeafNodeLocation CodeLocation - LeafNodeLabels []string - LeafNodeSemVerConstraints []string - LeafNodeText string + LeafNodeType NodeType + LeafNodeLocation CodeLocation + LeafNodeLabels []string + LeafNodeSemVerConstraints []string + LeafNodeComponentSemVerConstraints map[string][]string + LeafNodeText string // Captures the Spec Priority SpecPriority int @@ -261,52 +273,54 @@ type SpecReport struct { func (report SpecReport) MarshalJSON() ([]byte, error) { //All this to avoid emitting an empty Failure struct in the JSON out := struct { - ContainerHierarchyTexts []string - ContainerHierarchyLocations []CodeLocation - ContainerHierarchyLabels [][]string - ContainerHierarchySemVerConstraints [][]string - LeafNodeType NodeType - LeafNodeLocation CodeLocation - LeafNodeLabels []string - LeafNodeSemVerConstraints []string - LeafNodeText string - State SpecState - StartTime time.Time - EndTime time.Time - RunTime time.Duration - ParallelProcess int - Failure *Failure `json:",omitempty"` - NumAttempts int - MaxFlakeAttempts int - MaxMustPassRepeatedly int - CapturedGinkgoWriterOutput string `json:",omitempty"` - CapturedStdOutErr string `json:",omitempty"` - ReportEntries ReportEntries `json:",omitempty"` - ProgressReports []ProgressReport `json:",omitempty"` - AdditionalFailures []AdditionalFailure `json:",omitempty"` - SpecEvents SpecEvents `json:",omitempty"` + ContainerHierarchyTexts []string + ContainerHierarchyLocations []CodeLocation + ContainerHierarchyLabels [][]string + ContainerHierarchySemVerConstraints [][]string + ContainerHierarchyComponentSemVerConstraints []map[string][]string + LeafNodeType NodeType + LeafNodeLocation CodeLocation + LeafNodeLabels []string + LeafNodeSemVerConstraints []string + LeafNodeText string + State SpecState + StartTime time.Time + EndTime time.Time + RunTime time.Duration + ParallelProcess int + Failure *Failure `json:",omitempty"` + NumAttempts int + MaxFlakeAttempts int + MaxMustPassRepeatedly int + CapturedGinkgoWriterOutput string `json:",omitempty"` + CapturedStdOutErr string `json:",omitempty"` + ReportEntries ReportEntries `json:",omitempty"` + ProgressReports []ProgressReport `json:",omitempty"` + AdditionalFailures []AdditionalFailure `json:",omitempty"` + SpecEvents SpecEvents `json:",omitempty"` }{ - ContainerHierarchyTexts: report.ContainerHierarchyTexts, - ContainerHierarchyLocations: report.ContainerHierarchyLocations, - ContainerHierarchyLabels: report.ContainerHierarchyLabels, - ContainerHierarchySemVerConstraints: report.ContainerHierarchySemVerConstraints, - LeafNodeType: report.LeafNodeType, - LeafNodeLocation: report.LeafNodeLocation, - LeafNodeLabels: report.LeafNodeLabels, - LeafNodeSemVerConstraints: report.LeafNodeSemVerConstraints, - LeafNodeText: report.LeafNodeText, - State: report.State, - StartTime: report.StartTime, - EndTime: report.EndTime, - RunTime: report.RunTime, - ParallelProcess: report.ParallelProcess, - Failure: nil, - ReportEntries: nil, - NumAttempts: report.NumAttempts, - MaxFlakeAttempts: report.MaxFlakeAttempts, - MaxMustPassRepeatedly: report.MaxMustPassRepeatedly, - CapturedGinkgoWriterOutput: report.CapturedGinkgoWriterOutput, - CapturedStdOutErr: report.CapturedStdOutErr, + ContainerHierarchyTexts: report.ContainerHierarchyTexts, + ContainerHierarchyLocations: report.ContainerHierarchyLocations, + ContainerHierarchyLabels: report.ContainerHierarchyLabels, + ContainerHierarchySemVerConstraints: report.ContainerHierarchySemVerConstraints, + ContainerHierarchyComponentSemVerConstraints: report.ContainerHierarchyComponentSemVerConstraints, + LeafNodeType: report.LeafNodeType, + LeafNodeLocation: report.LeafNodeLocation, + LeafNodeLabels: report.LeafNodeLabels, + LeafNodeSemVerConstraints: report.LeafNodeSemVerConstraints, + LeafNodeText: report.LeafNodeText, + State: report.State, + StartTime: report.StartTime, + EndTime: report.EndTime, + RunTime: report.RunTime, + ParallelProcess: report.ParallelProcess, + Failure: nil, + ReportEntries: nil, + NumAttempts: report.NumAttempts, + MaxFlakeAttempts: report.MaxFlakeAttempts, + MaxMustPassRepeatedly: report.MaxMustPassRepeatedly, + CapturedGinkgoWriterOutput: report.CapturedGinkgoWriterOutput, + CapturedStdOutErr: report.CapturedStdOutErr, } if !report.Failure.IsZero() { @@ -404,6 +418,34 @@ func (report SpecReport) SemVerConstraints() []string { return out } +// ComponentSemVerConstraints returns a deduped map of all the spec's component-specific SemVerConstraints. +func (report SpecReport) ComponentSemVerConstraints() map[string][]string { + out := map[string][]string{} + seen := map[string]bool{} + for _, compSemVerConstraints := range report.ContainerHierarchyComponentSemVerConstraints { + for component := range compSemVerConstraints { + if !seen[component] { + seen[component] = true + out[component] = compSemVerConstraints[component] + } else { + out[component] = append(out[component], compSemVerConstraints[component]...) + out[component] = slices.Compact(out[component]) + } + } + } + for component := range report.LeafNodeComponentSemVerConstraints { + if !seen[component] { + seen[component] = true + out[component] = report.LeafNodeComponentSemVerConstraints[component] + } else { + out[component] = append(out[component], report.LeafNodeComponentSemVerConstraints[component]...) + out[component] = slices.Compact(out[component]) + } + } + + return out +} + // MatchesLabelFilter returns true if the spec satisfies the passed in label filter query func (report SpecReport) MatchesLabelFilter(query string) (bool, error) { filter, err := ParseLabelFilter(query) @@ -419,7 +461,22 @@ func (report SpecReport) MatchesSemVerFilter(version string) (bool, error) { if err != nil { return false, err } - return filter(report.SemVerConstraints()), nil + + semVerConstraints := report.SemVerConstraints() + if len(semVerConstraints) != 0 && filter("", report.SemVerConstraints()) == false { + return false, nil + } + + componentSemVerConstraints := report.ComponentSemVerConstraints() + if len(componentSemVerConstraints) != 0 { + for component, constraints := range componentSemVerConstraints { + if filter(component, constraints) == false { + return false, nil + } + } + } + + return true, nil } // FileName() returns the name of the file containing the spec diff --git a/vendor/github.com/onsi/ginkgo/v2/types/version.go b/vendor/github.com/onsi/ginkgo/v2/types/version.go index 66cbbcf3c..1df09be00 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/version.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/version.go @@ -1,3 +1,3 @@ package types -const VERSION = "2.27.4" +const VERSION = "2.28.1" diff --git a/vendor/github.com/onsi/gomega/CHANGELOG.md b/vendor/github.com/onsi/gomega/CHANGELOG.md index cf020605c..91e65521b 100644 --- a/vendor/github.com/onsi/gomega/CHANGELOG.md +++ b/vendor/github.com/onsi/gomega/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.39.1 + +Update all dependencies. This auto-updated the required version of Go to 1.24, consistent with the fact that Go 1.23 has been out of support for almost six months. + ## 1.39.0 ### Features diff --git a/vendor/github.com/onsi/gomega/gomega_dsl.go b/vendor/github.com/onsi/gomega/gomega_dsl.go index cd6ce450f..87c70692b 100644 --- a/vendor/github.com/onsi/gomega/gomega_dsl.go +++ b/vendor/github.com/onsi/gomega/gomega_dsl.go @@ -22,7 +22,7 @@ import ( "github.com/onsi/gomega/types" ) -const GOMEGA_VERSION = "1.39.0" +const GOMEGA_VERSION = "1.39.1" const nilGomegaPanic = `You are trying to make an assertion, but haven't registered Gomega's fail handler. If you're using Ginkgo then you probably forgot to put your assertion in an It(). diff --git a/vendor/golang.org/x/tools/go/ast/inspector/cursor.go b/vendor/golang.org/x/tools/go/ast/inspector/cursor.go index fc9bbc714..60ad425f3 100644 --- a/vendor/golang.org/x/tools/go/ast/inspector/cursor.go +++ b/vendor/golang.org/x/tools/go/ast/inspector/cursor.go @@ -453,6 +453,9 @@ func (c Cursor) FindNode(n ast.Node) (Cursor, bool) { // rooted at c such that n.Pos() <= start && end <= n.End(). // (For an *ast.File, it uses the bounds n.FileStart-n.FileEnd.) // +// An empty range (start == end) between two adjacent nodes is +// considered to belong to the first node. +// // It returns zero if none is found. // Precondition: start <= end. // @@ -501,10 +504,17 @@ func (c Cursor) FindByPos(start, end token.Pos) (Cursor, bool) { break // disjoint, after; stop } } + // Inv: node.{Pos,FileStart} <= start if end <= nodeEnd { // node fully contains target range best = i + + // Don't search beyond end of the first match. + // This is important only for an empty range (start=end) + // between two adjoining nodes, which would otherwise + // match both nodes; we want to match only the first. + limit = ev.index } else if nodeEnd < start { i = ev.index // disjoint, before; skip forward } diff --git a/vendor/golang.org/x/tools/internal/stdlib/deps.go b/vendor/golang.org/x/tools/internal/stdlib/deps.go index f7b9c1286..f41431c94 100644 --- a/vendor/golang.org/x/tools/internal/stdlib/deps.go +++ b/vendor/golang.org/x/tools/internal/stdlib/deps.go @@ -12,364 +12,366 @@ type pkginfo struct { } var deps = [...]pkginfo{ - {"archive/tar", "\x03p\x03F=\x01\n\x01$\x01\x01\x02\x05\b\x02\x01\x02\x02\f"}, - {"archive/zip", "\x02\x04f\a\x03\x13\x021=\x01+\x05\x01\x0f\x03\x02\x0e\x04"}, - {"bufio", "\x03p\x86\x01D\x14"}, - {"bytes", "s+[\x03\fG\x02\x02"}, + {"archive/tar", "\x03q\x03F=\x01\n\x01$\x01\x01\x02\x05\b\x02\x01\x02\x02\r"}, + {"archive/zip", "\x02\x04g\a\x03\x13\x021=\x01+\x05\x01\x0f\x03\x02\x0f\x04"}, + {"bufio", "\x03q\x86\x01D\x15"}, + {"bytes", "t+[\x03\fH\x02\x02"}, {"cmp", ""}, - {"compress/bzip2", "\x02\x02\xf5\x01A"}, - {"compress/flate", "\x02q\x03\x83\x01\f\x033\x01\x03"}, - {"compress/gzip", "\x02\x04f\a\x03\x15nT"}, - {"compress/lzw", "\x02q\x03\x83\x01"}, - {"compress/zlib", "\x02\x04f\a\x03\x13\x01o"}, - {"container/heap", "\xbb\x02"}, + {"compress/bzip2", "\x02\x02\xf6\x01A"}, + {"compress/flate", "\x02r\x03\x83\x01\f\x033\x01\x03"}, + {"compress/gzip", "\x02\x04g\a\x03\x15nU"}, + {"compress/lzw", "\x02r\x03\x83\x01"}, + {"compress/zlib", "\x02\x04g\a\x03\x13\x01o"}, + {"container/heap", "\xbc\x02"}, {"container/list", ""}, {"container/ring", ""}, - {"context", "s\\p\x01\r"}, - {"crypto", "\x89\x01pC"}, - {"crypto/aes", "\x10\n\t\x99\x02"}, - {"crypto/cipher", "\x03 \x01\x01 \x12\x1c,Z"}, - {"crypto/des", "\x10\x15 .,\x9d\x01\x03"}, - {"crypto/dsa", "E\x04*\x86\x01\r"}, - {"crypto/ecdh", "\x03\v\f\x10\x04\x17\x04\x0e\x1c\x86\x01"}, - {"crypto/ecdsa", "\x0e\x05\x03\x04\x01\x10\b\v\x06\x01\x04\r\x01\x1c\x86\x01\r\x05K\x01"}, - {"crypto/ed25519", "\x0e\x1e\x12\a\v\a\x1c\x86\x01C"}, - {"crypto/elliptic", "3@\x86\x01\r9"}, - {"crypto/fips140", "\"\x05"}, - {"crypto/hkdf", "/\x15\x01.\x16"}, - {"crypto/hmac", "\x1a\x16\x14\x01\x122"}, - {"crypto/internal/boring", "\x0e\x02\rl"}, - {"crypto/internal/boring/bbig", "\x1a\xec\x01M"}, - {"crypto/internal/boring/bcache", "\xc0\x02\x13"}, + {"context", "t\\p\x01\x0e"}, + {"crypto", "\x8a\x01pC"}, + {"crypto/aes", "\x10\v\t\x99\x02"}, + {"crypto/cipher", "\x03!\x01\x01 \x12\x1c,Z"}, + {"crypto/des", "\x10\x16 .,\x9d\x01\x03"}, + {"crypto/dsa", "F\x03+\x86\x01\r"}, + {"crypto/ecdh", "\x03\v\r\x10\x04\x17\x03\x0f\x1c\x86\x01"}, + {"crypto/ecdsa", "\x0e\x05\x03\x05\x01\x10\b\v\x06\x01\x03\x0e\x01\x1c\x86\x01\r\x05L\x01"}, + {"crypto/ed25519", "\x0e\x1f\x12\a\x03\b\a\x1cI=C"}, + {"crypto/elliptic", "4@\x86\x01\r9"}, + {"crypto/fips140", "#\x05\x95\x01\x98\x01"}, + {"crypto/hkdf", "0\x15\x01.\x16"}, + {"crypto/hmac", "\x1b\x16\x14\x01\x122"}, + {"crypto/hpke", "\x03\v\x02\x03\x04\x01\f\x01\x05\x1f\x05\a\x01\x01\x1d\x03\x13\x16\x9b\x01\x1c"}, + {"crypto/internal/boring", "\x0e\x02\x0el"}, + {"crypto/internal/boring/bbig", "\x1b\xec\x01N"}, + {"crypto/internal/boring/bcache", "\xc1\x02\x14"}, {"crypto/internal/boring/sig", ""}, {"crypto/internal/constanttime", ""}, - {"crypto/internal/cryptotest", "\x03\r\n\b&\x0f\x19\x06\x13\x12 \x04\x06\t\x19\x01\x11\x11\x1b\x01\a\x05\b\x03\x05\v"}, - {"crypto/internal/entropy", "J"}, - {"crypto/internal/entropy/v1.0.0", "C0\x95\x018\x13"}, - {"crypto/internal/fips140", "B1\xbf\x01\v\x16"}, - {"crypto/internal/fips140/aes", "\x03\x1f\x03\x02\x14\x05\x01\x01\x06+\x95\x014"}, - {"crypto/internal/fips140/aes/gcm", "\"\x01\x02\x02\x02\x12\x05\x01\a+\x92\x01"}, - {"crypto/internal/fips140/alias", "\xd3\x02"}, - {"crypto/internal/fips140/bigmod", "'\x19\x01\a+\x95\x01"}, - {"crypto/internal/fips140/check", "\"\x0e\a\t\x02\xb7\x01Z"}, - {"crypto/internal/fips140/check/checktest", "'\x8b\x02!"}, - {"crypto/internal/fips140/drbg", "\x03\x1e\x01\x01\x04\x14\x05\t\x01)\x86\x01\x0f7\x01"}, - {"crypto/internal/fips140/ecdh", "\x03\x1f\x05\x02\n\r3\x86\x01\x0f7"}, - {"crypto/internal/fips140/ecdsa", "\x03\x1f\x04\x01\x02\a\x03\x06:\x16pF"}, - {"crypto/internal/fips140/ed25519", "\x03\x1f\x05\x02\x04\f:\xc9\x01\x03"}, - {"crypto/internal/fips140/edwards25519", "\x1e\t\a\x123\x95\x017"}, - {"crypto/internal/fips140/edwards25519/field", "'\x14\x053\x95\x01"}, - {"crypto/internal/fips140/hkdf", "\x03\x1f\x05\t\a<\x16"}, - {"crypto/internal/fips140/hmac", "\x03\x1f\x15\x01\x01:\x16"}, - {"crypto/internal/fips140/mldsa", "\x03\x1b\x04\x05\x02\x0e\x01\x03\x053\x95\x017"}, - {"crypto/internal/fips140/mlkem", "\x03\x1f\x05\x02\x0f\x03\x053\xcc\x01"}, - {"crypto/internal/fips140/nistec", "\x1e\t\r\f3\x95\x01*\r\x14"}, - {"crypto/internal/fips140/nistec/fiat", "'\x148\x95\x01"}, - {"crypto/internal/fips140/pbkdf2", "\x03\x1f\x05\t\a<\x16"}, - {"crypto/internal/fips140/rsa", "\x03\x1b\x04\x04\x01\x02\x0e\x01\x01\x028\x16pF"}, - {"crypto/internal/fips140/sha256", "\x03\x1f\x1e\x01\a+\x16\x7f"}, - {"crypto/internal/fips140/sha3", "\x03\x1f\x19\x05\x012\x95\x01K"}, - {"crypto/internal/fips140/sha512", "\x03\x1f\x1e\x01\a+\x16\x7f"}, - {"crypto/internal/fips140/ssh", "'b"}, - {"crypto/internal/fips140/subtle", "\x1e\a\x1b\xc8\x01"}, - {"crypto/internal/fips140/tls12", "\x03\x1f\x05\t\a\x02:\x16"}, - {"crypto/internal/fips140/tls13", "\x03\x1f\x05\b\b\t3\x16"}, - {"crypto/internal/fips140cache", "\xb2\x02\r&"}, + {"crypto/internal/cryptotest", "\x03\r\v\b%\x10\x19\x06\x13\x12 \x04\x06\t\x19\x01\x11\x11\x1b\x01\a\x05\b\x03\x05\f"}, + {"crypto/internal/entropy", "K"}, + {"crypto/internal/entropy/v1.0.0", "D0\x95\x018\x14"}, + {"crypto/internal/fips140", "C1\xbf\x01\v\x17"}, + {"crypto/internal/fips140/aes", "\x03 \x03\x02\x14\x05\x01\x01\x05,\x95\x014"}, + {"crypto/internal/fips140/aes/gcm", "#\x01\x02\x02\x02\x12\x05\x01\x06,\x92\x01"}, + {"crypto/internal/fips140/alias", "\xd5\x02"}, + {"crypto/internal/fips140/bigmod", "(\x19\x01\x06,\x95\x01"}, + {"crypto/internal/fips140/check", "#\x0e\a\t\x02\xb7\x01["}, + {"crypto/internal/fips140/check/checktest", "(\x8b\x02\""}, + {"crypto/internal/fips140/drbg", "\x03\x1f\x01\x01\x04\x14\x05\n)\x86\x01\x0f7\x01"}, + {"crypto/internal/fips140/ecdh", "\x03 \x05\x02\n\r3\x86\x01\x0f7"}, + {"crypto/internal/fips140/ecdsa", "\x03 \x04\x01\x02\a\x03\x06:\x16pF"}, + {"crypto/internal/fips140/ed25519", "\x03 \x05\x02\x04\f:\xc9\x01\x03"}, + {"crypto/internal/fips140/edwards25519", "\x1f\t\a\x123\x95\x017"}, + {"crypto/internal/fips140/edwards25519/field", "(\x14\x053\x95\x01"}, + {"crypto/internal/fips140/hkdf", "\x03 \x05\t\a<\x16"}, + {"crypto/internal/fips140/hmac", "\x03 \x15\x01\x01:\x16"}, + {"crypto/internal/fips140/mldsa", "\x03\x1c\x04\x05\x02\x0e\x01\x03\x053\x95\x017"}, + {"crypto/internal/fips140/mlkem", "\x03 \x05\x02\x0f\x03\x053\xcc\x01"}, + {"crypto/internal/fips140/nistec", "\x1f\t\r\f3\x95\x01*\r\x15"}, + {"crypto/internal/fips140/nistec/fiat", "(\x148\x95\x01"}, + {"crypto/internal/fips140/pbkdf2", "\x03 \x05\t\a<\x16"}, + {"crypto/internal/fips140/rsa", "\x03\x1c\x04\x04\x01\x02\x0e\x01\x01\x028\x16pF"}, + {"crypto/internal/fips140/sha256", "\x03 \x1e\x01\x06,\x16\x7f"}, + {"crypto/internal/fips140/sha3", "\x03 \x19\x05\x012\x95\x01L"}, + {"crypto/internal/fips140/sha512", "\x03 \x1e\x01\x06,\x16\x7f"}, + {"crypto/internal/fips140/ssh", "(b"}, + {"crypto/internal/fips140/subtle", "\x1f\a\x1b\xc8\x01"}, + {"crypto/internal/fips140/tls12", "\x03 \x05\t\a\x02:\x16"}, + {"crypto/internal/fips140/tls13", "\x03 \x05\b\b\t3\x16"}, + {"crypto/internal/fips140cache", "\xb3\x02\r'"}, {"crypto/internal/fips140deps", ""}, - {"crypto/internal/fips140deps/byteorder", "\x9f\x01"}, - {"crypto/internal/fips140deps/cpu", "\xb4\x01\a"}, - {"crypto/internal/fips140deps/godebug", "\xbc\x01"}, - {"crypto/internal/fips140deps/time", "\xcd\x02"}, - {"crypto/internal/fips140hash", "8\x1d4\xca\x01"}, - {"crypto/internal/fips140only", ")\x0e\x01\x01P3="}, + {"crypto/internal/fips140deps/byteorder", "\xa0\x01"}, + {"crypto/internal/fips140deps/cpu", "\xb5\x01\a"}, + {"crypto/internal/fips140deps/godebug", "\xbd\x01"}, + {"crypto/internal/fips140deps/time", "\xcf\x02"}, + {"crypto/internal/fips140hash", "9\x1d4\xcb\x01"}, + {"crypto/internal/fips140only", "\x17\x13\x0e\x01\x01Pp"}, {"crypto/internal/fips140test", ""}, - {"crypto/internal/hpke", "\x03\v\x01\x01\x03\x055\x03\x04\x01\x01\x16\a\x03\x13\xcc\x01"}, - {"crypto/internal/impl", "\xbd\x02"}, - {"crypto/internal/randutil", "\xf9\x01\x12"}, - {"crypto/internal/sysrand", "sq! \r\r\x01\x01\f\x06"}, - {"crypto/internal/sysrand/internal/seccomp", "s"}, - {"crypto/md5", "\x0e7.\x16\x16i"}, - {"crypto/mlkem", "\x0e$"}, - {"crypto/mlkem/mlkemtest", "2\x1b&"}, - {"crypto/pbkdf2", "5\x0f\x01.\x16"}, - {"crypto/rand", "\x1a\b\a\x1c\x04\x01)\x86\x01\rM"}, - {"crypto/rc4", "% .\xc9\x01"}, - {"crypto/rsa", "\x0e\f\x01\v\x10\x0e\x01\x04\a\a\x1c\x03\x133=\f\x01"}, - {"crypto/sha1", "\x0e\f+\x03+\x16\x16\x15T"}, - {"crypto/sha256", "\x0e\f\x1dR"}, - {"crypto/sha3", "\x0e*Q\xca\x01"}, - {"crypto/sha512", "\x0e\f\x1fP"}, - {"crypto/subtle", "\x1e\x1d\x9f\x01X"}, - {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\t\x01\x0e\n\x01\n\x05\x04\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x13\x16\x15\b=\x16\x16\r\b\x01\x01\x01\x02\x01\r\x06\x02\x01\x0f"}, - {"crypto/tls/internal/fips140tls", "\x17\xa9\x02"}, - {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x016\x06\x01\x01\x02\x05\x0e\x06\x02\x02\x03F\x03:\x01\x02\b\x01\x01\x02\a\x10\x05\x01\x06\a\b\x02\x01\x02\x0e\x02\x01\x01\x02\x03\x01"}, - {"crypto/x509/pkix", "i\x06\a\x90\x01G"}, - {"database/sql", "\x03\nP\x16\x03\x83\x01\v\a\"\x05\b\x02\x03\x01\r\x02\x02\x02"}, - {"database/sql/driver", "\rf\x03\xb7\x01\x0f\x11"}, - {"debug/buildinfo", "\x03]\x02\x01\x01\b\a\x03g\x1a\x02\x01+\x0f\x1f"}, - {"debug/dwarf", "\x03i\a\x03\x83\x011\x11\x01\x01"}, - {"debug/elf", "\x03\x06V\r\a\x03g\x1b\x01\f \x17\x01\x16"}, - {"debug/gosym", "\x03i\n\xc5\x01\x01\x01\x02"}, - {"debug/macho", "\x03\x06V\r\ng\x1c,\x17\x01"}, - {"debug/pe", "\x03\x06V\r\a\x03g\x1c,\x17\x01\x16"}, - {"debug/plan9obj", "l\a\x03g\x1c,"}, - {"embed", "s+B\x19\x01S"}, + {"crypto/internal/impl", "\xbe\x02"}, + {"crypto/internal/rand", "\x1b\x0f s=["}, + {"crypto/internal/randutil", "\xfa\x01\x12"}, + {"crypto/internal/sysrand", "tq! \r\r\x01\x01\r\x06"}, + {"crypto/internal/sysrand/internal/seccomp", "t"}, + {"crypto/md5", "\x0e8.\x16\x16i"}, + {"crypto/mlkem", "\x0e%"}, + {"crypto/mlkem/mlkemtest", "3\x13\b&"}, + {"crypto/pbkdf2", "6\x0f\x01.\x16"}, + {"crypto/rand", "\x1b\x0f\x1c\x03+\x86\x01\rN"}, + {"crypto/rc4", "& .\xc9\x01"}, + {"crypto/rsa", "\x0e\r\x01\v\x10\x0e\x01\x03\b\a\x1c\x03\x133=\f\x01"}, + {"crypto/sha1", "\x0e\r+\x02,\x16\x16\x15T"}, + {"crypto/sha256", "\x0e\r\x1dR"}, + {"crypto/sha3", "\x0e+Q\xcb\x01"}, + {"crypto/sha512", "\x0e\r\x1fP"}, + {"crypto/subtle", "\x1f\x1d\x9f\x01z"}, + {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\x01\t\x01\x18\x01\x0f\x01\x03\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x13\x16\x15\b=\x16\x16\r\b\x01\x01\x01\x02\x01\x0e\x06\x02\x01\x0f"}, + {"crypto/tls/internal/fips140tls", "\x17\xaa\x02"}, + {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x017\x06\x01\x01\x02\x05\x0e\x06\x02\x02\x03F\x03:\x01\x02\b\x01\x01\x02\a\x10\x05\x01\x06\a\b\x02\x01\x02\x0f\x02\x01\x01\x02\x03\x01"}, + {"crypto/x509/pkix", "j\x06\a\x90\x01H"}, + {"database/sql", "\x03\nQ\x16\x03\x83\x01\v\a\"\x05\b\x02\x03\x01\x0e\x02\x02\x02"}, + {"database/sql/driver", "\rg\x03\xb7\x01\x0f\x12"}, + {"debug/buildinfo", "\x03^\x02\x01\x01\b\a\x03g\x1a\x02\x01+\x0f "}, + {"debug/dwarf", "\x03j\a\x03\x83\x011\x11\x01\x01"}, + {"debug/elf", "\x03\x06W\r\a\x03g\x1b\x01\f \x17\x01\x17"}, + {"debug/gosym", "\x03j\n$\xa1\x01\x01\x01\x02"}, + {"debug/macho", "\x03\x06W\r\ng\x1c,\x17\x01"}, + {"debug/pe", "\x03\x06W\r\a\x03g\x1c,\x17\x01\x17"}, + {"debug/plan9obj", "m\a\x03g\x1c,"}, + {"embed", "t+B\x19\x01T"}, {"embed/internal/embedtest", ""}, {"encoding", ""}, - {"encoding/ascii85", "\xf9\x01C"}, - {"encoding/asn1", "\x03p\x03g(\x01'\r\x02\x01\x10\x03\x01"}, - {"encoding/base32", "\xf9\x01A\x02"}, - {"encoding/base64", "\x9f\x01ZA\x02"}, - {"encoding/binary", "s\x86\x01\f(\r\x05"}, - {"encoding/csv", "\x02\x01p\x03\x83\x01D\x12\x02"}, - {"encoding/gob", "\x02e\x05\a\x03g\x1c\v\x01\x03\x1d\b\x12\x01\x0f\x02"}, - {"encoding/hex", "s\x03\x83\x01A\x03"}, - {"encoding/json", "\x03\x01c\x04\b\x03\x83\x01\f(\r\x02\x01\x02\x10\x01\x01\x02"}, - {"encoding/pem", "\x03h\b\x86\x01A\x03"}, - {"encoding/xml", "\x02\x01d\f\x03\x83\x014\x05\n\x01\x02\x10\x02"}, - {"errors", "\xcf\x01\x84\x01"}, - {"expvar", "pLA\b\v\x15\r\b\x02\x03\x01\x11"}, - {"flag", "g\f\x03\x83\x01,\b\x05\b\x02\x01\x10"}, - {"fmt", "sF'\x19\f \b\r\x02\x03\x12"}, - {"go/ast", "\x03\x01r\x0f\x01s\x03)\b\r\x02\x01\x12\x02"}, - {"go/build", "\x02\x01p\x03\x01\x02\x02\b\x02\x01\x17\x1f\x04\x02\b\x1c\x13\x01+\x01\x04\x01\a\b\x02\x01\x12\x02\x02"}, - {"go/build/constraint", "s\xc9\x01\x01\x12\x02"}, - {"go/constant", "v\x10\x7f\x01\x024\x01\x02\x12"}, - {"go/doc", "\x04r\x01\x05\n=61\x10\x02\x01\x12\x02"}, - {"go/doc/comment", "\x03s\xc4\x01\x01\x01\x01\x12\x02"}, - {"go/format", "\x03s\x01\f\x01\x02sD"}, - {"go/importer", "x\a\x01\x02\x04\x01r9"}, - {"go/internal/gccgoimporter", "\x02\x01]\x13\x03\x04\f\x01p\x02,\x01\x05\x11\x01\f\b"}, - {"go/internal/gcimporter", "\x02t\x10\x010\x05\r0,\x15\x03\x02"}, - {"go/internal/scannerhooks", "\x86\x01"}, - {"go/internal/srcimporter", "v\x01\x01\v\x03\x01r,\x01\x05\x12\x02\x14"}, - {"go/parser", "\x03p\x03\x01\x02\b\x04\x01s\x01+\x06\x12"}, - {"go/printer", "v\x01\x02\x03\ns\f \x15\x02\x01\x02\v\x05\x02"}, - {"go/scanner", "\x03s\v\x05s2\x10\x01\x13\x02"}, - {"go/token", "\x04r\x86\x01>\x02\x03\x01\x0f\x02"}, - {"go/types", "\x03\x01\x06i\x03\x01\x03\t\x03\x024\x063\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x0f\x02\x02"}, - {"go/version", "\xc1\x01|"}, - {"hash", "\xf9\x01"}, - {"hash/adler32", "s\x16\x16"}, - {"hash/crc32", "s\x16\x16\x15\x8b\x01\x01\x13"}, - {"hash/crc64", "s\x16\x16\xa0\x01"}, - {"hash/fnv", "s\x16\x16i"}, - {"hash/maphash", "\x89\x01\x11<}"}, - {"html", "\xbd\x02\x02\x12"}, - {"html/template", "\x03m\x06\x19-=\x01\n!\x05\x01\x02\x03\f\x01\x02\f\x01\x03\x02"}, - {"image", "\x02q\x1fg\x0f4\x03\x01"}, + {"encoding/ascii85", "\xfa\x01C"}, + {"encoding/asn1", "\x03q\x03g(\x01'\r\x02\x01\x11\x03\x01"}, + {"encoding/base32", "\xfa\x01A\x02"}, + {"encoding/base64", "\xa0\x01ZA\x02"}, + {"encoding/binary", "t\x86\x01\f(\r\x05"}, + {"encoding/csv", "\x02\x01q\x03\x83\x01D\x13\x02"}, + {"encoding/gob", "\x02f\x05\a\x03g\x1c\v\x01\x03\x1d\b\x12\x01\x10\x02"}, + {"encoding/hex", "t\x03\x83\x01A\x03"}, + {"encoding/json", "\x03\x01d\x04\b\x03\x83\x01\f(\r\x02\x01\x02\x11\x01\x01\x02"}, + {"encoding/pem", "\x03i\b\x86\x01A\x03"}, + {"encoding/xml", "\x02\x01e\f\x03\x83\x014\x05\n\x01\x02\x11\x02"}, + {"errors", "\xd0\x01\x85\x01"}, + {"expvar", "qLA\b\v\x15\r\b\x02\x03\x01\x12"}, + {"flag", "h\f\x03\x83\x01,\b\x05\b\x02\x01\x11"}, + {"fmt", "tF'\x19\f \b\r\x02\x03\x13"}, + {"go/ast", "\x03\x01s\x0f\x01s\x03)\b\r\x02\x01\x13\x02"}, + {"go/build", "\x02\x01q\x03\x01\x02\x02\b\x02\x01\x17\x1f\x04\x02\b\x1c\x13\x01+\x01\x04\x01\a\b\x02\x01\x13\x02\x02"}, + {"go/build/constraint", "t\xc9\x01\x01\x13\x02"}, + {"go/constant", "w\x10\x7f\x01\x024\x01\x02\x13"}, + {"go/doc", "\x04s\x01\x05\n=61\x10\x02\x01\x13\x02"}, + {"go/doc/comment", "\x03t\xc4\x01\x01\x01\x01\x13\x02"}, + {"go/format", "\x03t\x01\f\x01\x02sD"}, + {"go/importer", "y\a\x01\x02\x04\x01r9"}, + {"go/internal/gccgoimporter", "\x02\x01^\x13\x03\x04\f\x01p\x02,\x01\x05\x11\x01\r\b"}, + {"go/internal/gcimporter", "\x02u\x10\x010\x05\r0,\x15\x03\x02"}, + {"go/internal/scannerhooks", "\x87\x01"}, + {"go/internal/srcimporter", "w\x01\x01\v\x03\x01r,\x01\x05\x12\x02\x15"}, + {"go/parser", "\x03q\x03\x01\x02\b\x04\x01s\x01+\x06\x12"}, + {"go/printer", "w\x01\x02\x03\ns\f \x15\x02\x01\x02\f\x05\x02"}, + {"go/scanner", "\x03t\v\x05s2\x10\x01\x14\x02"}, + {"go/token", "\x04s\x86\x01>\x02\x03\x01\x10\x02"}, + {"go/types", "\x03\x01\x06j\x03\x01\x03\t\x03\x024\x063\x04\x03\t \x06\a\b\x01\x01\x01\x02\x01\x10\x02\x02"}, + {"go/version", "\xc2\x01|"}, + {"hash", "\xfa\x01"}, + {"hash/adler32", "t\x16\x16"}, + {"hash/crc32", "t\x16\x16\x15\x8b\x01\x01\x14"}, + {"hash/crc64", "t\x16\x16\xa0\x01"}, + {"hash/fnv", "t\x16\x16i"}, + {"hash/maphash", "\x8a\x01\x11<~"}, + {"html", "\xbe\x02\x02\x13"}, + {"html/template", "\x03n\x06\x19-=\x01\n!\x05\x01\x02\x03\f\x01\x02\r\x01\x03\x02"}, + {"image", "\x02r\x1fg\x0f4\x03\x01"}, {"image/color", ""}, - {"image/color/palette", "\x92\x01"}, - {"image/draw", "\x91\x01\x01\x04"}, - {"image/gif", "\x02\x01\x05k\x03\x1b\x01\x01\x01\vZ\x0f"}, - {"image/internal/imageutil", "\x91\x01"}, - {"image/jpeg", "\x02q\x1e\x01\x04c"}, - {"image/png", "\x02\ac\n\x13\x02\x06\x01gC"}, - {"index/suffixarray", "\x03i\a\x86\x01\f+\n\x01"}, - {"internal/abi", "\xbb\x01\x98\x01"}, - {"internal/asan", "\xd3\x02"}, - {"internal/bisect", "\xb2\x02\r\x01"}, - {"internal/buildcfg", "vHg\x06\x02\x05\n\x01"}, - {"internal/bytealg", "\xb4\x01\x9f\x01"}, + {"image/color/palette", "\x93\x01"}, + {"image/draw", "\x92\x01\x01\x04"}, + {"image/gif", "\x02\x01\x05l\x03\x1b\x01\x01\x01\vZ\x0f"}, + {"image/internal/imageutil", "\x92\x01"}, + {"image/jpeg", "\x02r\x1e\x01\x04c"}, + {"image/png", "\x02\ad\n\x13\x02\x06\x01gC"}, + {"index/suffixarray", "\x03j\a\x86\x01\f+\n\x01"}, + {"internal/abi", "\xbc\x01\x99\x01"}, + {"internal/asan", "\xd5\x02"}, + {"internal/bisect", "\xb3\x02\r\x01"}, + {"internal/buildcfg", "wHg\x06\x02\x05\n\x01"}, + {"internal/bytealg", "\xb5\x01\xa0\x01"}, {"internal/byteorder", ""}, {"internal/cfg", ""}, - {"internal/cgrouptest", "v[T\x06\x0f\x02\x01\x04\x01"}, - {"internal/chacha8rand", "\x9f\x01\x15\a\x98\x01"}, + {"internal/cgrouptest", "w[T\x06\x0f\x02\x01\x04\x01"}, + {"internal/chacha8rand", "\xa0\x01\x15\a\x99\x01"}, {"internal/copyright", ""}, {"internal/coverage", ""}, {"internal/coverage/calloc", ""}, - {"internal/coverage/cfile", "p\x06\x17\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01\"\x02',\x06\a\n\x01\x03\r\x06"}, - {"internal/coverage/cformat", "\x04r.\x04Q\v6\x01\x02\r"}, - {"internal/coverage/cmerge", "v.a"}, - {"internal/coverage/decodecounter", "l\n.\v\x02H,\x17\x17"}, - {"internal/coverage/decodemeta", "\x02j\n\x17\x17\v\x02H,"}, - {"internal/coverage/encodecounter", "\x02j\n.\f\x01\x02F\v!\x15"}, - {"internal/coverage/encodemeta", "\x02\x01i\n\x13\x04\x17\r\x02F,."}, - {"internal/coverage/pods", "\x04r.\x81\x01\x06\x05\n\x02\x01"}, - {"internal/coverage/rtcov", "\xd3\x02"}, - {"internal/coverage/slicereader", "l\n\x83\x01Z"}, - {"internal/coverage/slicewriter", "v\x83\x01"}, - {"internal/coverage/stringtab", "v9\x04F"}, + {"internal/coverage/cfile", "q\x06\x17\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01\"\x02',\x06\a\n\x01\x03\x0e\x06"}, + {"internal/coverage/cformat", "\x04s.\x04Q\v6\x01\x02\x0e"}, + {"internal/coverage/cmerge", "w.a"}, + {"internal/coverage/decodecounter", "m\n.\v\x02H,\x17\x18"}, + {"internal/coverage/decodemeta", "\x02k\n\x17\x17\v\x02H,"}, + {"internal/coverage/encodecounter", "\x02k\n.\f\x01\x02F\v!\x15"}, + {"internal/coverage/encodemeta", "\x02\x01j\n\x13\x04\x17\r\x02F,/"}, + {"internal/coverage/pods", "\x04s.\x81\x01\x06\x05\n\x02\x01"}, + {"internal/coverage/rtcov", "\xd5\x02"}, + {"internal/coverage/slicereader", "m\n\x83\x01["}, + {"internal/coverage/slicewriter", "w\x83\x01"}, + {"internal/coverage/stringtab", "w9\x04F"}, {"internal/coverage/test", ""}, {"internal/coverage/uleb128", ""}, - {"internal/cpu", "\xd3\x02"}, - {"internal/dag", "\x04r\xc4\x01\x03"}, - {"internal/diff", "\x03s\xc5\x01\x02"}, - {"internal/exportdata", "\x02\x01p\x03\x02e\x1c,\x01\x05\x11\x01\x02"}, - {"internal/filepathlite", "s+B\x1a@"}, - {"internal/fmtsort", "\x04\xa9\x02\r"}, - {"internal/fuzz", "\x03\nG\x18\x04\x03\x03\x01\f\x036=\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\f\x04\x02"}, + {"internal/cpu", "\xd5\x02"}, + {"internal/dag", "\x04s\xc4\x01\x03"}, + {"internal/diff", "\x03t\xc5\x01\x02"}, + {"internal/exportdata", "\x02\x01q\x03\x02e\x1c,\x01\x05\x11\x01\x02"}, + {"internal/filepathlite", "t+B\x1a@"}, + {"internal/fmtsort", "\x04\xaa\x02\r"}, + {"internal/fuzz", "\x03\nH\x18\x04\x03\x03\x01\f\x036=\f\x03\x1d\x01\x05\x02\x05\n\x01\x02\x01\x01\r\x04\x02"}, {"internal/goarch", ""}, - {"internal/godebug", "\x9c\x01!\x82\x01\x01\x13"}, + {"internal/godebug", "\x9d\x01!\x82\x01\x01\x14"}, {"internal/godebugs", ""}, {"internal/goexperiment", ""}, {"internal/goos", ""}, - {"internal/goroot", "\xa5\x02\x01\x05\x12\x02"}, + {"internal/goroot", "\xa6\x02\x01\x05\x12\x02"}, {"internal/gover", "\x04"}, {"internal/goversion", ""}, - {"internal/lazyregexp", "\xa5\x02\v\r\x02"}, - {"internal/lazytemplate", "\xf9\x01,\x18\x02\f"}, - {"internal/msan", "\xd3\x02"}, + {"internal/lazyregexp", "\xa6\x02\v\r\x02"}, + {"internal/lazytemplate", "\xfa\x01,\x18\x02\r"}, + {"internal/msan", "\xd5\x02"}, {"internal/nettrace", ""}, - {"internal/obscuretestdata", "k\x8e\x01,"}, - {"internal/oserror", "s"}, - {"internal/pkgbits", "\x03Q\x18\a\x03\x04\fs\r\x1f\r\n\x01"}, + {"internal/obscuretestdata", "l\x8e\x01,"}, + {"internal/oserror", "t"}, + {"internal/pkgbits", "\x03R\x18\a\x03\x04\fs\r\x1f\r\n\x01"}, {"internal/platform", ""}, - {"internal/poll", "sl\x05\x159\r\x01\x01\f\x06"}, - {"internal/profile", "\x03\x04l\x03\x83\x017\n\x01\x01\x01\x10"}, + {"internal/poll", "tl\x05\x159\r\x01\x01\r\x06"}, + {"internal/profile", "\x03\x04m\x03\x83\x017\n\x01\x01\x01\x11"}, {"internal/profilerecord", ""}, - {"internal/race", "\x9a\x01\xb9\x01"}, - {"internal/reflectlite", "\x9a\x01!;\x16"}, - {"vendor/golang.org/x/text/unicode/norm", "l\n\x83\x01F\x12\x11"}, - {"weak", "\x9a\x01\x98\x01!"}, + {"vendor/golang.org/x/crypto/internal/alias", "\xd5\x02"}, + {"vendor/golang.org/x/crypto/internal/poly1305", "X\x15\x9c\x01"}, + {"vendor/golang.org/x/net/dns/dnsmessage", "t\xc7\x01"}, + {"vendor/golang.org/x/net/http/httpguts", "\x90\x02\x14\x1a\x15\r"}, + {"vendor/golang.org/x/net/http/httpproxy", "t\x03\x99\x01\x10\x05\x01\x18\x15\r"}, + {"vendor/golang.org/x/net/http2/hpack", "\x03q\x03\x83\x01F"}, + {"vendor/golang.org/x/net/idna", "w\x8f\x018\x15\x10\x02\x01"}, + {"vendor/golang.org/x/net/nettest", "\x03j\a\x03\x83\x01\x11\x05\x16\x01\f\n\x01\x02\x02\x01\f"}, + {"vendor/golang.org/x/sys/cpu", "\xa6\x02\r\n\x01\x17"}, + {"vendor/golang.org/x/text/secure/bidirule", "t\xdf\x01\x11\x01"}, + {"vendor/golang.org/x/text/transform", "\x03q\x86\x01Y"}, + {"vendor/golang.org/x/text/unicode/bidi", "\x03\bl\x87\x01>\x17"}, + {"vendor/golang.org/x/text/unicode/norm", "m\n\x83\x01F\x13\x11"}, + {"weak", "\x9b\x01\x98\x01\""}, } // bootstrap is the list of bootstrap packages extracted from cmd/dist. diff --git a/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/vendor/golang.org/x/tools/internal/stdlib/manifest.go index f1e24625a..33e4f505f 100644 --- a/vendor/golang.org/x/tools/internal/stdlib/manifest.go +++ b/vendor/golang.org/x/tools/internal/stdlib/manifest.go @@ -626,7 +626,7 @@ var PackageSymbols = map[string][]Symbol{ {"PublicKey", Type, 0, ""}, {"PublicKey.Parameters", Field, 0, ""}, {"PublicKey.Y", Field, 0, ""}, - {"Sign", Func, 0, "func(rand io.Reader, priv *PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)"}, + {"Sign", Func, 0, "func(random io.Reader, priv *PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)"}, {"Verify", Func, 0, "func(pub *PublicKey, hash []byte, r *big.Int, s *big.Int) bool"}, }, "crypto/ecdh": { @@ -674,7 +674,7 @@ var PackageSymbols = map[string][]Symbol{ {"(PublicKey).Params", Method, 0, ""}, {"(PublicKey).ScalarBaseMult", Method, 0, ""}, {"(PublicKey).ScalarMult", Method, 0, ""}, - {"GenerateKey", Func, 0, "func(c elliptic.Curve, rand io.Reader) (*PrivateKey, error)"}, + {"GenerateKey", Func, 0, "func(c elliptic.Curve, r io.Reader) (*PrivateKey, error)"}, {"ParseRawPrivateKey", Func, 25, "func(curve elliptic.Curve, data []byte) (*PrivateKey, error)"}, {"ParseUncompressedPublicKey", Func, 25, "func(curve elliptic.Curve, data []byte) (*PublicKey, error)"}, {"PrivateKey", Type, 0, ""}, @@ -685,7 +685,7 @@ var PackageSymbols = map[string][]Symbol{ {"PublicKey.X", Field, 0, ""}, {"PublicKey.Y", Field, 0, ""}, {"Sign", Func, 0, "func(rand io.Reader, priv *PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)"}, - {"SignASN1", Func, 15, "func(rand io.Reader, priv *PrivateKey, hash []byte) ([]byte, error)"}, + {"SignASN1", Func, 15, "func(r io.Reader, priv *PrivateKey, hash []byte) ([]byte, error)"}, {"Verify", Func, 0, "func(pub *PublicKey, hash []byte, r *big.Int, s *big.Int) bool"}, {"VerifyASN1", Func, 15, "func(pub *PublicKey, hash []byte, sig []byte) bool"}, }, @@ -696,7 +696,7 @@ var PackageSymbols = map[string][]Symbol{ {"(PrivateKey).Seed", Method, 13, ""}, {"(PrivateKey).Sign", Method, 13, ""}, {"(PublicKey).Equal", Method, 15, ""}, - {"GenerateKey", Func, 13, "func(rand io.Reader) (PublicKey, PrivateKey, error)"}, + {"GenerateKey", Func, 13, "func(random io.Reader) (PublicKey, PrivateKey, error)"}, {"NewKeyFromSeed", Func, 13, "func(seed []byte) PrivateKey"}, {"Options", Type, 20, ""}, {"Options.Context", Field, 20, ""}, @@ -745,7 +745,9 @@ var PackageSymbols = map[string][]Symbol{ }, "crypto/fips140": { {"Enabled", Func, 24, "func() bool"}, + {"Enforced", Func, 26, "func() bool"}, {"Version", Func, 26, "func() string"}, + {"WithoutEnforcement", Func, 26, "func(f func())"}, }, "crypto/hkdf": { {"Expand", Func, 24, "func[H hash.Hash](h func() H, pseudorandomKey []byte, info string, keyLength int) ([]byte, error)"}, @@ -756,6 +758,54 @@ var PackageSymbols = map[string][]Symbol{ {"Equal", Func, 1, "func(mac1 []byte, mac2 []byte) bool"}, {"New", Func, 0, "func(h func() hash.Hash, key []byte) hash.Hash"}, }, + "crypto/hpke": { + {"(*Recipient).Export", Method, 26, ""}, + {"(*Recipient).Open", Method, 26, ""}, + {"(*Sender).Export", Method, 26, ""}, + {"(*Sender).Seal", Method, 26, ""}, + {"(AEAD).ID", Method, 26, ""}, + {"(KDF).ID", Method, 26, ""}, + {"(KEM).DeriveKeyPair", Method, 26, ""}, + {"(KEM).GenerateKey", Method, 26, ""}, + {"(KEM).ID", Method, 26, ""}, + {"(KEM).NewPrivateKey", Method, 26, ""}, + {"(KEM).NewPublicKey", Method, 26, ""}, + {"(PrivateKey).Bytes", Method, 26, ""}, + {"(PrivateKey).KEM", Method, 26, ""}, + {"(PrivateKey).PublicKey", Method, 26, ""}, + {"(PublicKey).Bytes", Method, 26, ""}, + {"(PublicKey).KEM", Method, 26, ""}, + {"AES128GCM", Func, 26, "func() AEAD"}, + {"AES256GCM", Func, 26, "func() AEAD"}, + {"ChaCha20Poly1305", Func, 26, "func() AEAD"}, + {"DHKEM", Func, 26, "func(curve ecdh.Curve) KEM"}, + {"ExportOnly", Func, 26, "func() AEAD"}, + {"HKDFSHA256", Func, 26, "func() KDF"}, + {"HKDFSHA384", Func, 26, "func() KDF"}, + {"HKDFSHA512", Func, 26, "func() KDF"}, + {"MLKEM1024", Func, 26, "func() KEM"}, + {"MLKEM1024P384", Func, 26, "func() KEM"}, + {"MLKEM768", Func, 26, "func() KEM"}, + {"MLKEM768P256", Func, 26, "func() KEM"}, + {"MLKEM768X25519", Func, 26, "func() KEM"}, + {"NewAEAD", Func, 26, "func(id uint16) (AEAD, error)"}, + {"NewDHKEMPrivateKey", Func, 26, "func(priv ecdh.KeyExchanger) (PrivateKey, error)"}, + {"NewDHKEMPublicKey", Func, 26, "func(pub *ecdh.PublicKey) (PublicKey, error)"}, + {"NewHybridPrivateKey", Func, 26, "func(pq crypto.Decapsulator, t ecdh.KeyExchanger) (PrivateKey, error)"}, + {"NewHybridPublicKey", Func, 26, "func(pq crypto.Encapsulator, t *ecdh.PublicKey) (PublicKey, error)"}, + {"NewKDF", Func, 26, "func(id uint16) (KDF, error)"}, + {"NewKEM", Func, 26, "func(id uint16) (KEM, error)"}, + {"NewMLKEMPrivateKey", Func, 26, "func(priv crypto.Decapsulator) (PrivateKey, error)"}, + {"NewMLKEMPublicKey", Func, 26, "func(pub crypto.Encapsulator) (PublicKey, error)"}, + {"NewRecipient", Func, 26, "func(enc []byte, k PrivateKey, kdf KDF, aead AEAD, info []byte) (*Recipient, error)"}, + {"NewSender", Func, 26, "func(pk PublicKey, kdf KDF, aead AEAD, info []byte) (enc []byte, s *Sender, err error)"}, + {"Open", Func, 26, "func(k PrivateKey, kdf KDF, aead AEAD, info []byte, ciphertext []byte) ([]byte, error)"}, + {"Recipient", Type, 26, ""}, + {"SHAKE128", Func, 26, "func() KDF"}, + {"SHAKE256", Func, 26, "func() KDF"}, + {"Seal", Func, 26, "func(pk PublicKey, kdf KDF, aead AEAD, info []byte, plaintext []byte) ([]byte, error)"}, + {"Sender", Type, 26, ""}, + }, "crypto/md5": { {"BlockSize", Const, 0, ""}, {"New", Func, 0, "func() hash.Hash"}, @@ -801,7 +851,7 @@ var PackageSymbols = map[string][]Symbol{ }, "crypto/rand": { {"Int", Func, 0, "func(rand io.Reader, max *big.Int) (n *big.Int, err error)"}, - {"Prime", Func, 0, "func(rand io.Reader, bits int) (*big.Int, error)"}, + {"Prime", Func, 0, "func(r io.Reader, bits int) (*big.Int, error)"}, {"Read", Func, 0, "func(b []byte) (n int, err error)"}, {"Reader", Var, 0, ""}, {"Text", Func, 24, "func() string"}, @@ -865,7 +915,7 @@ var PackageSymbols = map[string][]Symbol{ {"PublicKey.E", Field, 0, ""}, {"PublicKey.N", Field, 0, ""}, {"SignPKCS1v15", Func, 0, "func(random io.Reader, priv *PrivateKey, hash crypto.Hash, hashed []byte) ([]byte, error)"}, - {"SignPSS", Func, 2, "func(rand io.Reader, priv *PrivateKey, hash crypto.Hash, digest []byte, opts *PSSOptions) ([]byte, error)"}, + {"SignPSS", Func, 2, "func(random io.Reader, priv *PrivateKey, hash crypto.Hash, digest []byte, opts *PSSOptions) ([]byte, error)"}, {"VerifyPKCS1v15", Func, 0, "func(pub *PublicKey, hash crypto.Hash, hashed []byte, sig []byte) error"}, {"VerifyPSS", Func, 2, "func(pub *PublicKey, hash crypto.Hash, digest []byte, sig []byte, opts *PSSOptions) error"}, }, @@ -1158,6 +1208,8 @@ var PackageSymbols = map[string][]Symbol{ {"RequestClientCert", Const, 0, ""}, {"RequireAndVerifyClientCert", Const, 0, ""}, {"RequireAnyClientCert", Const, 0, ""}, + {"SecP256r1MLKEM768", Const, 26, ""}, + {"SecP384r1MLKEM1024", Const, 26, ""}, {"Server", Func, 0, "func(conn net.Conn, config *Config) *Conn"}, {"SessionState", Type, 21, ""}, {"SessionState.EarlyData", Field, 21, ""}, @@ -1222,6 +1274,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*RevocationList).CheckSignatureFrom", Method, 19, ""}, {"(CertificateInvalidError).Error", Method, 0, ""}, {"(ConstraintViolationError).Error", Method, 0, ""}, + {"(ExtKeyUsage).OID", Method, 26, ""}, {"(ExtKeyUsage).String", Method, 26, ""}, {"(HostnameError).Error", Method, 0, ""}, {"(InsecureAlgorithmError).Error", Method, 6, ""}, @@ -1380,6 +1433,7 @@ var PackageSymbols = map[string][]Symbol{ {"NoValidChains", Const, 24, ""}, {"NotAuthorizedToSign", Const, 0, ""}, {"OID", Type, 22, ""}, + {"OIDFromASN1OID", Func, 26, "func(asn1OID asn1.ObjectIdentifier) (OID, error)"}, {"OIDFromInts", Func, 22, "func(oid []uint64) (OID, error)"}, {"PEMCipher", Type, 1, ""}, {"PEMCipher3DES", Const, 1, ""}, @@ -1690,10 +1744,6 @@ var PackageSymbols = map[string][]Symbol{ {"(Rows).Next", Method, 0, ""}, {"(RowsAffected).LastInsertId", Method, 0, ""}, {"(RowsAffected).RowsAffected", Method, 0, ""}, - {"(RowsColumnScanner).Close", Method, 26, ""}, - {"(RowsColumnScanner).Columns", Method, 26, ""}, - {"(RowsColumnScanner).Next", Method, 26, ""}, - {"(RowsColumnScanner).ScanColumn", Method, 26, ""}, {"(RowsColumnTypeDatabaseTypeName).Close", Method, 8, ""}, {"(RowsColumnTypeDatabaseTypeName).ColumnTypeDatabaseTypeName", Method, 8, ""}, {"(RowsColumnTypeDatabaseTypeName).Columns", Method, 8, ""}, @@ -1765,7 +1815,6 @@ var PackageSymbols = map[string][]Symbol{ {"ResultNoRows", Var, 0, ""}, {"Rows", Type, 0, ""}, {"RowsAffected", Type, 0, ""}, - {"RowsColumnScanner", Type, 26, ""}, {"RowsColumnTypeDatabaseTypeName", Type, 8, ""}, {"RowsColumnTypeLength", Type, 8, ""}, {"RowsColumnTypeNullable", Type, 8, ""}, @@ -17367,6 +17416,9 @@ var PackageSymbols = map[string][]Symbol{ {"Testing", Func, 21, "func() bool"}, {"Verbose", Func, 1, "func() bool"}, }, + "testing/cryptotest": { + {"SetGlobalRandom", Func, 26, "func(t *testing.T, seed uint64)"}, + }, "testing/fstest": { {"(MapFS).Glob", Method, 16, ""}, {"(MapFS).Lstat", Method, 25, ""}, diff --git a/vendor/modules.txt b/vendor/modules.txt index e124e4f5a..c2a677daf 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,7 +1,7 @@ # cloud.google.com/go/compute/metadata v0.9.0 ## explicit; go 1.24.0 cloud.google.com/go/compute/metadata -# code.gitea.io/sdk/gitea v0.22.1 +# code.gitea.io/sdk/gitea v0.23.2 ## explicit; go 1.23.0 code.gitea.io/sdk/gitea # dario.cat/mergo v1.0.2 @@ -483,7 +483,7 @@ github.com/google/go-github/v75/github # github.com/google/go-querystring v1.1.0 ## explicit; go 1.10 github.com/google/go-querystring/query -# github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 +# github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 ## explicit; go 1.24.0 github.com/google/pprof/profile # github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 @@ -575,8 +575,8 @@ github.com/munnerz/goautoneg # github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f ## explicit github.com/mxk/go-flowrate/flowrate -# github.com/onsi/ginkgo/v2 v2.27.4 -## explicit; go 1.23.0 +# github.com/onsi/ginkgo/v2 v2.28.1 +## explicit; go 1.24.0 github.com/onsi/ginkgo/v2 github.com/onsi/ginkgo/v2/config github.com/onsi/ginkgo/v2/formatter @@ -599,8 +599,8 @@ github.com/onsi/ginkgo/v2/internal/reporters github.com/onsi/ginkgo/v2/internal/testingtproxy github.com/onsi/ginkgo/v2/reporters github.com/onsi/ginkgo/v2/types -# github.com/onsi/gomega v1.39.0 -## explicit; go 1.23.0 +# github.com/onsi/gomega v1.39.1 +## explicit; go 1.24.0 github.com/onsi/gomega github.com/onsi/gomega/format github.com/onsi/gomega/internal @@ -944,7 +944,7 @@ golang.org/x/text/unicode/norm # golang.org/x/time v0.12.0 ## explicit; go 1.23.0 golang.org/x/time/rate -# golang.org/x/tools v0.40.0 +# golang.org/x/tools v0.41.0 ## explicit; go 1.24.0 golang.org/x/tools/cover golang.org/x/tools/go/ast/edge