mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:51:57 +00:00
Add WorkspacesExecutionInput to lib/batches (#24720)
`WorkspacesExecutionInput` is the struct that will be serialized on the Sourcegraph side and de-serialized in src-cli when we run single workspaces. Not 100% sure yet the names will stay like this forever or whether we run into a collision but I think they're good for now. Co-authored-by: Erik Seliger <erikseliger@me.com>
This commit is contained in:
parent
d5920f2696
commit
2bfda92388
30
lib/batches/workspaces_execution_input.go
Normal file
30
lib/batches/workspaces_execution_input.go
Normal file
@ -0,0 +1,30 @@
|
||||
package batches
|
||||
|
||||
type WorkspacesExecutionInput struct {
|
||||
RawSpec string `json:"rawSpec"`
|
||||
Workspaces []*Workspace `json:"workspaces"`
|
||||
}
|
||||
|
||||
type Workspace struct {
|
||||
Repository WorkspaceRepo `json:"repository"`
|
||||
Branch WorkspaceBranch `json:"branch"`
|
||||
Path string `json:"path"`
|
||||
OnlyFetchWorkspace bool `json:"onlyFetchWorkspace"`
|
||||
Steps []Step `json:"steps"`
|
||||
SearchResultPaths []string `json:"searchResultPaths"`
|
||||
}
|
||||
|
||||
type WorkspaceRepo struct {
|
||||
// ID is the GraphQL ID of the repository.
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type WorkspaceBranch struct {
|
||||
Name string `json:"name"`
|
||||
Target Commit `json:"target"`
|
||||
}
|
||||
|
||||
type Commit struct {
|
||||
OID string `json:"oid"`
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user