mirror of
https://github.com/harness/drone.git
synced 2025-05-16 00:50:00 +08:00
feat: [CODE-847]: repo export
This commit is contained in:
parent
3b61f8aab4
commit
73b0d0248d
@ -199,7 +199,7 @@ func setupSpaces(r chi.Router, spaceCtrl *space.Controller) {
|
||||
r.Get("/secrets", handlerspace.HandleListSecrets(spaceCtrl))
|
||||
r.Get("/connectors", handlerspace.HandleListConnectors(spaceCtrl))
|
||||
r.Get("/templates", handlerspace.HandleListTemplates(spaceCtrl))
|
||||
r.Post("/export-progress", handlerspace.HandleExportProgress(spaceCtrl))
|
||||
r.Get("/export-progress", handlerspace.HandleExportProgress(spaceCtrl))
|
||||
|
||||
// Child collections
|
||||
r.Route("/paths", func(r chi.Router) {
|
||||
|
@ -25,7 +25,7 @@ type Repository struct {
|
||||
scheduler *job.Scheduler
|
||||
}
|
||||
|
||||
type RepoImportData struct {
|
||||
type RepoExportData struct {
|
||||
UID string `json:"uid"`
|
||||
Description string `json:"description"`
|
||||
IsPublic bool `json:"is_public"`
|
||||
@ -55,7 +55,7 @@ func (e *Repository) Register(executor *job.Executor) error {
|
||||
func (e *Repository) Run(ctx context.Context, jobGroupId string, harnessCodeInfo *HarnessCodeInfo, repos []*types.Repository) error {
|
||||
jobDefinitions := make([]job.Definition, len(repos))
|
||||
for i, repo := range repos {
|
||||
repoJobData := RepoImportData{
|
||||
repoJobData := RepoExportData{
|
||||
UID: repo.UID,
|
||||
Description: repo.Description,
|
||||
IsPublic: repo.IsPublic,
|
||||
|
Loading…
Reference in New Issue
Block a user