Skip to content

Commit 12de4dd

Browse files
committed
use the target name as the directory
1 parent 287d025 commit 12de4dd

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

service/handler.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,9 @@ func (app App) getTarget(url string) (target task.Target, exists bool) {
5151
func (app App) executeTargets(targets []task.Target, shutdown bool) {
5252
zap.L().Debug("executing all targets", zap.Bool("shutdown", shutdown))
5353
for _, t := range targets {
54-
p, err := gitwatch.GetRepoDirectory(t.RepoURL)
55-
if err != nil {
56-
zap.L().Error("failed to get target repo path",
57-
zap.Error(errors.Cause(err)))
58-
continue
59-
}
60-
61-
err = app.executeWithSecrets(
54+
err := app.executeWithSecrets(
6255
t,
63-
filepath.Join(app.config.Directory, p),
56+
filepath.Join(app.config.Directory, t.Name),
6457
shutdown,
6558
)
6659
if err != nil {

0 commit comments

Comments
 (0)