-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[papi] Add proto for SCMService #19075
Conversation
message SearchRepositoriesRequest { | ||
string organization_id = 1; | ||
string search_string = 2; | ||
int32 limit = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be pagination request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See, the search is delegating to 3rd party services, where at most we can limit the results by number. We need to abstract over several APIs actually, and implementing quirks with pagination seems to be absolutely unhelpful.
|
||
option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1"; | ||
|
||
service SCMService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: For all these methods we currently imply the authorizedUser. So there will be no way to call any of these methods in the context of a third user. I think. that is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also in case we later want to allow some of these methods to be called for other users, we can introduce a userId as an optional argument.
message SuggestedRepository { | ||
string url = 1; | ||
string repo_name = 2; | ||
string config_name = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: It seems incorrect that the SCMService knows anything about configurations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one branch in getSuggestedRepositories
implementation that collecting the suggested repositories from the Org.
On Dashboard, when the repository finder is rendered, it prefers the config name over the repo name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed it in a call with @selfcontained and it's quite crucial to have this information on the results, otherwise it's not possible to add the related metadata on FE and have a great UX.
3fbc084
to
0991b70
Compare
031cad6
to
bc4137f
Compare
/unhold |
Description
This PR adds just the proto definition for the SCM service to be implemented by server in follow-up PRs.
Summary generated by Copilot
🤖 Generated by Copilot at c6877d7
This pull request adds a new public API service for SCM integration. It defines the SCMService in the
scm.proto
file and generates the code for the service in Go and TypeScript using different plugins. The service allows clients to get tokens, check scopes, search repositories, and list suggested repositories from SCM providers.Related Issue(s)
Fixes #
How to test
Documentation
Preview status
gitpod:summary
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold