Skip to content

Commit

Permalink
fix(api): run workflow from repository must keep repository fullname (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fsamin authored and sguiheux committed Jun 29, 2018
1 parent 8ce66f2 commit 9ae5c41
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion engine/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,5 @@ func newTestServer(t *testing.T, bootstrapFunc ...test.Bootstrapf) (*API, string
api.InitRouter()
ts := httptest.NewServer(router.Mux)
url, _ := url.Parse(ts.URL)
url.Path = url.Path
return api, url.String(), ts.Close
}
2 changes: 1 addition & 1 deletion engine/api/workflow/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func extractWorkflow(db *gorp.DbMap, store cache.Store, p *sdk.Project, w *sdk.W
}
opt := &PushOption{
VCSServer: ope.VCSServer,
RepositoryName: ope.RepositoryInfo.Name,
RepositoryName: ope.RepoFullName,
RepositoryStrategy: ope.RepositoryStrategy,
Branch: ope.Setup.Checkout.Branch,
FromRepository: ope.RepositoryInfo.FetchURL,
Expand Down
7 changes: 1 addition & 6 deletions engine/repositories/processor_checkout.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ func (s *Service) processCheckout(op *sdk.Operation) error {
}
}

n, err := gitRepo.Name()
if err != nil {
log.Error("Repositories> processCheckout> gitRepo.Name> [%s] Error: %v", op.UUID, err)
return err
}
f, err := gitRepo.FetchURL()
if err != nil {
log.Error("Repositories> processCheckout> gitRepo.FetchURL> [%s] Error: %v", op.UUID, err)
Expand All @@ -49,7 +44,7 @@ func (s *Service) processCheckout(op *sdk.Operation) error {
}

op.RepositoryInfo = &sdk.OperationRepositoryInfo{
Name: n,
Name: op.RepoFullName,
FetchURL: f,
DefaultBranch: d,
}
Expand Down

0 comments on commit 9ae5c41

Please sign in to comment.