Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: support azure webhook event (#11436)
ecmadao8ee1df146e4f
diff --git a/backend/api/gitops/azure.go b/backend/api/gitops/azure.gonew file mode 100644index 0000000000..f0cfeb3598--- /dev/null+++ b/backend/api/gitops/azure.go@@ -0,0 +1,65 @@+package gitops++import (+ "context"+ "encoding/json"++ "github.com/pkg/errors"++ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs/azure"+ "github.com/bytebase/bytebase/backend/store"+)++func getAzurePullRequestInfo(ctx context.Context, vcsProvider *store.VCSProviderMessage, vcsConnector *store.VCSConnectorMessage, body []byte) (*pullRequestInfo, error) {+ var pushEvent azure.PullRequestEvent+ if err := json.Unmarshal(body, &pushEvent); err != nil {+ return nil, errors.Errorf("failed to unmarshal push event, error %v", err)+ }++ targetBranch, err := vcs.Branch(pushEvent.Resource.TargetRefName)+ if err != nil {+ return nil, errors.Errorf("failed to get target branch, error %v", err)+ }++ if vcsConnector.Payload.Branch != targetBranch {+ return nil, errors.Errorf("committed to branch %q, want branch %q", targetBranch, vcsConnector.Payload.Branch)+ }++ mrFiles, err := vcs.Get(+ vcs.AzureDevOps,+ vcs.ProviderConfig{InstanceURL: vcsProvider.InstanceURL, AuthToken: vcsProvider.AccessToken},+ ).ListPullRequestFile(+ ctx,+ vcsConnector.Payload.ExternalId,+ pushEvent.Resource.LastMergeCommit.CommitID,+ )+ if err != nil {+ return nil, errors.Errorf("failed to list merge request files by commit %v, error %v", pushEvent.Resource.LastMergeCommit.CommitID, err)+ }++ prInfo := &pullRequestInfo{+ // TODO(ed): get the email.+ url: pushEvent.Resource.Links.Web.Href,+ title: pushEvent.Message.Text,+ description: pushEvent.DetailedMessage.Text,+ changes: getChangesByFileList(mrFiles, vcsConnector.Payload.BaseDirectory),+ }++ for _, file := range prInfo.changes {+ content, err := vcs.Get(+ vcs.AzureDevOps,+ vcs.ProviderConfig{InstanceURL: vcsProvider.InstanceURL, AuthToken: vcsProvider.AccessToken},+ ).ReadFileContent(+ ctx,+ vcsConnector.Payload.ExternalId,+ file.path,+ vcs.RefInfo{RefType: vcs.RefTypeCommit, RefName: pushEvent.Resource.LastMergeCommit.CommitID})+ if err != nil {+ return nil, errors.Errorf("failed read file content, merge request %q, file %q, error %v", pushEvent.Resource.Links.Web, file.path, err)+ }+ file.content = content+ }++ return prInfo, nil+}diff --git a/backend/api/gitops/bitbucket.go b/backend/api/gitops/bitbucket.goindex 1201854fc2..a562160c0e 100644--- a/backend/api/gitops/bitbucket.go+++ b/backend/api/gitops/bitbucket.go@@ -4,12 +4,9 @@ import ("context""encoding/json""fmt"- "log/slog"- "path/filepath""github.com/pkg/errors"- "github.com/bytebase/bytebase/backend/common/log""github.com/bytebase/bytebase/backend/plugin/vcs""github.com/bytebase/bytebase/backend/plugin/vcs/bitbucket""github.com/bytebase/bytebase/backend/store"@@ -35,23 +32,9 @@ func getBitBucketPullRequestInfo(ctx context.Context, vcsProvider *store.VCSProvurl: pushEvent.PullRequest.Links.HTML.Href,title: pushEvent.PullRequest.Title,description: pushEvent.PullRequest.Description,+ changes: getChangesByFileList(mrFiles, vcsConnector.Payload.BaseDirectory),}- for _, v := range mrFiles {- if v.IsDeleted {- continue- }- if filepath.Dir(v.Path) != vcsConnector.Payload.BaseDirectory {- continue- }- change, err := getFileChange(v.Path)- if err != nil {- slog.Error("failed to get file change info", slog.String("path", v.Path), log.BBError(err))- }- if change != nil {- change.path = v.Path- prInfo.changes = append(prInfo.changes, change)- }- }+for _, file := range prInfo.changes {content, err := vcs.Get(vcs.Bitbucket, vcs.ProviderConfig{InstanceURL: vcsProvider.InstanceURL, AuthToken: vcsProvider.AccessToken}).ReadFileContent(ctx, vcsConnector.Payload.ExternalId, file.path, vcs.RefInfo{RefType: vcs.RefTypeCommit, RefName: pushEvent.PullRequest.Source.Commit.Hash})if err != nil {diff --git a/backend/api/gitops/common.go b/backend/api/gitops/common.goindex 96050f5910..c5371a872c 100644--- a/backend/api/gitops/common.go+++ b/backend/api/gitops/common.go@@ -1,10 +1,13 @@package gitopsimport (+ "log/slog""path/filepath""regexp""strings"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/vcs"v1pb "github.com/bytebase/bytebase/proto/generated-go/v1")@@ -28,6 +31,27 @@ type fileChange struct {content string}+func getChangesByFileList(files []*vcs.PullRequestFile, branch string) []*fileChange {+ changes := []*fileChange{}+ for _, v := range files {+ if v.IsDeleted {+ continue+ }+ if filepath.Dir(v.Path) != branch {+ continue+ }+ change, err := getFileChange(v.Path)+ if err != nil {+ slog.Error("failed to get file change info", slog.String("path", v.Path), log.BBError(err))+ }+ if change != nil {+ change.path = v.Path+ changes = append(changes, change)+ }+ }+ return changes+}+func getFileChange(path string) (*fileChange, error) {filename := filepath.Base(path)if filepath.Ext(filename) != ".sql" {diff --git a/backend/api/gitops/github.go b/backend/api/gitops/github.goindex 47a8cbb161..b6e343bcb6 100644--- a/backend/api/gitops/github.go+++ b/backend/api/gitops/github.go@@ -4,12 +4,9 @@ import ("context""encoding/json""fmt"- "log/slog"- "path/filepath""github.com/pkg/errors"- "github.com/bytebase/bytebase/backend/common/log""github.com/bytebase/bytebase/backend/plugin/vcs""github.com/bytebase/bytebase/backend/plugin/vcs/github""github.com/bytebase/bytebase/backend/store"@@ -42,23 +39,9 @@ func getGitHubPullRequestInfo(ctx context.Context, vcsProvider *store.VCSProvideurl: pushEvent.PullRequest.URL,title: pushEvent.PullRequest.Title,description: pushEvent.PullRequest.Body,+ changes: getChangesByFileList(mrFiles, vcsConnector.Payload.BaseDirectory),}- for _, v := range mrFiles {- if v.IsDeleted {- continue- }- if filepath.Dir(v.Path) != vcsConnector.Payload.BaseDirectory {- continue- }- change, err := getFileChange(v.Path)- if err != nil {- slog.Error("failed to get file change info", slog.String("path", v.Path), log.BBError(err))- }- if change != nil {- change.path = v.Path- prInfo.changes = append(prInfo.changes, change)- }- }+for _, file := range prInfo.changes {content, err := vcs.Get(vcs.GitHub, vcs.ProviderConfig{InstanceURL: vcsProvider.InstanceURL, AuthToken: vcsProvider.AccessToken}).ReadFileContent(ctx, vcsConnector.Payload.ExternalId, file.path, vcs.RefInfo{RefType: vcs.RefTypeCommit, RefName: pushEvent.PullRequest.Head.SHA})if err != nil {diff --git a/backend/api/gitops/gitlab.go b/backend/api/gitops/gitlab.goindex 96bcb203f9..5ce977a819 100644--- a/backend/api/gitops/gitlab.go+++ b/backend/api/gitops/gitlab.go@@ -4,12 +4,9 @@ import ("context""encoding/json""fmt"- "log/slog"- "path/filepath""github.com/pkg/errors"- "github.com/bytebase/bytebase/backend/common/log""github.com/bytebase/bytebase/backend/plugin/vcs""github.com/bytebase/bytebase/backend/plugin/vcs/gitlab""github.com/bytebase/bytebase/backend/store"@@ -46,23 +43,9 @@ func getGitLabPullRequestInfo(ctx context.Context, vcsProvider *store.VCSProvideurl: pushEvent.ObjectAttributes.URL,title: pushEvent.ObjectAttributes.Title,description: pushEvent.ObjectAttributes.Description,+ changes: getChangesByFileList(mrFiles, vcsConnector.Payload.BaseDirectory),}- for _, v := range mrFiles {- if v.IsDeleted {- continue- }- if filepath.Dir(v.Path) != vcsConnector.Payload.BaseDirectory {- continue- }- change, err := getFileChange(v.Path)- if err != nil {- slog.Error("failed to get file change info", slog.String("path", v.Path), log.BBError(err))- }- if change != nil {- change.path = v.Path- prInfo.changes = append(prInfo.changes, change)- }- }+for _, file := range prInfo.changes {content, err := vcs.Get(vcs.GitLab, vcs.ProviderConfig{InstanceURL: vcsProvider.InstanceURL, AuthToken: vcsProvider.AccessToken}).ReadFileContent(ctx, vcsConnector.Payload.ExternalId, file.path, vcs.RefInfo{RefType: vcs.RefTypeCommit, RefName: pushEvent.ObjectAttributes.LastCommit.ID})if err != nil {diff --git a/backend/api/gitops/webhook.go b/backend/api/gitops/webhook.goindex 195b6146bb..bf17eefeab 100644--- a/backend/api/gitops/webhook.go+++ b/backend/api/gitops/webhook.go@@ -123,6 +123,16 @@ func (s *Service) RegisterWebhookRoutes(g *echo.Group) {if err != nil {return c.String(http.StatusOK, fmt.Sprintf("failed to get pr info from pull request, error %v", err))}+ case vcs.AzureDevOps:+ secretToken := c.Request().Header.Get("X-Azure-Token")+ if secretToken != vcsConnector.Payload.WebhookSecretToken {+ return c.String(http.StatusOK, fmt.Sprintf("invalid webhook secret token %q", secretToken))+ }++ prInfo, err = getAzurePullRequestInfo(ctx, vcsProvider, vcsConnector, body)+ if err != nil {+ return c.String(http.StatusOK, fmt.Sprintf("failed to get pr info from pull request, error %v", err))+ }default:return nil}diff --git a/backend/api/v1/acl_config.go b/backend/api/v1/acl_config.goindex 76a6575cef..9eadc7109b 100644--- a/backend/api/v1/acl_config.go+++ b/backend/api/v1/acl_config.go@@ -116,26 +116,26 @@ var methodPermissionMap = map[string]iam.Permission{v1pb.InstanceRoleService_DeleteInstanceRole_FullMethodName: iam.PermissionInstancesUpdate,v1pb.InstanceRoleService_UndeleteInstanceRole_FullMethodName: iam.PermissionInstancesUpdate,- v1pb.VCSProviderService_ListVCSProviders_FullMethodName: iam.PermissionVCSProvidersList,- v1pb.VCSProviderService_GetVCSProvider_FullMethodName: iam.PermissionVCSProvidersGet,- v1pb.VCSProviderService_CreateVCSProvider_FullMethodName: iam.PermissionVCSProvidersCreate,- v1pb.VCSProviderService_UpdateVCSProvider_FullMethodName: iam.PermissionVCSProvidersUpdate,- v1pb.VCSProviderService_DeleteVCSProvider_FullMethodName: iam.PermissionVCSProvidersDelete,- v1pb.VCSProviderService_SearchVCSProviderProjects_FullMethodName: iam.PermissionVCSProvidersSearchProjects,- v1pb.VCSProviderService_ListVCSConnectorsInProvider_FullMethodName: iam.PermissionVCSProvidersListProjects,- v1pb.RolloutService_ListPlans_FullMethodName: iam.PermissionPlansList,- v1pb.RolloutService_GetPlan_FullMethodName: iam.PermissionPlansGet,- v1pb.RolloutService_CreatePlan_FullMethodName: iam.PermissionPlansCreate,- v1pb.RolloutService_UpdatePlan_FullMethodName: iam.PermissionPlansUpdate,- v1pb.RolloutService_GetRollout_FullMethodName: iam.PermissionRolloutsGet,- v1pb.RolloutService_CreateRollout_FullMethodName: iam.PermissionRolloutsCreate,- v1pb.RolloutService_PreviewRollout_FullMethodName: iam.PermissionRolloutsPreview,- v1pb.RolloutService_ListTaskRuns_FullMethodName: iam.PermissionTaskRunsList,- v1pb.RolloutService_ListPlanCheckRuns_FullMethodName: iam.PermissionPlanCheckRunsList,- v1pb.RolloutService_RunPlanChecks_FullMethodName: iam.PermissionPlanCheckRunsRun,- v1pb.SettingService_ListSettings_FullMethodName: iam.PermissionSettingsList,- v1pb.SettingService_GetSetting_FullMethodName: iam.PermissionSettingsGet,- v1pb.SettingService_UpdateSetting_FullMethodName: iam.PermissionSettingsSet,+ v1pb.VCSProviderService_ListVCSProviders_FullMethodName: iam.PermissionVCSProvidersList,+ v1pb.VCSProviderService_GetVCSProvider_FullMethodName: iam.PermissionVCSProvidersGet,+ v1pb.VCSProviderService_CreateVCSProvider_FullMethodName: iam.PermissionVCSProvidersCreate,+ v1pb.VCSProviderService_UpdateVCSProvider_FullMethodName: iam.PermissionVCSProvidersUpdate,+ v1pb.VCSProviderService_DeleteVCSProvider_FullMethodName: iam.PermissionVCSProvidersDelete,+ v1pb.VCSProviderService_SearchVCSProviderRepositories_FullMethodName: iam.PermissionVCSProvidersSearchProjects,+ v1pb.VCSProviderService_ListVCSConnectorsInProvider_FullMethodName: iam.PermissionVCSProvidersListProjects,+ v1pb.RolloutService_ListPlans_FullMethodName: iam.PermissionPlansList,+ v1pb.RolloutService_GetPlan_FullMethodName: iam.PermissionPlansGet,+ v1pb.RolloutService_CreatePlan_FullMethodName: iam.PermissionPlansCreate,+ v1pb.RolloutService_UpdatePlan_FullMethodName: iam.PermissionPlansUpdate,+ v1pb.RolloutService_GetRollout_FullMethodName: iam.PermissionRolloutsGet,+ v1pb.RolloutService_CreateRollout_FullMethodName: iam.PermissionRolloutsCreate,+ v1pb.RolloutService_PreviewRollout_FullMethodName: iam.PermissionRolloutsPreview,+ v1pb.RolloutService_ListTaskRuns_FullMethodName: iam.PermissionTaskRunsList,+ v1pb.RolloutService_ListPlanCheckRuns_FullMethodName: iam.PermissionPlanCheckRunsList,+ v1pb.RolloutService_RunPlanChecks_FullMethodName: iam.PermissionPlanCheckRunsRun,+ v1pb.SettingService_ListSettings_FullMethodName: iam.PermissionSettingsList,+ v1pb.SettingService_GetSetting_FullMethodName: iam.PermissionSettingsGet,+ v1pb.SettingService_UpdateSetting_FullMethodName: iam.PermissionSettingsSet,v1pb.OrgPolicyService_ListPolicies_FullMethodName: iam.PermissionPoliciesList,v1pb.OrgPolicyService_GetPolicy_FullMethodName: iam.PermissionPoliciesGet,diff --git a/backend/api/v1/acl_iam.go b/backend/api/v1/acl_iam.goindex cf5d67991c..b2422913b3 100644--- a/backend/api/v1/acl_iam.go+++ b/backend/api/v1/acl_iam.go@@ -243,7 +243,7 @@ func (in *ACLInterceptor) doIAMPermissionCheck(ctx context.Context, fullMethod sv1pb.VCSProviderService_CreateVCSProvider_FullMethodName,v1pb.VCSProviderService_UpdateVCSProvider_FullMethodName,v1pb.VCSProviderService_DeleteVCSProvider_FullMethodName,- v1pb.VCSProviderService_SearchVCSProviderProjects_FullMethodName,+ v1pb.VCSProviderService_SearchVCSProviderRepositories_FullMethodName,v1pb.VCSProviderService_ListVCSConnectorsInProvider_FullMethodName,v1pb.RiskService_ListRisks_FullMethodName,v1pb.RiskService_CreateRisk_FullMethodName,diff --git a/backend/api/v1/vcs_connector_service.go b/backend/api/v1/vcs_connector_service.goindex 57fa0077a0..ab496ea3b5 100644--- a/backend/api/v1/vcs_connector_service.go+++ b/backend/api/v1/vcs_connector_service.go@@ -149,7 +149,14 @@ func (s *VCSConnectorService) CreateVCSConnector(ctx context.Context, request *vbytebaseEndpointURL = setting.ExternalUrl}webhookEndpointID := fmt.Sprintf("workspaces/%s/projects/%s/vcsConnectors/%s", workspaceID, project.ResourceID, request.VcsConnectorId)- webhookID, err := createVCSWebhook(ctx, vcsProvider, webhookEndpointID, secretToken, vcsConnectorCreate.Payload.ExternalId, bytebaseEndpointURL)+ webhookID, err := createVCSWebhook(+ ctx,+ vcsProvider,+ webhookEndpointID,+ secretToken,+ vcsConnectorCreate.Payload.ExternalId,+ bytebaseEndpointURL,+ )if err != nil {return nil, status.Errorf(codes.Internal, "failed to create webhook for project %s with error: %v", vcsConnectorCreate.ProjectID, err.Error())}@@ -408,6 +415,7 @@ func convertStoreVCSConnector(ctx context.Context, stores *store.Store, vcsConneBaseDirectory: vcsConnector.Payload.BaseDirectory,Branch: vcsConnector.Payload.Branch,FullPath: vcsConnector.Payload.FullPath,+ WebUrl: vcsConnector.Payload.WebUrl,}return v1VCSConnector, nil}@@ -476,14 +484,15 @@ func createVCSWebhook(ctx context.Context, vcsProvider *store.VCSProviderMessageConsumerInputs: azure.WebhookCreateConsumerInputs{URL: fmt.Sprintf("%s/hook/%s", bytebaseEndpointURL, webhookEndpointID),AcceptUntrustedCerts: true,+ HTTPHeaders: fmt.Sprintf("X-Azure-Token: Bearer %s", webhookSecretToken),},EventType: "git.pullrequest.merged",PublisherID: "tfs",PublisherInputs: azure.WebhookCreatePublisherInputs{- Repository: repositoryID,- Branch: "", /* Any branches */- PushedBy: "", /* Any users */- ProjectID: projectID,+ Repository: repositoryID,+ Branch: "", /* Any branches */+ MergeResult: azure.WebhookMergeResultSucceeded,+ ProjectID: projectID,},}webhookCreatePayload, err = json.Marshal(webhookPost)diff --git a/backend/api/v1/vcs_provider_service.go b/backend/api/v1/vcs_provider_service.goindex f6187f93b2..2e0b07056c 100644--- a/backend/api/v1/vcs_provider_service.go+++ b/backend/api/v1/vcs_provider_service.go@@ -124,8 +124,8 @@ func (s *VCSProviderService) DeleteVCSProvider(ctx context.Context, request *v1preturn &emptypb.Empty{}, nil}-// SearchVCSProviderProjects searches vcs provider projects, for example, GitHub repository.-func (s *VCSProviderService) SearchVCSProviderProjects(ctx context.Context, request *v1pb.SearchVCSProviderProjectsRequest) (*v1pb.SearchVCSProviderProjectsResponse, error) {+// SearchVCSProviderRepositories searches vcs provider repositories, for example, GitHub repository.+func (s *VCSProviderService) SearchVCSProviderRepositories(ctx context.Context, request *v1pb.SearchVCSProviderRepositoriesRequest) (*v1pb.SearchVCSProviderRepositoriesResponse, error) {vcsProvider, err := s.getVCS(ctx, request.Name)if err != nil {return nil, err@@ -139,18 +139,18 @@ func (s *VCSProviderService) SearchVCSProviderProjects(ctx context.Context, requreturn nil, status.Errorf(codes.Internal, "Failed to fetch external project list: %v", err)}- var externalProjects []*v1pb.SearchVCSProviderProjectsResponse_Project+ var repositories []*v1pb.VCSRepositoryfor _, apiExternalProject := range apiExternalProjectList {- externalProjects = append(externalProjects, &v1pb.SearchVCSProviderProjectsResponse_Project{+ repositories = append(repositories, &v1pb.VCSRepository{Id: apiExternalProject.ID,Title: apiExternalProject.Name,- Fullpath: apiExternalProject.FullPath,+ FullPath: apiExternalProject.FullPath,WebUrl: apiExternalProject.WebURL,})}- return &v1pb.SearchVCSProviderProjectsResponse{- Projects: externalProjects,+ return &v1pb.SearchVCSProviderRepositoriesResponse{+ Repositories: repositories,}, nil}diff --git a/backend/plugin/vcs/azure/azure.go b/backend/plugin/vcs/azure/azure.goindex 873fb15189..5ad51fefc8 100644--- a/backend/plugin/vcs/azure/azure.go+++ b/backend/plugin/vcs/azure/azure.go@@ -3,6 +3,7 @@ package azureimport ("context"+ "encoding/base64""encoding/json""fmt""log/slog"@@ -10,7 +11,6 @@ import ("net/url""sort""strings"- "time""github.com/pkg/errors"@@ -43,86 +43,14 @@ func (*Provider) APIURL(instanceURL string) string {return instanceURL}-// WebhookCreateConsumerInputs represents the consumer inputs for creating a webhook.-type WebhookCreateConsumerInputs struct {- URL string `json:"url"`- AcceptUntrustedCerts bool `json:"acceptUntrustedCerts"`-}--// WebhookCreatePublisherInputs represents the publisher inputs for creating a webhook.-type WebhookCreatePublisherInputs struct {- Repository string `json:"repository"`- Branch string `json:"branch"`- PushedBy string `json:"pushedBy"`- ProjectID string `json:"projectId"`-}--// WebhookCreateOrUpdate represents a Bitbucket API request for creating or-// updating a webhook.-type WebhookCreateOrUpdate struct {- ConsumerActionID string `json:"consumerActionId"`- ConsumerID string `json:"consumerId"`- ConsumerInputs WebhookCreateConsumerInputs `json:"consumerInputs"`- EventType string `json:"eventType"`- PublisherID string `json:"publisherId"`- PublisherInputs WebhookCreatePublisherInputs `json:"publisherInputs"`-}--// CommitAuthor represents a Azure DevOps commit author.-type CommitAuthor struct {- Name string `json:"name"`- Email string `json:"email"`- Date time.Time `json:"date"`-}--// ServiceHookCodePushEventMessage represents a Azure DevOps service hook code push event message.-type ServiceHookCodePushEventMessage struct {- Text string `json:"text"`-}--// ServiceHookCodePushEventResourceCommit represents a Azure DevOps service hook code push event resource commit.-type ServiceHookCodePushEventResourceCommit struct {- CommitID string `json:"commitId"`- Author CommitAuthor `json:"author"`- Comment string `json:"comment"`- URL string `json:"url"`-}--// ServiceHookCodePushEventRefUpdates represents a Azure DevOps service hook code push event ref updates.-type ServiceHookCodePushEventRefUpdates struct {- Name string `json:"name"`- OldObjectID string `json:"oldObjectId"`- NewObjectID string `json:"newObjectId"`-}--// ServiceHookCodePushEventResourcePushedBy represents a Azure DevOps service hook code push event resource pushed by.-type ServiceHookCodePushEventResourcePushedBy struct {- DisplayName string `json:"displayName"`- UniqueName string `json:"uniqueName"`-}--// ServiceHookCodePushEventResourceRepository represents a Azure DevOps service hook code push event resource repository.-type ServiceHookCodePushEventResourceRepository struct {- Name string `json:"name"`- URL string `json:"url"`-}--// ServiceHookCodePushEventResource represents a Azure DevOps service hook code push event resource.-type ServiceHookCodePushEventResource struct {- Commits []ServiceHookCodePushEventResourceCommit `json:"commits"`- Repository ServiceHookCodePushEventResourceRepository `json:"repository"`- RefUpdates []ServiceHookCodePushEventRefUpdates `json:"refUpdates"`- PushedBy ServiceHookCodePushEventResourcePushedBy `json:"pushedBy"`- PushID uint64 `json:"pushId"`-}-type project struct {ID string `json:"id"`Name string `json:"name"`State string `json:"state"`}-type repository struct {+// Repository is the API message for Azure repository.+type Repository struct {ID string `json:"id"`Name string `json:"name"`// RemoteURL is the repo url in https://{org name}@dev.azure.com/{org name}/{project name}/_git/{repo name}@@ -133,15 +61,6 @@ type repository struct {Project project `json:"project"`}-// ServiceHookCodePushEvent represents a Azure DevOps service hook code push event.-//-// Docs: https://learn.microsoft.com/en-us/azure/devops/service-hooks/events?view=azure-devops#git.push-type ServiceHookCodePushEvent struct {- EventType string `json:"eventType"`- Message ServiceHookCodePushEventMessage `json:"message"`- Resource ServiceHookCodePushEventResource `json:"resource"`-}-// ChangesResponseChangeItem represents a Azure DevOps changes response change item.type ChangesResponseChangeItem struct {GitObjectType string `json:"gitObjectType"`@@ -223,7 +142,7 @@ func (p *Provider) FetchAllRepositoryList(ctx context.Context) ([]*vcs.Repositortype listRepositoriesResponse struct {Count int `json:"count"`- Value []repository `json:"value"`+ Value []Repository `json:"value"`}urlParams := &url.Values{}@@ -432,44 +351,9 @@ func (p *Provider) GetBranch(ctx context.Context, repositoryID, branchName strin}, nil}-// ListPullRequestFile lists the changed files in the pull request.-//-// Docs: https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/get-pull-request?view=azure-devops-rest-7.1-func (p *Provider) ListPullRequestFile(ctx context.Context, repositoryID, pullRequestID string) ([]*vcs.PullRequestFile, error) {- type mergeCommit struct {- CommitID string `json:"commitId"`- }- type azurePullRequest struct {- LastMergeCommit *mergeCommit `json:"lastMergeCommit"`- }-- apiURL, err := getRepositoryAPIURL(repositoryID)- if err != nil {- return nil, err- }-- urlParams := &url.Values{}- urlParams.Set("api-version", "7.0")- url := fmt.Sprintf("%s/pullrequests/%s?%s", apiURL, pullRequestID, urlParams.Encode())-- code, resp, err := internal.Get(ctx, url, p.getAuthorization())- if err != nil {- return nil, errors.Wrapf(err, "GET %s", url)- }- if code >= 300 {- return nil, errors.Errorf("failed to create merge request from URL %s, status code: %d, body: %s",- url,- code,- resp,- )- }-- var res azurePullRequest- if err := json.Unmarshal([]byte(resp), &res); err != nil {- return nil, err- }-- changeResponse, err := p.getChangesByCommit(ctx, repositoryID, res.LastMergeCommit.CommitID)+// ListPullRequestFile lists the changed files by last merge commit id.+func (p *Provider) ListPullRequestFile(ctx context.Context, repositoryID, lastMergeCommitID string) ([]*vcs.PullRequestFile, error) {+ changeResponse, err := p.getChangesByCommit(ctx, repositoryID, lastMergeCommitID)if err != nil {return nil, err}@@ -552,6 +436,9 @@ func getRepositoryAPIURL(repositoryID string) (string, error) {return fmt.Sprintf("https://dev.azure.com/%s/%s/_apis/git/repositories/%s", url.PathEscape(organizationName), url.PathEscape(projectName), url.PathEscape(repositoryID)), nil}+// getAuthorization returns the encoded azure token for authorization.+// Docs: https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windowsfunc (p *Provider) getAuthorization() string {- return fmt.Sprintf("Basic %s", p.authToken)+ encoded := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf(":%s", p.authToken)))+ return fmt.Sprintf("Basic %s", encoded)}diff --git a/backend/plugin/vcs/azure/webhook_events.go b/backend/plugin/vcs/azure/webhook_events.gonew file mode 100644index 0000000000..085c8dcd9a--- /dev/null+++ b/backend/plugin/vcs/azure/webhook_events.go@@ -0,0 +1,87 @@+package azure++// PullRequestEventLastMergeCommit is the API message for PR merge commit.+type PullRequestEventLastMergeCommit struct {+ CommitID string `json:"commitId"`+ URL string `json:"url"`+}++type PullRequestCreatedBy struct {+ DisplayName string `json:"displayName"`+ UniqueName string `json:"uniqueName"`+}++type PullRequestWeb struct {+ Href string `json:"href"`+}++type PullRequestLinks struct {+ Web *PullRequestWeb `json:"web"`+}++// PullRequestResource is the API message for pull request.+type PullRequestResource struct {+ Repository *Repository `json:"repository"`+ Links *PullRequestLinks `json:"_links"`+ PullRequestID int `json:"pullRequestId"`+ // The pull request status, could be active, completed, etc. We only care the "completed" status.+ Status string `json:"status"`+ Title string `json:"title"`+ Description string `json:"description"`+ SourceRefName string `json:"sourceRefName"`+ TargetRefName string `json:"targetRefName"`+ // PR merge status, we only care the "succeeded".+ MergeStatus string `json:"mergeStatus"`+ LastMergeCommit *PullRequestEventLastMergeCommit `json:"lastMergeCommit"`+ CreatedBy *PullRequestCreatedBy `json:"createdBy"`+}++type PullRequestMessage struct {+ Text string `json:"text"`+}++// PullRequestEvent is the API message for pull request webhook event.+//+// Docs: https://learn.microsoft.com/en-us/azure/devops/service-hooks/events?view=azure-devops#pull-request-merge-commit-created+type PullRequestEvent struct {+ // ID is the webhook message id.+ ID string `json:"id"`+ // EventType should be "git.pullrequest.merged".+ EventType string `json:"eventType"`+ Message *PullRequestMessage `json:"message"`+ DetailedMessage *PullRequestMessage `json:"detailedMessage"`+ Resource *PullRequestResource `json:"resource"`+}++// WebhookCreateConsumerInputs represents the consumer inputs for creating a webhook.+type WebhookCreateConsumerInputs struct {+ URL string `json:"url"`+ AcceptUntrustedCerts bool `json:"acceptUntrustedCerts"`+ HTTPHeaders string `json:"httpHeaders"`+}++// WebhookMergeResult is the status for pull request merge result.+type WebhookMergeResult string++// WebhookMergeResultSucceeded is succeeded status for merge result.+const WebhookMergeResultSucceeded WebhookMergeResult = "Succeeded"++// WebhookCreatePublisherInputs represents the publisher inputs for creating a webhook.+type WebhookCreatePublisherInputs struct {+ Repository string `json:"repository"`+ // The target branch for PR without "refs/heads/" prefix.+ Branch string `json:"branch"`+ // The merge result for PR, we only need the "Succeeded".+ MergeResult WebhookMergeResult `json:"mergeResult"`+ ProjectID string `json:"projectId"`+}++// WebhookCreateOrUpdate represents a Bitbucket API request for creating or updating a webhook.+type WebhookCreateOrUpdate struct {+ ConsumerActionID string `json:"consumerActionId"`+ ConsumerID string `json:"consumerId"`+ ConsumerInputs WebhookCreateConsumerInputs `json:"consumerInputs"`+ EventType string `json:"eventType"`+ PublisherID string `json:"publisherId"`+ PublisherInputs WebhookCreatePublisherInputs `json:"publisherInputs"`+}diff --git a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vueindex fd713d19c1..40da336793 100644--- a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue+++ b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue@@ -72,11 +72,7 @@: $t('instance.password-write-only')":disabled="!allowEdit || dataSource.useEmptyPassword"- :value="- dataSource.useEmptyPassword- ? ''- : getSensitiveValue(dataSource.updatedPassword)- "+ :value="dataSource.useEmptyPassword ? '' : dataSource.updatedPassword"@update:value="dataSource.updatedPassword = $event.trim()"/></div>@@ -131,7 +127,7 @@/></div><BBTextField- :value="getSensitiveValue(dataSource.externalSecret.token ?? '')"+ :value="dataSource.externalSecret.token ?? ''"class="mt-1 w-full":disabled="!allowEdit":placeholder="secretInputPlaceholder"@@ -151,9 +147,7 @@}}</label><BBTextField- :value="- getSensitiveValue(dataSource.externalSecret.appRole.roleId)- "+ :value="dataSource.externalSecret.appRole.roleId":required="true"class="mt-1 w-full":disabled="!allowEdit"@@ -216,9 +210,7 @@</NRadio></NRadioGroup><BBTextField- :value="- getSensitiveValue(dataSource.externalSecret.appRole.secretId)- "+ :value="dataSource.externalSecret.appRole.secretId"class="mt-1 w-full":disabled="!allowEdit":placeholder="secretInputPlaceholder"@@ -555,12 +547,6 @@ const secretInputPlaceholder = computed(() => {return "";});-const getSensitiveValue = (val: string) => {- return Array.from({ length: val.length })- .map((_) => "*")- .join("");-};-const changePasswordType = (passwordType: "PLAIN" | "EXTERNAL_SECRET") => {const ds = props.dataSource;if (passwordType === "EXTERNAL_SECRET") {diff --git a/frontend/src/components/RepositoryForm.vue b/frontend/src/components/RepositoryForm.vueindex daf5fd74f9..1ab8bd52de 100644--- a/frontend/src/components/RepositoryForm.vue+++ b/frontend/src/components/RepositoryForm.vue@@ -6,9 +6,9 @@<label class="textlabel mt-2"><i18n-t keypath="repository.our-webhook-link"><template #webhookLink>- <a class="normal-link" :href="getWebhookLink" target="_blank">{{- getWebhookLink- }}</a>+ <a class="normal-link" :href="getWebhookLink" target="_blank">+ {{ getWebhookLink }}+ </a></template></i18n-t></label>@@ -45,7 +45,7 @@class="max-w-full flex-nowrap mt-1.5"editing-class="mt-4"resource-type="vcs-connector"- :resource-title="repositoryInfo.name"+ :resource-title="repositoryInfo.title":validate="validateResourceId":readonly="!create || !allowEdit"/>@@ -64,6 +64,7 @@class="mt-2 w-full"placeholder="e.g. main":disabled="!allowEdit"+ :required="true"/></div><div>@@ -87,10 +88,11 @@ import { Status } from "nice-grpc-common";import { computed } from "vue";import { useI18n } from "vue-i18n";import { useVCSConnectorStore } from "@/store";-import type { ExternalRepositoryInfo, RepositoryConfig } from "@/types";+import type { RepositoryConfig } from "@/types";import type { ResourceId, ValidatedMessage } from "@/types";import type { Project } from "@/types/proto/v1/project_service";import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";+import type { VCSRepository } from "@/types/proto/v1/vcs_provider_service";import { getErrorCode } from "@/utils/grpcweb";const props = withDefaults(@@ -99,7 +101,7 @@ const props = withDefaults(create?: boolean;vcsType: VCSProvider_Type;vcsName: string;- repositoryInfo: ExternalRepositoryInfo;+ repositoryInfo: VCSRepository;repositoryConfig: RepositoryConfig;project: Project;}>(),@@ -113,13 +115,17 @@ const { t } = useI18n();const vcsConnectorStore = useVCSConnectorStore();const getWebhookLink = computed(() => {- if (props.vcsType === VCSProvider_Type.AZURE_DEVOPS) {- const parts = props.repositoryInfo.externalId.split("/");- if (parts.length !== 3) {- return "";+ switch (props.vcsType) {+ case VCSProvider_Type.AZURE_DEVOPS: {+ const parts = props.repositoryInfo.id.split("/");+ if (parts.length !== 3) {+ return "";+ }+ const [organization, project, _] = parts;+ return `https://dev.azure.com/${organization}/${project}/_settings/serviceHooks`;}- const [organization, project, _] = parts;- return `https://dev.azure.com/${organization}/${project}/_settings/serviceHooks`;+ case VCSProvider_Type.GITHUB:+ return `${props.repositoryInfo.webUrl}/settings/hooks`;}return "";});diff --git a/frontend/src/components/RepositoryPanel.vue b/frontend/src/components/RepositoryPanel.vueindex 5b5062cc20..7b47773c58 100644--- a/frontend/src/components/RepositoryPanel.vue+++ b/frontend/src/components/RepositoryPanel.vue@@ -71,7 +71,8 @@ import type { Project } from "@/types/proto/v1/project_service";import { VCSConnector } from "@/types/proto/v1/vcs_connector_service";import { VCSProvider } from "@/types/proto/v1/vcs_provider_service";import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";-import type { ExternalRepositoryInfo, RepositoryConfig } from "../types";+import type { VCSRepository } from "@/types/proto/v1/vcs_provider_service";+import type { RepositoryConfig } from "../types";interface LocalState {repositoryConfig: RepositoryConfig;@@ -132,10 +133,10 @@ const repositoryFormattedFullPath = computed(() => {return `https://dev.azure.com${fullPath.split("@dev.azure.com")[1]}`;});-const repositoryInfo = computed((): ExternalRepositoryInfo => {+const repositoryInfo = computed((): VCSRepository => {return {- externalId: props.vcsConnector.externalId,- name: props.vcsConnector.title,+ id: props.vcsConnector.externalId,+ title: props.vcsConnector.title,fullPath: props.vcsConnector.fullPath,webUrl: props.vcsConnector.webUrl,};diff --git a/frontend/src/components/RepositorySelectionPanel.vue b/frontend/src/components/RepositorySelectionPanel.vueindex 4047195391..b49db0fc7f 100644--- a/frontend/src/components/RepositorySelectionPanel.vue+++ b/frontend/src/components/RepositorySelectionPanel.vue@@ -29,7 +29,7 @@><div class="flex items-center px-3 py-2"><div class="min-w-0 flex-1 flex items-center">- {{ repository.fullpath }}+ {{ repository.fullPath }}</div><ChevronRightIcon class="h-5 w-5 text-control" /></div>@@ -44,13 +44,13 @@ import { RefreshCwIcon, ChevronRightIcon } from "lucide-vue-next";import { reactive, computed, onMounted } from "vue";import BBSpin from "@/bbkit/BBSpin.vue";import { pushNotification, useCurrentUserV1, useVCSV1Store } from "@/store";-import type { ExternalRepositoryInfo, ProjectRepositoryConfig } from "@/types";-import type { SearchVCSProviderProjectsResponse_Project } from "@/types/proto/v1/vcs_provider_service";+import type { ProjectRepositoryConfig } from "@/types";+import type { VCSRepository } from "@/types/proto/v1/vcs_provider_service";import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";import { hasWorkspacePermissionV2 } from "@/utils";interface LocalState {- repositoryList: SearchVCSProviderProjectsResponse_Project[];+ repositoryList: VCSRepository[];searchText: string;loading: boolean;}@@ -59,7 +59,7 @@ const props = defineProps<{ config: ProjectRepositoryConfig }>();const emit = defineEmits<{(event: "next"): void;- (event: "set-repository", payload: ExternalRepositoryInfo): void;+ (event: "set-repository", payload: VCSRepository): void;}>();const currentUser = useCurrentUserV1();@@ -90,7 +90,7 @@ const refreshRepositoryList = async () => {}state.loading = true;- const projects = await vcsV1Store.listVCSExternalProjects(+ const projects = await vcsV1Store.searchVCSProviderRepositories(props.config.vcs.name);state.repositoryList = projects;@@ -101,11 +101,9 @@ const repositoryList = computed(() => {if (state.searchText == "") {return state.repositoryList;}- return state.repositoryList.filter(- (repository: SearchVCSProviderProjectsResponse_Project) => {- return repository.fullpath.toLowerCase().includes(state.searchText);- }- );+ return state.repositoryList.filter((repository: VCSRepository) => {+ return repository.fullPath.toLowerCase().includes(state.searchText);+ });});const attentionText = computed((): string => {@@ -121,15 +119,8 @@ const attentionText = computed((): string => {return "";});-const selectRepository = (- repository: SearchVCSProviderProjectsResponse_Project-) => {- emit("set-repository", {- externalId: repository.id,- name: repository.title,- fullPath: repository.fullpath,- webUrl: repository.webUrl,- });+const selectRepository = (repository: VCSRepository) => {+ emit("set-repository", repository);emit("next");};</script>diff --git a/frontend/src/components/RepositorySetupWizard.vue b/frontend/src/components/RepositorySetupWizard.vueindex 7286dca9ad..b03d8a2ae8 100644--- a/frontend/src/components/RepositorySetupWizard.vue+++ b/frontend/src/components/RepositorySetupWizard.vue@@ -24,11 +24,7 @@@cancel="cancel"><template #0="{ next }">- <RepositoryVCSProviderPanel- @next="next()"- @set-vcs="setVCS"- @set-code="setCode"- />+ <RepositoryVCSProviderPanel @next="next()" @set-vcs="setVCS" /></template><template #1="{ next }"><RepositorySelectionPanel@@ -51,10 +47,13 @@ import { useI18n } from "vue-i18n";import { StepTab } from "@/components/v2";import { useVCSConnectorStore, useCurrentUserV1 } from "@/store";import type { ComposedProject } from "@/types";-import type { VCSProvider } from "@/types/proto/v1/vcs_provider_service";-import { VCSProvider_Type } from "@/types/proto/v1/vcs_provider_service";+import {+ VCSProvider,+ VCSProvider_Type,+} from "@/types/proto/v1/vcs_provider_service";+import { VCSRepository } from "@/types/proto/v1/vcs_provider_service";import { hasProjectPermissionV2 } from "@/utils";-import type { ExternalRepositoryInfo, ProjectRepositoryConfig } from "../types";+import type { ProjectRepositoryConfig } from "../types";const CHOOSE_PROVIDER_STEP = 0;// const CHOOSE_REPOSITORY_STEP = 1;@@ -88,14 +87,8 @@ const stepList = [const state = reactive<LocalState>({config: {- vcs: {} as VCSProvider,- code: "",- repositoryInfo: {- externalId: "",- name: "",- fullPath: "",- webUrl: "",- },+ vcs: VCSProvider.fromPartial({}),+ repositoryInfo: VCSRepository.fromPartial({}),repositoryConfig: {baseDirectory: "bytebase",branch: "main",@@ -141,7 +134,7 @@ const tryFinishSetup = async () => {state.processing = true;const createFunc = async () => {- let externalId = state.config.repositoryInfo.externalId;+ let externalId = state.config.repositoryInfo.id;if (state.config.vcs.type === VCSProvider_Type.GITHUB ||state.config.vcs.type === VCSProvider_Type.BITBUCKET@@ -153,7 +146,7 @@ const tryFinishSetup = async () => {props.project.name,state.config.repositoryConfig.resourceId,{- title: state.config.repositoryInfo.name,+ title: state.config.repositoryInfo.title,externalId,vcsProvider: state.config.vcs.name,baseDirectory: state.config.repositoryConfig.baseDirectory,@@ -180,15 +173,11 @@ const cancel = () => {emit("cancel");};-const setCode = (code: string) => {- state.config.code = code;-};-const setVCS = (vcs: VCSProvider) => {state.config.vcs = vcs;};-const setRepository = (repository: ExternalRepositoryInfo) => {+const setRepository = (repository: VCSRepository) => {state.config.repositoryInfo = repository;};</script>diff --git a/frontend/src/components/RepositoryVCSProviderPanel.vue b/frontend/src/components/RepositoryVCSProviderPanel.vueindex 74bc9696c7..beaf035a8b 100644--- a/frontend/src/components/RepositoryVCSProviderPanel.vue+++ b/frontend/src/components/RepositoryVCSProviderPanel.vue@@ -2,7 +2,7 @@<div class="textlabel">{{ $t("repository.choose-git-provider-description") }}</div>- <div class="mt-4 flex flex-wrap">+ <div class="mt-4 flex flex-wrap space-x-2 gap-y-2"><template v-for="(vcs, index) in vcsList" :key="index"><NButton type="default" @click.prevent="selectVCS(vcs)"><template #icon>@@ -49,7 +49,6 @@ interface LocalState {const emit = defineEmits<{(event: "next"): void;(event: "set-vcs", payload: VCSProvider): void;- (event: "set-code", payload: string): void;}>();const vcsV1Store = useVCSV1Store();diff --git a/frontend/src/components/VCS/VCSProviderBasicInfoPanel.vue b/frontend/src/components/VCS/VCSProviderBasicInfoPanel.vueindex 216de16556..33d8d9cf4c 100644--- a/frontend/src/components/VCS/VCSProviderBasicInfoPanel.vue+++ b/frontend/src/components/VCS/VCSProviderBasicInfoPanel.vue@@ -30,6 +30,7 @@<div><div class="mt-4 textlabel">{{ $t("gitops.setting.add-git-provider.basic-info.display-name") }}+ <span class="text-red-600">*</span></div><p class="mt-1 textinfolabel">{{@@ -40,6 +41,7 @@v-model:value="config.name"class="mt-2 w-full":placeholder="namePlaceholder"+ :required="true"/><ResourceIdFieldv-model:value="config.resourceId"@@ -52,7 +54,7 @@/></div><div>- <div class="mt-6 pt-6 border-t border-block-border textlabel">+ <div class="textlabel">{{ instanceUrlLabel }} <span class="text-red-600">*</span></div><p class="mt-1 textinfolabel">@@ -64,6 +66,7 @@</p><BBTextFieldclass="mt-2 w-full"+ :required="true":value="config.instanceUrl":placeholder="instanceUrlPlaceholder":disabled="instanceUrlDisabled"@@ -137,17 +140,21 @@</template><template v-if="config.uiType == 'AZURE_DEVOPS'"><li>- •{{$t("gitops.setting.add-git-provider.access-token.azure-devops-personal-access-token")}}</li>+ <li>• Code (Read)</li>+ <li>• User Profile (Read)</li>+ <li>• Project and Team (Read)</li>+ <li>• Pull Request Threads (Read & Write)</li></template></ul><BBTextFieldclass="mt-2 w-full"+ :required="true":placeholder="'ex. b9e0efc7a233403799b42620c60ff98c146895a27b6219912a215f4e2251cc3a'":value="config.accessToken"@update:value="changeAccessToken($event)"diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 9c11cb19a2..4df63b5acc 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -2022,7 +2022,7 @@"gitlab-personal-access-token": "Create a dedicated service user and generate a personal access token with the maintainer role for the group or all projects to be managed.","github-personal-access-token": "Create a dedicated service user and generate a personal access token with the member role for the organization or all projects to be managed.","bitbucket-personal-access-token": "Generate a specific service user and create an app password granting both read and write permissions for the relevant organizations, projects, or repositories to manage. Insert the base64 encoded '<bitbucket username>:<generated app password>' below.",- "azure-devops-personal-access-token": "Create a dedicated service user and generate a personal access token with the member role for the organization or all projects to be managed."+ "azure-devops-personal-access-token": "Create a dedicated service user and generate a personal access token with the member role for all accessible organizations with the following scopes"},"confirm": {"confirm-info": "Confirm the info",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 256cfc9baf..e5c54c8d6f 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -2022,7 +2022,7 @@"gitlab-personal-access-token": "Crear un usuario de servicio dedicado y generar un token de acceso personal con el rol de mantenedor para el grupo o todos los proyectos que se deseen gestionar.","github-personal-access-token": "Crear un usuario de servicio dedicado y generar un token de acceso personal con el rol de miembro para la organización o todos los proyectos que se deseen gestionar.","bitbucket-personal-access-token": "Genera un usuario de servicio específico y crea una contraseña de aplicación que otorgue permisos de lectura y escritura para las organizaciones, proyectos o repositorios relevantes que se deseen gestionar. Inserta el código base64 codificado '<nombre de usuario de Bitbucket>:<contraseña de aplicación generada>' a continuación.",- "azure-devops-personal-access-token": "Crear un usuario de servicio dedicado y generar un token de acceso personal con el rol de miembro para la organización o todos los proyectos que se deseen gestionar."+ "azure-devops-personal-access-token": "Cree un usuario de servicio dedicado y genere un token de acceso personal con el rol de miembro para todas las organizaciones accesibles con los siguientes alcances"},"confirm": {"confirm-info": "Confirmar la información",diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 066611c394..91058b3ef6 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -2022,7 +2022,7 @@"gitlab-personal-access-token": "専用のサービスユーザーを作成し、管理対象のグループまたはすべてのプロジェクトのメンテナー役割用の個人アクセス トークンを生成します。","github-personal-access-token": "専用のサービスユーザーを作成し、管理される組織またはすべてのプロジェクト用にメンバーの役割を持つ個人アクセス トークンを生成します。","bitbucket-personal-access-token": "特定のサービスユーザーを生成し、関連する組織、プロジェクト、またはリポジトリを管理するために読み取りと書き込みの権限を付与するアプリパスワードを作成します。下記の base64 エンコードされた '<bitbucket ユーザー名>:<生成されたアプリパスワード>' を挿入してください。",- "azure-devops-personal-access-token": "専用のサービスユーザーを作成し、管理される組織またはすべてのプロジェクト用にメンバーの役割を持つ個人アクセス トークンを生成します。"+ "azure-devops-personal-access-token": "専用のサービス ユーザーを作成し、次のスコープを持つすべてのアクセス可能な組織のメンバー ロールを持つ個人アクセス トークンを生成します。"},"confirm": {"confirm-info": "情報を確認してください",diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 2e96e40f25..59569b6a9e 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -2022,7 +2022,7 @@"gitlab-personal-access-token": "Tạo một người dùng dịch vụ riêng và tạo một mã thông bảo cá nhân với vai trò người quản lý cho nhóm hoặc tất cả các dự án cần quản lý.","github-personal-access-token": "Tạo một người dùng dịch vụ riêng và tạo một mã thông báo truy cập cá nhân với vai trò thành viên cho tổ chức hoặc tất cả các dự án cần quản lý.","bitbucket-personal-access-token": "Tạo một người dùng dịch vụ cụ thể và tạo một mật khẩu ứng dụng cấp quyền đọc và ghi cho các tổ chức, dự án hoặc kho lưu trữ liên quan để quản lý. Chèn chuỗi base64 mã hóa '<tên người dùng Bitbucket>:<mật khẩu ứng dụng được tạo>' bên dưới.",- "azure-devops-personal-access-token": "Tạo một người dùng dịch vụ riêng và tạo một mã thông báo truy cập cá nhân với vai trò thành viên cho tổ chức hoặc tất cả các dự án cần quản lý."+ "azure-devops-personal-access-token": "Tạo người dùng dịch vụ chuyên dụng và tạo mã thông báo truy cập cá nhân với vai trò thành viên cho tất cả các tổ chức có thể truy cập với phạm vi sau"},"confirm": {"confirm-info": "Xác nhận thông tin",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 6340bbc3ad..e5f1ab6d22 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -2022,7 +2022,7 @@"gitlab-personal-access-token": "创建一个专用服务用户,并生成一个具有组或所有待管理项目的维护者角色的个人访问令牌。","github-personal-access-token": "创建一个专用的服务用户,并为组织或所有需要管理的项目生成一个成员角色的个人访问令牌。","bitbucket-personal-access-token": "生成一个特定的服务用户,并创建一个应用程序密码,为相关的组织、项目或仓库授予读写权限以进行管理。在下方插入base64编码的 '<bitbucket用户名>:<生成的应用程序密码>'。",- "azure-devops-personal-access-token": "创建一个专用的服务用户,并为组织或所有需要管理的项目生成一个成员角色的个人访问令牌。"+ "azure-devops-personal-access-token": "创建一个专用的服务用户,并为所有组织生成一个有下列权限的个人访问令牌"},"confirm": {"confirm-info": "确认信息",diff --git a/frontend/src/store/modules/v1/vcs.ts b/frontend/src/store/modules/v1/vcs.tsindex c10fdf688a..7edc5da5c8 100644--- a/frontend/src/store/modules/v1/vcs.ts+++ b/frontend/src/store/modules/v1/vcs.ts@@ -22,11 +22,11 @@ export const useVCSV1Store = defineStore("vcs_v1", () => {return uniqBy(list, (vcs) => vcs.name);});- const listVCSExternalProjects = async (vcsName: string) => {- const resp = await vcsProviderServiceClient.searchVCSProviderProjects({+ const searchVCSProviderRepositories = async (vcsName: string) => {+ const resp = await vcsProviderServiceClient.searchVCSProviderRepositories({name: vcsName,});- return resp.projects;+ return resp.repositories;};const fetchVCSList = async () => {@@ -112,7 +112,7 @@ export const useVCSV1Store = defineStore("vcs_v1", () => {return {vcsList,- listVCSExternalProjects,+ searchVCSProviderRepositories,getVCSById,getVCSByName,getOrFetchVCSByName,diff --git a/frontend/src/types/project.ts b/frontend/src/types/project.tsindex 92056bed88..eaad526f67 100644--- a/frontend/src/types/project.ts+++ b/frontend/src/types/project.ts@@ -1,8 +1,11 @@-import type { VCSProvider } from "@/types/proto/v1/vcs_provider_service";+import type {+ VCSProvider,+ VCSRepository,+} from "@/types/proto/v1/vcs_provider_service";import type { RowStatus } from "./common";import type { ProjectId } from "./id";import type { Principal } from "./principal";-import type { ExternalRepositoryInfo, RepositoryConfig } from "./repository";+import type { RepositoryConfig } from "./repository";export type ProjectWorkflowType = "UI" | "VCS";@@ -38,7 +41,6 @@ export type ProjectMember = {export type ProjectRepositoryConfig = {vcs: VCSProvider;- code: string;- repositoryInfo: ExternalRepositoryInfo;+ repositoryInfo: VCSRepository;repositoryConfig: RepositoryConfig;};diff --git a/frontend/src/types/proto/v1/vcs_provider_service.ts b/frontend/src/types/proto/v1/vcs_provider_service.tsindex 111581c273..1221d556d9 100644--- a/frontend/src/types/proto/v1/vcs_provider_service.ts+++ b/frontend/src/types/proto/v1/vcs_provider_service.ts@@ -69,7 +69,7 @@ export interface DeleteVCSProviderRequest {name: string;}-export interface SearchVCSProviderProjectsRequest {+export interface SearchVCSProviderRepositoriesRequest {/*** The name of the vcs provider to retrieve the vcs provider repositories.* Format: vcsProviders/{vcsProvider}@@ -77,22 +77,34 @@ export interface SearchVCSProviderProjectsRequest {name: string;}-export interface SearchVCSProviderProjectsResponse {- /** The list of project in vcs provider. */- projects: SearchVCSProviderProjectsResponse_Project[];-}--export interface SearchVCSProviderProjectsResponse_Project {- /** The id of the project in vcs provider. */+export interface VCSRepository {+ /**+ * The id of the repository in vcs provider.+ * e.g. In GitLab, this is the corresponding project id. e.g. 123+ */id: string;- /** The title of the project in vcs provider. */+ /**+ * The title of the repository in vcs provider.+ * e.g. sample-project+ */title: string;- /** The fullpath of the project in vcs provider. */- fullpath: string;- /** Web url of the project in vcs provider. */+ /**+ * The full_path of the repository in vcs provider.+ * e.g. bytebase/sample-project+ */+ fullPath: string;+ /**+ * Web url of the repository in vcs provider.+ * e.g. http://gitlab.bytebase.com/bytebase/sample-project+ */webUrl: string;}+export interface SearchVCSProviderRepositoriesResponse {+ /** The list of repositories in vcs provider. */+ repositories: VCSRepository[];+}+export interface ListVCSConnectorsInProviderRequest {/*** The name of the vcs provider to retrieve the linked projects.@@ -595,22 +607,22 @@ export const DeleteVCSProviderRequest = {},};-function createBaseSearchVCSProviderProjectsRequest(): SearchVCSProviderProjectsRequest {+function createBaseSearchVCSProviderRepositoriesRequest(): SearchVCSProviderRepositoriesRequest {return { name: "" };}-export const SearchVCSProviderProjectsRequest = {- encode(message: SearchVCSProviderProjectsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+export const SearchVCSProviderRepositoriesRequest = {+ encode(message: SearchVCSProviderRepositoriesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {if (message.name !== "") {writer.uint32(10).string(message.name);}return writer;},- decode(input: _m0.Reader | Uint8Array, length?: number): SearchVCSProviderProjectsRequest {+ decode(input: _m0.Reader | Uint8Array, length?: number): SearchVCSProviderRepositoriesRequest {const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseSearchVCSProviderProjectsRequest();+ const message = createBaseSearchVCSProviderRepositoriesRequest();while (reader.pos < end) {const tag = reader.uint32();switch (tag >>> 3) {@@ -630,11 +642,11 @@ export const SearchVCSProviderProjectsRequest = {return message;},- fromJSON(object: any): SearchVCSProviderProjectsRequest {+ fromJSON(object: any): SearchVCSProviderRepositoriesRequest {return { name: isSet(object.name) ? globalThis.String(object.name) : "" };},- toJSON(message: SearchVCSProviderProjectsRequest): unknown {+ toJSON(message: SearchVCSProviderRepositoriesRequest): unknown {const obj: any = {};if (message.name !== "") {obj.name = message.name;@@ -642,91 +654,30 @@ export const SearchVCSProviderProjectsRequest = {return obj;},- create(base?: DeepPartial<SearchVCSProviderProjectsRequest>): SearchVCSProviderProjectsRequest {- return SearchVCSProviderProjectsRequest.fromPartial(base ?? {});+ create(base?: DeepPartial<SearchVCSProviderRepositoriesRequest>): SearchVCSProviderRepositoriesRequest {+ return SearchVCSProviderRepositoriesRequest.fromPartial(base ?? {});},- fromPartial(object: DeepPartial<SearchVCSProviderProjectsRequest>): SearchVCSProviderProjectsRequest {- const message = createBaseSearchVCSProviderProjectsRequest();+ fromPartial(object: DeepPartial<SearchVCSProviderRepositoriesRequest>): SearchVCSProviderRepositoriesRequest {+ const message = createBaseSearchVCSProviderRepositoriesRequest();message.name = object.name ?? "";return message;},};-function createBaseSearchVCSProviderProjectsResponse(): SearchVCSProviderProjectsResponse {- return { projects: [] };-}--export const SearchVCSProviderProjectsResponse = {- encode(message: SearchVCSProviderProjectsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {- for (const v of message.projects) {- SearchVCSProviderProjectsResponse_Project.encode(v!, writer.uint32(10).fork()).ldelim();- }- return writer;- },-- decode(input: _m0.Reader | Uint8Array, length?: number): SearchVCSProviderProjectsResponse {- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseSearchVCSProviderProjectsResponse();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1:- if (tag !== 10) {- break;- }-- message.projects.push(SearchVCSProviderProjectsResponse_Project.decode(reader, reader.uint32()));- continue;- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skipType(tag & 7);- }- return message;- },-- fromJSON(object: any): SearchVCSProviderProjectsResponse {- return {- projects: globalThis.Array.isArray(object?.projects)- ? object.projects.map((e: any) => SearchVCSProviderProjectsResponse_Project.fromJSON(e))- : [],- };- },-- toJSON(message: SearchVCSProviderProjectsResponse): unknown {- const obj: any = {};- if (message.projects?.length) {- obj.projects = message.projects.map((e) => SearchVCSProviderProjectsResponse_Project.toJSON(e));- }- return obj;- },-- create(base?: DeepPartial<SearchVCSProviderProjectsResponse>): SearchVCSProviderProjectsResponse {- return SearchVCSProviderProjectsResponse.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<SearchVCSProviderProjectsResponse>): SearchVCSProviderProjectsResponse {- const message = createBaseSearchVCSProviderProjectsResponse();- message.projects = object.projects?.map((e) => SearchVCSProviderProjectsResponse_Project.fromPartial(e)) || [];- return message;- },-};--function createBaseSearchVCSProviderProjectsResponse_Project(): SearchVCSProviderProjectsResponse_Project {- return { id: "", title: "", fullpath: "", webUrl: "" };+function createBaseVCSRepository(): VCSRepository {+ return { id: "", title: "", fullPath: "", webUrl: "" };}-export const SearchVCSProviderProjectsResponse_Project = {- encode(message: SearchVCSProviderProjectsResponse_Project, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+export const VCSRepository = {+ encode(message: VCSRepository, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {if (message.id !== "") {writer.uint32(10).string(message.id);}if (message.title !== "") {writer.uint32(18).string(message.title);}- if (message.fullpath !== "") {- writer.uint32(26).string(message.fullpath);+ if (message.fullPath !== "") {+ writer.uint32(26).string(message.fullPath);}if (message.webUrl !== "") {writer.uint32(34).string(message.webUrl);@@ -734,10 +685,10 @@ export const SearchVCSProviderProjectsResponse_Project = {return writer;},- decode(input: _m0.Reader | Uint8Array, length?: number): SearchVCSProviderProjectsResponse_Project {+ decode(input: _m0.Reader | Uint8Array, length?: number): VCSRepository {const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseSearchVCSProviderProjectsResponse_Project();+ const message = createBaseVCSRepository();while (reader.pos < end) {const tag = reader.uint32();switch (tag >>> 3) {@@ -760,7 +711,7 @@ export const SearchVCSProviderProjectsResponse_Project = {break;}- message.fullpath = reader.string();+ message.fullPath = reader.string();continue;case 4:if (tag !== 34) {@@ -778,16 +729,16 @@ export const SearchVCSProviderProjectsResponse_Project = {return message;},- fromJSON(object: any): SearchVCSProviderProjectsResponse_Project {+ fromJSON(object: any): VCSRepository {return {id: isSet(object.id) ? globalThis.String(object.id) : "",title: isSet(object.title) ? globalThis.String(object.title) : "",- fullpath: isSet(object.fullpath) ? globalThis.String(object.fullpath) : "",+ fullPath: isSet(object.fullPath) ? globalThis.String(object.fullPath) : "",webUrl: isSet(object.webUrl) ? globalThis.String(object.webUrl) : "",};},- toJSON(message: SearchVCSProviderProjectsResponse_Project): unknown {+ toJSON(message: VCSRepository): unknown {const obj: any = {};if (message.id !== "") {obj.id = message.id;@@ -795,8 +746,8 @@ export const SearchVCSProviderProjectsResponse_Project = {if (message.title !== "") {obj.title = message.title;}- if (message.fullpath !== "") {- obj.fullpath = message.fullpath;+ if (message.fullPath !== "") {+ obj.fullPath = message.fullPath;}if (message.webUrl !== "") {obj.webUrl = message.webUrl;@@ -804,21 +755,80 @@ export const SearchVCSProviderProjectsResponse_Project = {return obj;},- create(base?: DeepPartial<SearchVCSProviderProjectsResponse_Project>): SearchVCSProviderProjectsResponse_Project {- return SearchVCSProviderProjectsResponse_Project.fromPartial(base ?? {});+ create(base?: DeepPartial<VCSRepository>): VCSRepository {+ return VCSRepository.fromPartial(base ?? {});},- fromPartial(- object: DeepPartial<SearchVCSProviderProjectsResponse_Project>,- ): SearchVCSProviderProjectsResponse_Project {- const message = createBaseSearchVCSProviderProjectsResponse_Project();+ fromPartial(object: DeepPartial<VCSRepository>): VCSRepository {+ const message = createBaseVCSRepository();message.id = object.id ?? "";message.title = object.title ?? "";- message.fullpath = object.fullpath ?? "";+ message.fullPath = object.fullPath ?? "";message.webUrl = object.webUrl ?? "";return message;},};+function createBaseSearchVCSProviderRepositoriesResponse(): SearchVCSProviderRepositoriesResponse {+ return { repositories: [] };+}++export const SearchVCSProviderRepositoriesResponse = {+ encode(message: SearchVCSProviderRepositoriesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ for (const v of message.repositories) {+ VCSRepository.encode(v!, writer.uint32(10).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): SearchVCSProviderRepositoriesResponse {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseSearchVCSProviderRepositoriesResponse();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.repositories.push(VCSRepository.decode(reader, reader.uint32()));+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): SearchVCSProviderRepositoriesResponse {+ return {+ repositories: globalThis.Array.isArray(object?.repositories)+ ? object.repositories.map((e: any) => VCSRepository.fromJSON(e))+ : [],+ };+ },++ toJSON(message: SearchVCSProviderRepositoriesResponse): unknown {+ const obj: any = {};+ if (message.repositories?.length) {+ obj.repositories = message.repositories.map((e) => VCSRepository.toJSON(e));+ }+ return obj;+ },++ create(base?: DeepPartial<SearchVCSProviderRepositoriesResponse>): SearchVCSProviderRepositoriesResponse {+ return SearchVCSProviderRepositoriesResponse.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<SearchVCSProviderRepositoriesResponse>): SearchVCSProviderRepositoriesResponse {+ const message = createBaseSearchVCSProviderRepositoriesResponse();+ message.repositories = object.repositories?.map((e) => VCSRepository.fromPartial(e)) || [];+ return message;+ },+};+function createBaseListVCSConnectorsInProviderRequest(): ListVCSConnectorsInProviderRequest {return { name: "" };}@@ -1311,22 +1321,22 @@ export const VCSProviderServiceDefinition = {},},},- searchVCSProviderProjects: {- name: "SearchVCSProviderProjects",- requestType: SearchVCSProviderProjectsRequest,+ searchVCSProviderRepositories: {+ name: "SearchVCSProviderRepositories",+ requestType: SearchVCSProviderRepositoriesRequest,requestStream: false,- responseType: SearchVCSProviderProjectsResponse,+ responseType: SearchVCSProviderRepositoriesResponse,responseStream: false,options: {_unknownFields: {578365826: [new Uint8Array([- 45,+ 49,58,1,42,34,- 40,+ 44,47,118,49,@@ -1359,13 +1369,17 @@ export const VCSProviderServiceDefinition = {114,99,104,- 80,- 114,- 111,- 106,+ 82,101,- 99,+ 112,+ 111,+ 115,+ 105,116,+ 111,+ 114,+ 105,+ 101,115,]),],diff --git a/frontend/src/types/repository.ts b/frontend/src/types/repository.tsindex 048118b504..a37f712b64 100644--- a/frontend/src/types/repository.ts+++ b/frontend/src/types/repository.ts@@ -3,14 +3,3 @@ export type RepositoryConfig = {branch: string;resourceId: string;};--export type ExternalRepositoryInfo = {- // e.g. In GitLab, this is the corresponding project id. e.g. 123- externalId: string;- // e.g. sample-project- name: string;- // e.g. bytebase/sample-project- fullPath: string;- // e.g. http://gitlab.bytebase.com/bytebase/sample-project- webUrl: string;-};diff --git a/frontend/src/views/SettingWorkspaceVCSDetail.vue b/frontend/src/views/SettingWorkspaceVCSDetail.vueindex 5e3e7049b7..ba7f9bb358 100644--- a/frontend/src/views/SettingWorkspaceVCSDetail.vue+++ b/frontend/src/views/SettingWorkspaceVCSDetail.vue@@ -31,6 +31,7 @@<div><label for="name" class="textlabel">{{ $t("gitops.setting.add-git-provider.basic-info.display-name") }}+ <span class="text-red-600">*</span></label><p class="mt-1 textinfolabel">{{@@ -41,6 +42,7 @@id="name"v-model:value="state.title":disabled="!hasUpdateVCSPermission"+ :required="true"name="name"class="mt-1 w-full"/>@@ -53,11 +55,15 @@</div><div>- <label for="secret" class="textlabel"> Access Token </label>+ <label for="secret" class="textlabel">+ Access Token+ <span class="text-red-600">*</span>+ </label><BBTextFieldid="secret"v-model:value="state.accessToken":disabled="!hasUpdateVCSPermission"+ :required="true"name="secret"class="mt-1 w-full":placeholder="$t('common.sensitive-placeholder')"diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 9f06949a16..b6c78a507f 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -607,11 +607,11 @@- [ListVCSConnectorsInProviderResponse](#bytebase-v1-ListVCSConnectorsInProviderResponse)- [ListVCSProvidersRequest](#bytebase-v1-ListVCSProvidersRequest)- [ListVCSProvidersResponse](#bytebase-v1-ListVCSProvidersResponse)- - [SearchVCSProviderProjectsRequest](#bytebase-v1-SearchVCSProviderProjectsRequest)- - [SearchVCSProviderProjectsResponse](#bytebase-v1-SearchVCSProviderProjectsResponse)- - [SearchVCSProviderProjectsResponse.Project](#bytebase-v1-SearchVCSProviderProjectsResponse-Project)+ - [SearchVCSProviderRepositoriesRequest](#bytebase-v1-SearchVCSProviderRepositoriesRequest)+ - [SearchVCSProviderRepositoriesResponse](#bytebase-v1-SearchVCSProviderRepositoriesResponse)- [UpdateVCSProviderRequest](#bytebase-v1-UpdateVCSProviderRequest)- [VCSProvider](#bytebase-v1-VCSProvider)+ - [VCSRepository](#bytebase-v1-VCSRepository)- [VCSProvider.Type](#bytebase-v1-VCSProvider-Type)@@ -9810,9 +9810,9 @@ This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |-<a name="bytebase-v1-SearchVCSProviderProjectsRequest"></a>+<a name="bytebase-v1-SearchVCSProviderRepositoriesRequest"></a>-### SearchVCSProviderProjectsRequest+### SearchVCSProviderRepositoriesRequest@@ -9825,68 +9825,68 @@ This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |-<a name="bytebase-v1-SearchVCSProviderProjectsResponse"></a>+<a name="bytebase-v1-SearchVCSProviderRepositoriesResponse"></a>-### SearchVCSProviderProjectsResponse+### SearchVCSProviderRepositoriesResponse| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| projects | [SearchVCSProviderProjectsResponse.Project](#bytebase-v1-SearchVCSProviderProjectsResponse-Project) | repeated | The list of project in vcs provider. |+| repositories | [VCSRepository](#bytebase-v1-VCSRepository) | repeated | The list of repositories in vcs provider. |-<a name="bytebase-v1-SearchVCSProviderProjectsResponse-Project"></a>+<a name="bytebase-v1-UpdateVCSProviderRequest"></a>-### SearchVCSProviderProjectsResponse.Project+### UpdateVCSProviderRequest| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| id | [string](#string) | | The id of the project in vcs provider. |-| title | [string](#string) | | The title of the project in vcs provider. |-| fullpath | [string](#string) | | The fullpath of the project in vcs provider. |-| web_url | [string](#string) | | Web url of the project in vcs provider. |+| vcs_provider | [VCSProvider](#bytebase-v1-VCSProvider) | | |+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to be updated. |-<a name="bytebase-v1-UpdateVCSProviderRequest"></a>+<a name="bytebase-v1-VCSProvider"></a>-### UpdateVCSProviderRequest+### VCSProvider| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| vcs_provider | [VCSProvider](#bytebase-v1-VCSProvider) | | |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to be updated. |+| name | [string](#string) | | The name of the vcs provider. Format: vcsProviders/{vcsProvider} |+| title | [string](#string) | | The title of the vcs provider. It is used to display in the UI. Specified by the client. |+| type | [VCSProvider.Type](#bytebase-v1-VCSProvider-Type) | | |+| url | [string](#string) | | The url of the vcs provider. Specified by the client. For example: github.com, gitlab.com, gitlab.bytebase.com. |+| access_token | [string](#string) | | The access token of the vcs provider. |-<a name="bytebase-v1-VCSProvider"></a>+<a name="bytebase-v1-VCSRepository"></a>-### VCSProvider+### VCSRepository| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| name | [string](#string) | | The name of the vcs provider. Format: vcsProviders/{vcsProvider} |-| title | [string](#string) | | The title of the vcs provider. It is used to display in the UI. Specified by the client. |-| type | [VCSProvider.Type](#bytebase-v1-VCSProvider-Type) | | |-| url | [string](#string) | | The url of the vcs provider. Specified by the client. For example: github.com, gitlab.com, gitlab.bytebase.com. |-| access_token | [string](#string) | | The access token of the vcs provider. |+| id | [string](#string) | | The id of the repository in vcs provider. e.g. In GitLab, this is the corresponding project id. e.g. 123 |+| title | [string](#string) | | The title of the repository in vcs provider. e.g. sample-project |+| full_path | [string](#string) | | The full_path of the repository in vcs provider. e.g. bytebase/sample-project |+| web_url | [string](#string) | | Web url of the repository in vcs provider. e.g. http://gitlab.bytebase.com/bytebase/sample-project |@@ -9926,7 +9926,7 @@ This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. || CreateVCSProvider | [CreateVCSProviderRequest](#bytebase-v1-CreateVCSProviderRequest) | [VCSProvider](#bytebase-v1-VCSProvider) | || UpdateVCSProvider | [UpdateVCSProviderRequest](#bytebase-v1-UpdateVCSProviderRequest) | [VCSProvider](#bytebase-v1-VCSProvider) | || DeleteVCSProvider | [DeleteVCSProviderRequest](#bytebase-v1-DeleteVCSProviderRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |-| SearchVCSProviderProjects | [SearchVCSProviderProjectsRequest](#bytebase-v1-SearchVCSProviderProjectsRequest) | [SearchVCSProviderProjectsResponse](#bytebase-v1-SearchVCSProviderProjectsResponse) | |+| SearchVCSProviderRepositories | [SearchVCSProviderRepositoriesRequest](#bytebase-v1-SearchVCSProviderRepositoriesRequest) | [SearchVCSProviderRepositoriesResponse](#bytebase-v1-SearchVCSProviderRepositoriesResponse) | || ListVCSConnectorsInProvider | [ListVCSConnectorsInProviderRequest](#bytebase-v1-ListVCSConnectorsInProviderRequest) | [ListVCSConnectorsInProviderResponse](#bytebase-v1-ListVCSConnectorsInProviderResponse) | |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex b009d598dd..335c3fba9e 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -2506,23 +2506,23 @@</li><li>- <a href="#bytebase.v1.SearchVCSProviderProjectsRequest"><span class="badge">M</span>SearchVCSProviderProjectsRequest</a>+ <a href="#bytebase.v1.SearchVCSProviderRepositoriesRequest"><span class="badge">M</span>SearchVCSProviderRepositoriesRequest</a></li><li>- <a href="#bytebase.v1.SearchVCSProviderProjectsResponse"><span class="badge">M</span>SearchVCSProviderProjectsResponse</a>+ <a href="#bytebase.v1.SearchVCSProviderRepositoriesResponse"><span class="badge">M</span>SearchVCSProviderRepositoriesResponse</a></li><li>- <a href="#bytebase.v1.SearchVCSProviderProjectsResponse.Project"><span class="badge">M</span>SearchVCSProviderProjectsResponse.Project</a>+ <a href="#bytebase.v1.UpdateVCSProviderRequest"><span class="badge">M</span>UpdateVCSProviderRequest</a></li><li>- <a href="#bytebase.v1.UpdateVCSProviderRequest"><span class="badge">M</span>UpdateVCSProviderRequest</a>+ <a href="#bytebase.v1.VCSProvider"><span class="badge">M</span>VCSProvider</a></li><li>- <a href="#bytebase.v1.VCSProvider"><span class="badge">M</span>VCSProvider</a>+ <a href="#bytebase.v1.VCSRepository"><span class="badge">M</span>VCSRepository</a></li>@@ -26983,7 +26983,7 @@ If this field is omitted, there are no subsequent pages. </p></td>- <h3 id="bytebase.v1.SearchVCSProviderProjectsRequest">SearchVCSProviderProjectsRequest</h3>+ <h3 id="bytebase.v1.SearchVCSProviderRepositoriesRequest">SearchVCSProviderRepositoriesRequest</h3><p></p>@@ -27008,7 +27008,7 @@ Format: vcsProviders/{vcsProvider} </p></td>- <h3 id="bytebase.v1.SearchVCSProviderProjectsResponse">SearchVCSProviderProjectsResponse</h3>+ <h3 id="bytebase.v1.SearchVCSProviderRepositoriesResponse">SearchVCSProviderRepositoriesResponse</h3><p></p>@@ -27019,10 +27019,10 @@ Format: vcsProviders/{vcsProvider} </p></td><tbody><tr>- <td>projects</td>- <td><a href="#bytebase.v1.SearchVCSProviderProjectsResponse.Project">SearchVCSProviderProjectsResponse.Project</a></td>+ <td>repositories</td>+ <td><a href="#bytebase.v1.VCSRepository">VCSRepository</a></td><td>repeated</td>- <td><p>The list of project in vcs provider. </p></td>+ <td><p>The list of repositories in vcs provider. </p></td></tr></tbody>@@ -27032,7 +27032,7 @@ Format: vcsProviders/{vcsProvider} </p></td>- <h3 id="bytebase.v1.SearchVCSProviderProjectsResponse.Project">SearchVCSProviderProjectsResponse.Project</h3>+ <h3 id="bytebase.v1.UpdateVCSProviderRequest">UpdateVCSProviderRequest</h3><p></p>@@ -27043,31 +27043,17 @@ Format: vcsProviders/{vcsProvider} </p></td><tbody><tr>- <td>id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The id of the project in vcs provider. </p></td>- </tr>-- <tr>- <td>title</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The title of the project in vcs provider. </p></td>- </tr>-- <tr>- <td>fullpath</td>- <td><a href="#string">string</a></td>+ <td>vcs_provider</td>+ <td><a href="#bytebase.v1.VCSProvider">VCSProvider</a></td><td></td>- <td><p>The fullpath of the project in vcs provider. </p></td>+ <td><p> </p></td></tr><tr>- <td>web_url</td>- <td><a href="#string">string</a></td>+ <td>update_mask</td>+ <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td><td></td>- <td><p>Web url of the project in vcs provider. </p></td>+ <td><p>The list of fields to be updated. </p></td></tr></tbody>@@ -27077,7 +27063,7 @@ Format: vcsProviders/{vcsProvider} </p></td>- <h3 id="bytebase.v1.UpdateVCSProviderRequest">UpdateVCSProviderRequest</h3>+ <h3 id="bytebase.v1.VCSProvider">VCSProvider</h3><p></p>@@ -27088,17 +27074,40 @@ Format: vcsProviders/{vcsProvider} </p></td><tbody><tr>- <td>vcs_provider</td>- <td><a href="#bytebase.v1.VCSProvider">VCSProvider</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the vcs provider.+Format: vcsProviders/{vcsProvider} </p></td>+ </tr>++ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The title of the vcs provider. It is used to display in the UI. Specified by the client. </p></td>+ </tr>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.VCSProvider.Type">VCSProvider.Type</a></td><td></td><td><p> </p></td></tr><tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>+ <td>url</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The list of fields to be updated. </p></td>+ <td><p>The url of the vcs provider. Specified by the client.+For example: github.com, gitlab.com, gitlab.bytebase.com. </p></td>+ </tr>++ <tr>+ <td>access_token</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The access token of the vcs provider. </p></td></tr></tbody>@@ -27108,7 +27117,7 @@ Format: vcsProviders/{vcsProvider} </p></td>- <h3 id="bytebase.v1.VCSProvider">VCSProvider</h3>+ <h3 id="bytebase.v1.VCSRepository">VCSRepository</h3><p></p>@@ -27119,40 +27128,35 @@ Format: vcsProviders/{vcsProvider} </p></td><tbody><tr>- <td>name</td>+ <td>id</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of the vcs provider.-Format: vcsProviders/{vcsProvider} </p></td>+ <td><p>The id of the repository in vcs provider.+e.g. In GitLab, this is the corresponding project id. e.g. 123 </p></td></tr><tr><td>title</td><td><a href="#string">string</a></td><td></td>- <td><p>The title of the vcs provider. It is used to display in the UI. Specified by the client. </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.v1.VCSProvider.Type">VCSProvider.Type</a></td>- <td></td>- <td><p> </p></td>+ <td><p>The title of the repository in vcs provider.+e.g. sample-project </p></td></tr><tr>- <td>url</td>+ <td>full_path</td><td><a href="#string">string</a></td><td></td>- <td><p>The url of the vcs provider. Specified by the client.-For example: github.com, gitlab.com, gitlab.bytebase.com. </p></td>+ <td><p>The full_path of the repository in vcs provider.+e.g. bytebase/sample-project </p></td></tr><tr>- <td>access_token</td>+ <td>web_url</td><td><a href="#string">string</a></td><td></td>- <td><p>The access token of the vcs provider. </p></td>+ <td><p>Web url of the repository in vcs provider.+e.g. http://gitlab.bytebase.com/bytebase/sample-project </p></td></tr></tbody>@@ -27253,9 +27257,9 @@ For example: github.com, gitlab.com, gitlab.bytebase.com. </p></td></tr><tr>- <td>SearchVCSProviderProjects</td>- <td><a href="#bytebase.v1.SearchVCSProviderProjectsRequest">SearchVCSProviderProjectsRequest</a></td>- <td><a href="#bytebase.v1.SearchVCSProviderProjectsResponse">SearchVCSProviderProjectsResponse</a></td>+ <td>SearchVCSProviderRepositories</td>+ <td><a href="#bytebase.v1.SearchVCSProviderRepositoriesRequest">SearchVCSProviderRepositoriesRequest</a></td>+ <td><a href="#bytebase.v1.SearchVCSProviderRepositoriesResponse">SearchVCSProviderRepositoriesResponse</a></td><td><p></p></td></tr>@@ -27337,9 +27341,9 @@ For example: github.com, gitlab.com, gitlab.bytebase.com. </p></td><tr>- <td>SearchVCSProviderProjects</td>+ <td>SearchVCSProviderRepositories</td><td>POST</td>- <td>/v1/{name=vcsProviders/*}:searchProjects</td>+ <td>/v1/{name=vcsProviders/*}:searchRepositories</td><td>*</td></tr>diff --git a/proto/generated-go/v1/vcs_provider_service.pb.go b/proto/generated-go/v1/vcs_provider_service.pb.goindex 30e2c782dd..a6c0a0087e 100644--- a/proto/generated-go/v1/vcs_provider_service.pb.go+++ b/proto/generated-go/v1/vcs_provider_service.pb.go@@ -79,7 +79,7 @@ func (x VCSProvider_Type) Number() protoreflect.EnumNumber {// Deprecated: Use VCSProvider_Type.Descriptor instead.func (VCSProvider_Type) EnumDescriptor() ([]byte, []int) {- return file_v1_vcs_provider_service_proto_rawDescGZIP(), []int{10, 0}+ return file_v1_vcs_provider_service_proto_rawDescGZIP(), []int{11, 0}}type CreateVCSProviderRequest struct {@@ -414,7 +414,7 @@ func (x *DeleteVCSProviderRequest) GetName() string {return ""}-type SearchVCSProviderProjectsRequest struct {+type SearchVCSProviderRepositoriesRequest struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCacheunknownFields protoimpl.UnknownFields@@ -424,8 +424,8 @@ type SearchVCSProviderProjectsRequest struct {Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`}-func (x *SearchVCSProviderProjectsRequest) Reset() {- *x = SearchVCSProviderProjectsRequest{}+func (x *SearchVCSProviderRepositoriesRequest) Reset() {+ *x = SearchVCSProviderRepositoriesRequest{}if protoimpl.UnsafeEnabled {mi := &file_v1_vcs_provider_service_proto_msgTypes[6]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))@@ -433,13 +433,13 @@ func (x *SearchVCSProviderProjectsRequest) Reset() {}}-func (x *SearchVCSProviderProjectsRequest) String() string {+func (x *SearchVCSProviderRepositoriesRequest) String() string {return protoimpl.X.MessageStringOf(x)}-func (*SearchVCSProviderProjectsRequest) ProtoMessage() {}+func (*SearchVCSProviderRepositoriesRequest) ProtoMessage() {}-func (x *SearchVCSProviderProjectsRequest) ProtoReflect() protoreflect.Message {+func (x *SearchVCSProviderRepositoriesRequest) ProtoReflect() protoreflect.Message {mi := &file_v1_vcs_provider_service_proto_msgTypes[6]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))@@ -451,29 +451,39 @@ func (x *SearchVCSProviderProjectsRequest) ProtoReflect() protoreflect.Message {return mi.MessageOf(x)}-// Deprecated: Use SearchVCSProviderProjectsRequest.ProtoReflect.Descriptor instead.-func (*SearchVCSProviderProjectsRequest) Descriptor() ([]byte, []int) {+// Deprecated: Use SearchVCSProviderRepositoriesRequest.ProtoReflect.Descriptor instead.+func (*SearchVCSProviderRepositoriesRequest) Descriptor() ([]byte, []int) {return file_v1_vcs_provider_service_proto_rawDescGZIP(), []int{6}}-func (x *SearchVCSProviderProjectsRequest) GetName() string {+func (x *SearchVCSProviderRepositoriesRequest) GetName() string {if x != nil {return x.Name}return ""}-type SearchVCSProviderProjectsResponse struct {+type VCSRepository struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCacheunknownFields protoimpl.UnknownFields- // The list of project in vcs provider.- Projects []*SearchVCSProviderProjectsResponse_Project `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"`+ // The id of the repository in vcs provider.+ // e.g. In GitLab, this is the corresponding project id. e.g. 123+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`+ // The title of the repository in vcs provider.+ // e.g. sample-project+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`+ // The full_path of the repository in vcs provider.+ // e.g. bytebase/sample-project+ FullPath string `protobuf:"bytes,3,opt,name=full_path,json=fullPath,proto3" json:"full_path,omitempty"`+ // Web url of the repository in vcs provider.+ // e.g. http://gitlab.bytebase.com/bytebase/sample-project+ WebUrl string `protobuf:"bytes,4,opt,name=web_url,json=webUrl,proto3" json:"web_url,omitempty"`}-func (x *SearchVCSProviderProjectsResponse) Reset() {- *x = SearchVCSProviderProjectsResponse{}+func (x *VCSRepository) Reset() {+ *x = VCSRepository{}if protoimpl.UnsafeEnabled {mi := &file_v1_vcs_provider_service_proto_msgTypes[7]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))@@ -481,13 +491,13 @@ func (x *SearchVCSProviderProjectsResponse) Reset() {}}-func (x *SearchVCSProviderProjectsResponse) String() string {+func (x *VCSRepository) String() string {return protoimpl.X.MessageStringOf(x)}-func (*SearchVCSProviderProjectsResponse) ProtoMessage() {}+func (*VCSRepository) ProtoMessage() {}-func (x *SearchVCSProviderProjectsResponse) ProtoReflect() protoreflect.Message {+func (x *VCSRepository) ProtoReflect() protoreflect.Message {mi := &file_v1_vcs_provider_service_proto_msgTypes[7]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))@@ -499,14 +509,83 @@ func (x *SearchVCSProviderProjectsResponse) ProtoReflect() protoreflect.Messagereturn mi.MessageOf(x)}-// Deprecated: Use SearchVCSProviderProjectsResponse.ProtoReflect.Descriptor instead.-func (*SearchVCSProviderProjectsResponse) Descriptor() ([]byte, []int) {+// Deprecated: Use VCSRepository.ProtoReflect.Descriptor instead.+func (*VCSRepository) Descriptor() ([]byte, []int) {return file_v1_vcs_provider_service_proto_rawDescGZIP(), []int{7}}-func (x *SearchVCSProviderProjectsResponse) GetProjects() []*SearchVCSProviderProjectsResponse_Project {+func (x *VCSRepository) GetId() string {+ if x != nil {+ return x.Id+ }+ return ""+}++func (x *VCSRepository) GetTitle() string {+ if x != nil {+ return x.Title+ }+ return ""+}++func (x *VCSRepository) GetFullPath() string {+ if x != nil {+ return x.FullPath+ }+ return ""+}++func (x *VCSRepository) GetWebUrl() string {if x != nil {- return x.Projects+ return x.WebUrl+ }+ return ""+}++type SearchVCSProviderRepositoriesResponse struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The list of repositories in vcs provider.+ Repositories []*VCSRepository `protobuf:"bytes,1,rep,name=repositories,proto3" json:"repositories,omitempty"`+}++func (x *SearchVCSProviderRepositoriesResponse) Reset() {+ *x = SearchVCSProviderRepositoriesResponse{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_vcs_provider_service_proto_msgTypes[8]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *SearchVCSProviderRepositoriesResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SearchVCSProviderRepositoriesResponse) ProtoMessage() {}++func (x *SearchVCSProviderRepositoriesResponse) ProtoReflect() protoreflect.Message {+ mi := &file_v1_vcs_provider_service_proto_msgTypes[8]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use SearchVCSProviderRepositoriesResponse.ProtoReflect.Descriptor instead.+func (*SearchVCSProviderRepositoriesResponse) Descriptor() ([]byte, []int) {+ return file_v1_vcs_provider_service_proto_rawDescGZIP(), []int{8}+}++func (x *SearchVCSProviderRepositoriesResponse) GetRepositories() []*VCSRepository {+ if x != nil {+ return x.Repositories}return nil}@@ -524,7 +603,7 @@ type ListVCSConnectorsInProviderRequest struct {func (x *ListVCSConnectorsInProviderRequest) Reset() {*x = ListVCSConnectorsInProviderRequest{}if protoimpl.UnsafeEnabled {- mi := &file_v1_vcs_provider_service_proto_msgTypes[8]+ mi := &file_v1_vcs_provider_service_proto_msgTypes[9]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -537,7 +616,7 @@ func (x *ListVCSConnectorsInProviderRequest) String() string {func (*ListVCSConnectorsInProviderRequest) ProtoMessage() {}func (x *ListVCSConnectorsInProviderRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_vcs_provider_service_proto_msgTypes[8]+ mi := &file_v1_vcs_provider_service_proto_msgTypes[9]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -550,7 +629,7 @@ func (x *ListVCSConnectorsInProviderRequest) ProtoReflect() protoreflect.Message// Deprecated: Use ListVCSConnectorsInProviderRequest.ProtoReflect.Descriptor instead.func (*ListVCSConnectorsInProviderRequest) Descriptor() ([]byte, []int) {- return file_v1_vcs_provider_service_proto_rawDescGZIP(), []int{8}+ return file_v1_vcs_provider_service_proto_rawDescGZIP(), []int{9}}func (x *ListVCSConnectorsInProviderRequest) GetName() string {@@ -572,7 +651,7 @@ type ListVCSConnectorsInProviderResponse struct {func (x *ListVCSConnectorsInProviderResponse) Reset() {*x = ListVCSConnectorsInProviderResponse{}if protoimpl.UnsafeEnabled {- mi := &file_v1_vcs_provider_service_proto_msgTypes[9]+ mi := &file_v1_vcs_provider_service_proto_msgTypes[10]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -585,7 +664,7 @@ func (x *ListVCSConnectorsInProviderResponse) String() string {func (*ListVCSConnectorsInProviderResponse) ProtoMessage() {}func (x *ListVCSConnectorsInProviderResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_vcs_provider_service_proto_msgTypes[9]+ mi := &file_v1_vcs_provider_service_proto_msgTypes[10]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -598,7 +677,7 @@ func (x *ListVCSConnectorsInProviderResponse) ProtoReflect() protoreflect.Messag// Deprecated: Use ListVCSConnectorsInProviderResponse.ProtoReflect.Descriptor instead.func (*ListVCSConnectorsInProviderResponse) Descriptor() ([]byte, []int) {- return file_v1_vcs_provider_service_proto_rawDescGZIP(), []int{9}+ return file_v1_vcs_provider_service_proto_rawDescGZIP(), []int{10}}func (x *ListVCSConnectorsInProviderResponse) GetVcsConnectors() []*VCSConnector {@@ -629,7 +708,7 @@ type VCSProvider struct {func (x *VCSProvider) Reset() {*x = VCSProvider{}if protoimpl.UnsafeEnabled {- mi := &file_v1_vcs_provider_service_proto_msgTypes[10]+ mi := &file_v1_vcs_provider_service_proto_msgTypes[11]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -642,7 +721,7 @@ func (x *VCSProvider) String() string {func (*VCSProvider) ProtoMessage() {}func (x *VCSProvider) ProtoReflect() protoreflect.Message {- mi := &file_v1_vcs_provider_service_proto_msgTypes[10]+ mi := &file_v1_vcs_provider_service_proto_msgTypes[11]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -655,7 +734,7 @@ func (x *VCSProvider) ProtoReflect() protoreflect.Message {// Deprecated: Use VCSProvider.ProtoReflect.Descriptor instead.func (*VCSProvider) Descriptor() ([]byte, []int) {- return file_v1_vcs_provider_service_proto_rawDescGZIP(), []int{10}+ return file_v1_vcs_provider_service_proto_rawDescGZIP(), []int{11}}func (x *VCSProvider) GetName() string {@@ -693,81 +772,6 @@ func (x *VCSProvider) GetAccessToken() string {return ""}-type SearchVCSProviderProjectsResponse_Project struct {- state protoimpl.MessageState- sizeCache protoimpl.SizeCache- unknownFields protoimpl.UnknownFields-- // The id of the project in vcs provider.- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`- // The title of the project in vcs provider.- Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`- // The fullpath of the project in vcs provider.- Fullpath string `protobuf:"bytes,3,opt,name=fullpath,proto3" json:"fullpath,omitempty"`- // Web url of the project in vcs provider.- WebUrl string `protobuf:"bytes,4,opt,name=web_url,json=webUrl,proto3" json:"web_url,omitempty"`-}--func (x *SearchVCSProviderProjectsResponse_Project) Reset() {- *x = SearchVCSProviderProjectsResponse_Project{}- if protoimpl.UnsafeEnabled {- mi := &file_v1_vcs_provider_service_proto_msgTypes[11]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)- }-}--func (x *SearchVCSProviderProjectsResponse_Project) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*SearchVCSProviderProjectsResponse_Project) ProtoMessage() {}--func (x *SearchVCSProviderProjectsResponse_Project) ProtoReflect() protoreflect.Message {- mi := &file_v1_vcs_provider_service_proto_msgTypes[11]- if protoimpl.UnsafeEnabled && x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use SearchVCSProviderProjectsResponse_Project.ProtoReflect.Descriptor instead.-func (*SearchVCSProviderProjectsResponse_Project) Descriptor() ([]byte, []int) {- return file_v1_vcs_provider_service_proto_rawDescGZIP(), []int{7, 0}-}--func (x *SearchVCSProviderProjectsResponse_Project) GetId() string {- if x != nil {- return x.Id- }- return ""-}--func (x *SearchVCSProviderProjectsResponse_Project) GetTitle() string {- if x != nil {- return x.Title- }- return ""-}--func (x *SearchVCSProviderProjectsResponse_Project) GetFullpath() string {- if x != nil {- return x.Fullpath- }- return ""-}--func (x *SearchVCSProviderProjectsResponse_Project) GetWebUrl() string {- if x != nil {- return x.WebUrl- }- return ""-}-var File_v1_vcs_provider_service_proto protoreflect.FileDescriptorvar file_v1_vcs_provider_service_proto_rawDesc = []byte{@@ -823,120 +827,121 @@ var file_v1_vcs_provider_service_proto_rawDesc = []byte{0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x33, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65,0x74, 0x65, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71,0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,- 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a,- 0x20, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,- 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,- 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,- 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xdd, 0x01, 0x0a, 0x21, 0x53,- 0x65, 0x61, 0x72, 0x63, 0x68, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,- 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,- 0x12, 0x52, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,- 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,- 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,- 0x73, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6a,- 0x65, 0x63, 0x74, 0x73, 0x1a, 0x64, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12,+ 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3f, 0x0a,+ 0x24, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,+ 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,+ 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x6b,+ 0x0a, 0x0d, 0x56, 0x43, 0x53, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12,0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,- 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x70, 0x61, 0x74,- 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x70, 0x61, 0x74,- 0x68, 0x12, 0x17, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01,- 0x28, 0x09, 0x52, 0x06, 0x77, 0x65, 0x62, 0x55, 0x72, 0x6c, 0x22, 0x3d, 0x0a, 0x22, 0x4c, 0x69,- 0x73, 0x74, 0x56, 0x43, 0x53, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x49,- 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,- 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,- 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x67, 0x0a, 0x23, 0x4c, 0x69, 0x73,- 0x74, 0x56, 0x43, 0x53, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x49, 0x6e,- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,- 0x12, 0x40, 0x0a, 0x0e, 0x76, 0x63, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,- 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x43, 0x53, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,- 0x74, 0x6f, 0x72, 0x52, 0x0d, 0x76, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,- 0x72, 0x73, 0x22, 0x8f, 0x02, 0x0a, 0x0b, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,- 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,- 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x74,- 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,- 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03,- 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x54,- 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x15,- 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02,- 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x26, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f,- 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x04,- 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x55, 0x0a,- 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,- 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x47,- 0x49, 0x54, 0x48, 0x55, 0x42, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x4c, 0x41,- 0x42, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x49, 0x54, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54,- 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x4f,- 0x50, 0x53, 0x10, 0x04, 0x32, 0x9a, 0x08, 0x0a, 0x12, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76,- 0x69, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0e, 0x47,- 0x65, 0x74, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x22, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56,- 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,- 0x74, 0x1a, 0x18, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,- 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x28, 0xda, 0x41, 0x04,- 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f,- 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x76, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,- 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7c, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x43, 0x53,- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x70, 0x61,+ 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x50, 0x61,+ 0x74, 0x68, 0x12, 0x17, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x65, 0x62, 0x55, 0x72, 0x6c, 0x22, 0x67, 0x0a, 0x25, 0x53,+ 0x65, 0x61, 0x72, 0x63, 0x68, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,+ 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x43, 0x53, 0x52, 0x65, 0x70, 0x6f,+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,+ 0x72, 0x69, 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x43, 0x53, 0x43,+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69,+ 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61,+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e,+ 0x61, 0x6d, 0x65, 0x22, 0x67, 0x0a, 0x23, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x43, 0x53, 0x43, 0x6f,+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,+ 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x76, 0x63,+ 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03,+ 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x56, 0x43, 0x53, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0d, 0x76,+ 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x8f, 0x02, 0x0a,+ 0x0b, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04,+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52,+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02,+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,+ 0x12, 0x36, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x43, 0x53,+ 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0,+ 0x41, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18,+ 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12,+ 0x26, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,+ 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x04, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65,+ 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x55, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12,+ 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,+ 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x48, 0x55, 0x42, 0x10,+ 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x4c, 0x41, 0x42, 0x10, 0x02, 0x12, 0x0d, 0x0a,+ 0x09, 0x42, 0x49, 0x54, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c,+ 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x4f, 0x50, 0x53, 0x10, 0x04, 0x32, 0xaa,+ 0x08, 0x0a, 0x12, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x65,+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x56, 0x43, 0x53, 0x50,+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76,+ 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f,+ 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x28, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,+ 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,+ 0x76, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12,+ 0x7c, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,+ 0x65, 0x72, 0x73, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,+ 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65,0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x43, 0x53, 0x50,- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,- 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69,- 0x73, 0x74, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65,- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02,- 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,- 0x65, 0x72, 0x73, 0x12, 0x7f, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x43, 0x53,- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x43, 0x53,- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,- 0x18, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x43,- 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x29, 0xda, 0x41, 0x00, 0x82, 0xd3,- 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x0c, 0x76, 0x63, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,- 0x65, 0x72, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69,- 0x64, 0x65, 0x72, 0x73, 0x12, 0xad, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56,- 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56,- 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,- 0x74, 0x1a, 0x18, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,- 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x57, 0xda, 0x41, 0x18,- 0x76, 0x63, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64,- 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x3a, 0x0c,- 0x76, 0x63, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x32, 0x26, 0x2f, 0x76,- 0x31, 0x2f, 0x7b, 0x76, 0x63, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e,+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,+ 0x22, 0x1b, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31,+ 0x2f, 0x76, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x7f, 0x0a,+ 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,+ 0x65, 0x72, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,+ 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69,+ 0x64, 0x65, 0x72, 0x22, 0x29, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x0c,+ 0x76, 0x63, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x10, 0x2f, 0x76,+ 0x31, 0x2f, 0x76, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0xad,+ 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76,+ 0x69, 0x64, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76,+ 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f,+ 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x57, 0xda, 0x41, 0x18, 0x76, 0x63, 0x73, 0x5f, 0x70, 0x72,+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61,+ 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x3a, 0x0c, 0x76, 0x63, 0x73, 0x5f, 0x70, 0x72,+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x32, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x76, 0x63, 0x73,+ 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x76,+ 0x63, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x75,+ 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69,+ 0x64, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69,+ 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,+ 0x74, 0x79, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x2a, 0x19, 0x2f, 0x76, 0x31, 0x2f,+ 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x76, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,+ 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xbf, 0x01, 0x0a, 0x1d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,+ 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73,+ 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x56, 0x43, 0x53, 0x50,+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,+ 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x56,+ 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,+ 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37,+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a, 0x01, 0x2a, 0x22, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x7b,0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x76, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,- 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x75, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x43,- 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x43,- 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,- 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,- 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b,- 0x2a, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x76, 0x63, 0x73, 0x50,- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xaf, 0x01, 0x0a, 0x19,- 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x56, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,- 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x56, 0x43,- 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,- 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x56, 0x43, 0x53,- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d,- 0x3a, 0x01, 0x2a, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x76,- 0x63, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73,- 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0xb1, 0x01,- 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x43, 0x53, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,- 0x6f, 0x72, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,+ 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73,+ 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0xb1, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74,0x56, 0x43, 0x53, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x49, 0x6e, 0x50,- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,- 0x74, 0x56, 0x43, 0x53, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x49, 0x6e,- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,- 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e,- 0x61, 0x6d, 0x65, 0x3d, 0x76, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73,- 0x2f, 0x2a, 0x7d, 0x2f, 0x76, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,- 0x73, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67,- 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x43, 0x53, 0x43, 0x6f, 0x6e,+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,+ 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x43, 0x53, 0x43, 0x6f,+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,+ 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93,+ 0x02, 0x29, 0x12, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x76, 0x63,+ 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x76, 0x63,+ 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x42, 0x11, 0x5a, 0x0f, 0x67,+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06,+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (@@ -954,29 +959,29 @@ func file_v1_vcs_provider_service_proto_rawDescGZIP() []byte {var file_v1_vcs_provider_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)var file_v1_vcs_provider_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12)var file_v1_vcs_provider_service_proto_goTypes = []interface{}{- (VCSProvider_Type)(0), // 0: bytebase.v1.VCSProvider.Type- (*CreateVCSProviderRequest)(nil), // 1: bytebase.v1.CreateVCSProviderRequest- (*GetVCSProviderRequest)(nil), // 2: bytebase.v1.GetVCSProviderRequest- (*ListVCSProvidersRequest)(nil), // 3: bytebase.v1.ListVCSProvidersRequest- (*ListVCSProvidersResponse)(nil), // 4: bytebase.v1.ListVCSProvidersResponse- (*UpdateVCSProviderRequest)(nil), // 5: bytebase.v1.UpdateVCSProviderRequest- (*DeleteVCSProviderRequest)(nil), // 6: bytebase.v1.DeleteVCSProviderRequest- (*SearchVCSProviderProjectsRequest)(nil), // 7: bytebase.v1.SearchVCSProviderProjectsRequest- (*SearchVCSProviderProjectsResponse)(nil), // 8: bytebase.v1.SearchVCSProviderProjectsResponse- (*ListVCSConnectorsInProviderRequest)(nil), // 9: bytebase.v1.ListVCSConnectorsInProviderRequest- (*ListVCSConnectorsInProviderResponse)(nil), // 10: bytebase.v1.ListVCSConnectorsInProviderResponse- (*VCSProvider)(nil), // 11: bytebase.v1.VCSProvider- (*SearchVCSProviderProjectsResponse_Project)(nil), // 12: bytebase.v1.SearchVCSProviderProjectsResponse.Project- (*fieldmaskpb.FieldMask)(nil), // 13: google.protobuf.FieldMask- (*VCSConnector)(nil), // 14: bytebase.v1.VCSConnector- (*emptypb.Empty)(nil), // 15: google.protobuf.Empty+ (VCSProvider_Type)(0), // 0: bytebase.v1.VCSProvider.Type+ (*CreateVCSProviderRequest)(nil), // 1: bytebase.v1.CreateVCSProviderRequest+ (*GetVCSProviderRequest)(nil), // 2: bytebase.v1.GetVCSProviderRequest+ (*ListVCSProvidersRequest)(nil), // 3: bytebase.v1.ListVCSProvidersRequest+ (*ListVCSProvidersResponse)(nil), // 4: bytebase.v1.ListVCSProvidersResponse+ (*UpdateVCSProviderRequest)(nil), // 5: bytebase.v1.UpdateVCSProviderRequest+ (*DeleteVCSProviderRequest)(nil), // 6: bytebase.v1.DeleteVCSProviderRequest+ (*SearchVCSProviderRepositoriesRequest)(nil), // 7: bytebase.v1.SearchVCSProviderRepositoriesRequest+ (*VCSRepository)(nil), // 8: bytebase.v1.VCSRepository+ (*SearchVCSProviderRepositoriesResponse)(nil), // 9: bytebase.v1.SearchVCSProviderRepositoriesResponse+ (*ListVCSConnectorsInProviderRequest)(nil), // 10: bytebase.v1.ListVCSConnectorsInProviderRequest+ (*ListVCSConnectorsInProviderResponse)(nil), // 11: bytebase.v1.ListVCSConnectorsInProviderResponse+ (*VCSProvider)(nil), // 12: bytebase.v1.VCSProvider+ (*fieldmaskpb.FieldMask)(nil), // 13: google.protobuf.FieldMask+ (*VCSConnector)(nil), // 14: bytebase.v1.VCSConnector+ (*emptypb.Empty)(nil), // 15: google.protobuf.Empty}var file_v1_vcs_provider_service_proto_depIdxs = []int32{- 11, // 0: bytebase.v1.CreateVCSProviderRequest.vcs_provider:type_name -> bytebase.v1.VCSProvider- 11, // 1: bytebase.v1.ListVCSProvidersResponse.vcs_providers:type_name -> bytebase.v1.VCSProvider- 11, // 2: bytebase.v1.UpdateVCSProviderRequest.vcs_provider:type_name -> bytebase.v1.VCSProvider+ 12, // 0: bytebase.v1.CreateVCSProviderRequest.vcs_provider:type_name -> bytebase.v1.VCSProvider+ 12, // 1: bytebase.v1.ListVCSProvidersResponse.vcs_providers:type_name -> bytebase.v1.VCSProvider+ 12, // 2: bytebase.v1.UpdateVCSProviderRequest.vcs_provider:type_name -> bytebase.v1.VCSProvider13, // 3: bytebase.v1.UpdateVCSProviderRequest.update_mask:type_name -> google.protobuf.FieldMask- 12, // 4: bytebase.v1.SearchVCSProviderProjectsResponse.projects:type_name -> bytebase.v1.SearchVCSProviderProjectsResponse.Project+ 8, // 4: bytebase.v1.SearchVCSProviderRepositoriesResponse.repositories:type_name -> bytebase.v1.VCSRepository14, // 5: bytebase.v1.ListVCSConnectorsInProviderResponse.vcs_connectors:type_name -> bytebase.v1.VCSConnector0, // 6: bytebase.v1.VCSProvider.type:type_name -> bytebase.v1.VCSProvider.Type2, // 7: bytebase.v1.VCSProviderService.GetVCSProvider:input_type -> bytebase.v1.GetVCSProviderRequest@@ -984,15 +989,15 @@ var file_v1_vcs_provider_service_proto_depIdxs = []int32{1, // 9: bytebase.v1.VCSProviderService.CreateVCSProvider:input_type -> bytebase.v1.CreateVCSProviderRequest5, // 10: bytebase.v1.VCSProviderService.UpdateVCSProvider:input_type -> bytebase.v1.UpdateVCSProviderRequest6, // 11: bytebase.v1.VCSProviderService.DeleteVCSProvider:input_type -> bytebase.v1.DeleteVCSProviderRequest- 7, // 12: bytebase.v1.VCSProviderService.SearchVCSProviderProjects:input_type -> bytebase.v1.SearchVCSProviderProjectsRequest- 9, // 13: bytebase.v1.VCSProviderService.ListVCSConnectorsInProvider:input_type -> bytebase.v1.ListVCSConnectorsInProviderRequest- 11, // 14: bytebase.v1.VCSProviderService.GetVCSProvider:output_type -> bytebase.v1.VCSProvider+ 7, // 12: bytebase.v1.VCSProviderService.SearchVCSProviderRepositories:input_type -> bytebase.v1.SearchVCSProviderRepositoriesRequest+ 10, // 13: bytebase.v1.VCSProviderService.ListVCSConnectorsInProvider:input_type -> bytebase.v1.ListVCSConnectorsInProviderRequest+ 12, // 14: bytebase.v1.VCSProviderService.GetVCSProvider:output_type -> bytebase.v1.VCSProvider4, // 15: bytebase.v1.VCSProviderService.ListVCSProviders:output_type -> bytebase.v1.ListVCSProvidersResponse- 11, // 16: bytebase.v1.VCSProviderService.CreateVCSProvider:output_type -> bytebase.v1.VCSProvider- 11, // 17: bytebase.v1.VCSProviderService.UpdateVCSProvider:output_type -> bytebase.v1.VCSProvider+ 12, // 16: bytebase.v1.VCSProviderService.CreateVCSProvider:output_type -> bytebase.v1.VCSProvider+ 12, // 17: bytebase.v1.VCSProviderService.UpdateVCSProvider:output_type -> bytebase.v1.VCSProvider15, // 18: bytebase.v1.VCSProviderService.DeleteVCSProvider:output_type -> google.protobuf.Empty- 8, // 19: bytebase.v1.VCSProviderService.SearchVCSProviderProjects:output_type -> bytebase.v1.SearchVCSProviderProjectsResponse- 10, // 20: bytebase.v1.VCSProviderService.ListVCSConnectorsInProvider:output_type -> bytebase.v1.ListVCSConnectorsInProviderResponse+ 9, // 19: bytebase.v1.VCSProviderService.SearchVCSProviderRepositories:output_type -> bytebase.v1.SearchVCSProviderRepositoriesResponse+ 11, // 20: bytebase.v1.VCSProviderService.ListVCSConnectorsInProvider:output_type -> bytebase.v1.ListVCSConnectorsInProviderResponse14, // [14:21] is the sub-list for method output_type7, // [7:14] is the sub-list for method input_type7, // [7:7] is the sub-list for extension type_name@@ -1080,7 +1085,7 @@ func file_v1_vcs_provider_service_proto_init() {}}file_v1_vcs_provider_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*SearchVCSProviderProjectsRequest); i {+ switch v := v.(*SearchVCSProviderRepositoriesRequest); i {case 0:return &v.statecase 1:@@ -1092,7 +1097,7 @@ func file_v1_vcs_provider_service_proto_init() {}}file_v1_vcs_provider_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*SearchVCSProviderProjectsResponse); i {+ switch v := v.(*VCSRepository); i {case 0:return &v.statecase 1:@@ -1104,7 +1109,7 @@ func file_v1_vcs_provider_service_proto_init() {}}file_v1_vcs_provider_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*ListVCSConnectorsInProviderRequest); i {+ switch v := v.(*SearchVCSProviderRepositoriesResponse); i {case 0:return &v.statecase 1:@@ -1116,7 +1121,7 @@ func file_v1_vcs_provider_service_proto_init() {}}file_v1_vcs_provider_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*ListVCSConnectorsInProviderResponse); i {+ switch v := v.(*ListVCSConnectorsInProviderRequest); i {case 0:return &v.statecase 1:@@ -1128,7 +1133,7 @@ func file_v1_vcs_provider_service_proto_init() {}}file_v1_vcs_provider_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*VCSProvider); i {+ switch v := v.(*ListVCSConnectorsInProviderResponse); i {case 0:return &v.statecase 1:@@ -1140,7 +1145,7 @@ func file_v1_vcs_provider_service_proto_init() {}}file_v1_vcs_provider_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*SearchVCSProviderProjectsResponse_Project); i {+ switch v := v.(*VCSProvider); i {case 0:return &v.statecase 1:diff --git a/proto/generated-go/v1/vcs_provider_service.pb.gw.go b/proto/generated-go/v1/vcs_provider_service.pb.gw.goindex 10db3968cd..8e0ecadece 100644--- a/proto/generated-go/v1/vcs_provider_service.pb.gw.go+++ b/proto/generated-go/v1/vcs_provider_service.pb.gw.go@@ -315,8 +315,8 @@ func local_request_VCSProviderService_DeleteVCSProvider_0(ctx context.Context, m}-func request_VCSProviderService_SearchVCSProviderProjects_0(ctx context.Context, marshaler runtime.Marshaler, client VCSProviderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq SearchVCSProviderProjectsRequest+func request_VCSProviderService_SearchVCSProviderRepositories_0(ctx context.Context, marshaler runtime.Marshaler, client VCSProviderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq SearchVCSProviderRepositoriesRequestvar metadata runtime.ServerMetadataif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {@@ -340,13 +340,13 @@ func request_VCSProviderService_SearchVCSProviderProjects_0(ctx context.Context,return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)}- msg, err := client.SearchVCSProviderProjects(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ msg, err := client.SearchVCSProviderRepositories(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))return msg, metadata, err}-func local_request_VCSProviderService_SearchVCSProviderProjects_0(ctx context.Context, marshaler runtime.Marshaler, server VCSProviderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq SearchVCSProviderProjectsRequest+func local_request_VCSProviderService_SearchVCSProviderRepositories_0(ctx context.Context, marshaler runtime.Marshaler, server VCSProviderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq SearchVCSProviderRepositoriesRequestvar metadata runtime.ServerMetadataif err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {@@ -370,7 +370,7 @@ func local_request_VCSProviderService_SearchVCSProviderProjects_0(ctx context.Coreturn nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)}- msg, err := server.SearchVCSProviderProjects(ctx, &protoReq)+ msg, err := server.SearchVCSProviderRepositories(ctx, &protoReq)return msg, metadata, err}@@ -558,7 +558,7 @@ func RegisterVCSProviderServiceHandlerServer(ctx context.Context, mux *runtime.S})- mux.Handle("POST", pattern_VCSProviderService_SearchVCSProviderProjects_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ mux.Handle("POST", pattern_VCSProviderService_SearchVCSProviderRepositories_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()var stream runtime.ServerTransportStream@@ -566,12 +566,12 @@ func RegisterVCSProviderServiceHandlerServer(ctx context.Context, mux *runtime.SinboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)var err errorvar annotatedContext context.Context- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.VCSProviderService/SearchVCSProviderProjects", runtime.WithHTTPPathPattern("/v1/{name=vcsProviders/*}:searchProjects"))+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.VCSProviderService/SearchVCSProviderRepositories", runtime.WithHTTPPathPattern("/v1/{name=vcsProviders/*}:searchRepositories"))if err != nil {runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)return}- resp, md, err := local_request_VCSProviderService_SearchVCSProviderProjects_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ resp, md, err := local_request_VCSProviderService_SearchVCSProviderRepositories_0(annotatedContext, inboundMarshaler, server, req, pathParams)md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)if err != nil {@@ -579,7 +579,7 @@ func RegisterVCSProviderServiceHandlerServer(ctx context.Context, mux *runtime.Sreturn}- forward_VCSProviderService_SearchVCSProviderProjects_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ forward_VCSProviderService_SearchVCSProviderRepositories_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})@@ -759,25 +759,25 @@ func RegisterVCSProviderServiceHandlerClient(ctx context.Context, mux *runtime.S})- mux.Handle("POST", pattern_VCSProviderService_SearchVCSProviderProjects_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ mux.Handle("POST", pattern_VCSProviderService_SearchVCSProviderRepositories_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)var err errorvar annotatedContext context.Context- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.VCSProviderService/SearchVCSProviderProjects", runtime.WithHTTPPathPattern("/v1/{name=vcsProviders/*}:searchProjects"))+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.VCSProviderService/SearchVCSProviderRepositories", runtime.WithHTTPPathPattern("/v1/{name=vcsProviders/*}:searchRepositories"))if err != nil {runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)return}- resp, md, err := request_VCSProviderService_SearchVCSProviderProjects_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ resp, md, err := request_VCSProviderService_SearchVCSProviderRepositories_0(annotatedContext, inboundMarshaler, client, req, pathParams)annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)if err != nil {runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)return}- forward_VCSProviderService_SearchVCSProviderProjects_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ forward_VCSProviderService_SearchVCSProviderRepositories_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})@@ -817,7 +817,7 @@ var (pattern_VCSProviderService_DeleteVCSProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "vcsProviders", "name"}, ""))- pattern_VCSProviderService_SearchVCSProviderProjects_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "vcsProviders", "name"}, "searchProjects"))+ pattern_VCSProviderService_SearchVCSProviderRepositories_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "vcsProviders", "name"}, "searchRepositories"))pattern_VCSProviderService_ListVCSConnectorsInProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "vcsProviders", "name", "vcsConnectors"}, "")))@@ -833,7 +833,7 @@ var (forward_VCSProviderService_DeleteVCSProvider_0 = runtime.ForwardResponseMessage- forward_VCSProviderService_SearchVCSProviderProjects_0 = runtime.ForwardResponseMessage+ forward_VCSProviderService_SearchVCSProviderRepositories_0 = runtime.ForwardResponseMessageforward_VCSProviderService_ListVCSConnectorsInProvider_0 = runtime.ForwardResponseMessage)diff --git a/proto/generated-go/v1/vcs_provider_service_grpc.pb.go b/proto/generated-go/v1/vcs_provider_service_grpc.pb.goindex 1ebcf8b9e4..584af7dfe3 100644--- a/proto/generated-go/v1/vcs_provider_service_grpc.pb.go+++ b/proto/generated-go/v1/vcs_provider_service_grpc.pb.go@@ -20,13 +20,13 @@ import (const _ = grpc.SupportPackageIsVersion7const (- VCSProviderService_GetVCSProvider_FullMethodName = "/bytebase.v1.VCSProviderService/GetVCSProvider"- VCSProviderService_ListVCSProviders_FullMethodName = "/bytebase.v1.VCSProviderService/ListVCSProviders"- VCSProviderService_CreateVCSProvider_FullMethodName = "/bytebase.v1.VCSProviderService/CreateVCSProvider"- VCSProviderService_UpdateVCSProvider_FullMethodName = "/bytebase.v1.VCSProviderService/UpdateVCSProvider"- VCSProviderService_DeleteVCSProvider_FullMethodName = "/bytebase.v1.VCSProviderService/DeleteVCSProvider"- VCSProviderService_SearchVCSProviderProjects_FullMethodName = "/bytebase.v1.VCSProviderService/SearchVCSProviderProjects"- VCSProviderService_ListVCSConnectorsInProvider_FullMethodName = "/bytebase.v1.VCSProviderService/ListVCSConnectorsInProvider"+ VCSProviderService_GetVCSProvider_FullMethodName = "/bytebase.v1.VCSProviderService/GetVCSProvider"+ VCSProviderService_ListVCSProviders_FullMethodName = "/bytebase.v1.VCSProviderService/ListVCSProviders"+ VCSProviderService_CreateVCSProvider_FullMethodName = "/bytebase.v1.VCSProviderService/CreateVCSProvider"+ VCSProviderService_UpdateVCSProvider_FullMethodName = "/bytebase.v1.VCSProviderService/UpdateVCSProvider"+ VCSProviderService_DeleteVCSProvider_FullMethodName = "/bytebase.v1.VCSProviderService/DeleteVCSProvider"+ VCSProviderService_SearchVCSProviderRepositories_FullMethodName = "/bytebase.v1.VCSProviderService/SearchVCSProviderRepositories"+ VCSProviderService_ListVCSConnectorsInProvider_FullMethodName = "/bytebase.v1.VCSProviderService/ListVCSConnectorsInProvider")// VCSProviderServiceClient is the client API for VCSProviderService service.@@ -38,7 +38,7 @@ type VCSProviderServiceClient interface {CreateVCSProvider(ctx context.Context, in *CreateVCSProviderRequest, opts ...grpc.CallOption) (*VCSProvider, error)UpdateVCSProvider(ctx context.Context, in *UpdateVCSProviderRequest, opts ...grpc.CallOption) (*VCSProvider, error)DeleteVCSProvider(ctx context.Context, in *DeleteVCSProviderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)- SearchVCSProviderProjects(ctx context.Context, in *SearchVCSProviderProjectsRequest, opts ...grpc.CallOption) (*SearchVCSProviderProjectsResponse, error)+ SearchVCSProviderRepositories(ctx context.Context, in *SearchVCSProviderRepositoriesRequest, opts ...grpc.CallOption) (*SearchVCSProviderRepositoriesResponse, error)ListVCSConnectorsInProvider(ctx context.Context, in *ListVCSConnectorsInProviderRequest, opts ...grpc.CallOption) (*ListVCSConnectorsInProviderResponse, error)}@@ -95,9 +95,9 @@ func (c *vCSProviderServiceClient) DeleteVCSProvider(ctx context.Context, in *Dereturn out, nil}-func (c *vCSProviderServiceClient) SearchVCSProviderProjects(ctx context.Context, in *SearchVCSProviderProjectsRequest, opts ...grpc.CallOption) (*SearchVCSProviderProjectsResponse, error) {- out := new(SearchVCSProviderProjectsResponse)- err := c.cc.Invoke(ctx, VCSProviderService_SearchVCSProviderProjects_FullMethodName, in, out, opts...)+func (c *vCSProviderServiceClient) SearchVCSProviderRepositories(ctx context.Context, in *SearchVCSProviderRepositoriesRequest, opts ...grpc.CallOption) (*SearchVCSProviderRepositoriesResponse, error) {+ out := new(SearchVCSProviderRepositoriesResponse)+ err := c.cc.Invoke(ctx, VCSProviderService_SearchVCSProviderRepositories_FullMethodName, in, out, opts...)if err != nil {return nil, err}@@ -122,7 +122,7 @@ type VCSProviderServiceServer interface {CreateVCSProvider(context.Context, *CreateVCSProviderRequest) (*VCSProvider, error)UpdateVCSProvider(context.Context, *UpdateVCSProviderRequest) (*VCSProvider, error)DeleteVCSProvider(context.Context, *DeleteVCSProviderRequest) (*emptypb.Empty, error)- SearchVCSProviderProjects(context.Context, *SearchVCSProviderProjectsRequest) (*SearchVCSProviderProjectsResponse, error)+ SearchVCSProviderRepositories(context.Context, *SearchVCSProviderRepositoriesRequest) (*SearchVCSProviderRepositoriesResponse, error)ListVCSConnectorsInProvider(context.Context, *ListVCSConnectorsInProviderRequest) (*ListVCSConnectorsInProviderResponse, error)mustEmbedUnimplementedVCSProviderServiceServer()}@@ -146,8 +146,8 @@ func (UnimplementedVCSProviderServiceServer) UpdateVCSProvider(context.Context,func (UnimplementedVCSProviderServiceServer) DeleteVCSProvider(context.Context, *DeleteVCSProviderRequest) (*emptypb.Empty, error) {return nil, status.Errorf(codes.Unimplemented, "method DeleteVCSProvider not implemented")}-func (UnimplementedVCSProviderServiceServer) SearchVCSProviderProjects(context.Context, *SearchVCSProviderProjectsRequest) (*SearchVCSProviderProjectsResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method SearchVCSProviderProjects not implemented")+func (UnimplementedVCSProviderServiceServer) SearchVCSProviderRepositories(context.Context, *SearchVCSProviderRepositoriesRequest) (*SearchVCSProviderRepositoriesResponse, error) {+ return nil, status.Errorf(codes.Unimplemented, "method SearchVCSProviderRepositories not implemented")}func (UnimplementedVCSProviderServiceServer) ListVCSConnectorsInProvider(context.Context, *ListVCSConnectorsInProviderRequest) (*ListVCSConnectorsInProviderResponse, error) {return nil, status.Errorf(codes.Unimplemented, "method ListVCSConnectorsInProvider not implemented")@@ -255,20 +255,20 @@ func _VCSProviderService_DeleteVCSProvider_Handler(srv interface{}, ctx context.return interceptor(ctx, in, info, handler)}-func _VCSProviderService_SearchVCSProviderProjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(SearchVCSProviderProjectsRequest)+func _VCSProviderService_SearchVCSProviderRepositories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(SearchVCSProviderRepositoriesRequest)if err := dec(in); err != nil {return nil, err}if interceptor == nil {- return srv.(VCSProviderServiceServer).SearchVCSProviderProjects(ctx, in)+ return srv.(VCSProviderServiceServer).SearchVCSProviderRepositories(ctx, in)}info := &grpc.UnaryServerInfo{Server: srv,- FullMethod: VCSProviderService_SearchVCSProviderProjects_FullMethodName,+ FullMethod: VCSProviderService_SearchVCSProviderRepositories_FullMethodName,}handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(VCSProviderServiceServer).SearchVCSProviderProjects(ctx, req.(*SearchVCSProviderProjectsRequest))+ return srv.(VCSProviderServiceServer).SearchVCSProviderRepositories(ctx, req.(*SearchVCSProviderRepositoriesRequest))}return interceptor(ctx, in, info, handler)}@@ -319,8 +319,8 @@ var VCSProviderService_ServiceDesc = grpc.ServiceDesc{Handler: _VCSProviderService_DeleteVCSProvider_Handler,},{- MethodName: "SearchVCSProviderProjects",- Handler: _VCSProviderService_SearchVCSProviderProjects_Handler,+ MethodName: "SearchVCSProviderRepositories",+ Handler: _VCSProviderService_SearchVCSProviderRepositories_Handler,},{MethodName: "ListVCSConnectorsInProvider",diff --git a/proto/v1/vcs_provider_service.proto b/proto/v1/vcs_provider_service.protoindex 8d481c8533..29f9e8c3eb 100644--- a/proto/v1/vcs_provider_service.proto+++ b/proto/v1/vcs_provider_service.proto@@ -42,9 +42,9 @@ service VCSProviderService {option (google.api.http) = {delete: "/v1/{name=vcsProviders/*}"};}- rpc SearchVCSProviderProjects(SearchVCSProviderProjectsRequest) returns (SearchVCSProviderProjectsResponse) {+ rpc SearchVCSProviderRepositories(SearchVCSProviderRepositoriesRequest) returns (SearchVCSProviderRepositoriesResponse) {option (google.api.http) = {- post: "/v1/{name=vcsProviders/*}:searchProjects"+ post: "/v1/{name=vcsProviders/*}:searchRepositories"body: "*"};}@@ -104,25 +104,30 @@ message DeleteVCSProviderRequest {string name = 1 [(google.api.field_behavior) = REQUIRED];}-message SearchVCSProviderProjectsRequest {+message SearchVCSProviderRepositoriesRequest {// The name of the vcs provider to retrieve the vcs provider repositories.// Format: vcsProviders/{vcsProvider}string name = 1 [(google.api.field_behavior) = REQUIRED];}-message SearchVCSProviderProjectsResponse {- message Project {- // The id of the project in vcs provider.- string id = 1;- // The title of the project in vcs provider.- string title = 2;- // The fullpath of the project in vcs provider.- string fullpath = 3;- // Web url of the project in vcs provider.- string web_url = 4;- }- // The list of project in vcs provider.- repeated Project projects = 1;+message VCSRepository {+ // The id of the repository in vcs provider.+ // e.g. In GitLab, this is the corresponding project id. e.g. 123+ string id = 1;+ // The title of the repository in vcs provider.+ // e.g. sample-project+ string title = 2;+ // The full_path of the repository in vcs provider.+ // e.g. bytebase/sample-project+ string full_path = 3;+ // Web url of the repository in vcs provider.+ // e.g. http://gitlab.bytebase.com/bytebase/sample-project+ string web_url = 4;+}++message SearchVCSProviderRepositoriesResponse {+ // The list of repositories in vcs provider.+ repeated VCSRepository repositories = 1;}message ListVCSConnectorsInProviderRequest {