Skip to content

Commit 3a3e65a

Browse files
committed
add branch to config engine
1 parent 5bbcbe9 commit 3a3e65a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

service/reconfigure.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ func (app *App) watchTargets() (err error) {
108108
for i, t := range app.targets {
109109
zap.L().Debug("assigned target", zap.String("url", t.RepoURL))
110110
targetRepos[i] = gitwatch.Repository{
111-
URL: t.RepoURL,
112-
// Branch: t.Branch, // TODO: branches
111+
URL: t.RepoURL,
112+
Branch: t.Branch,
113113
Directory: t.Name,
114114
}
115115
}

service/task/target.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ type Target struct {
2121
// The repository URL to watch for changes, either http or ssh.
2222
RepoURL string `required:"true" json:"url"`
2323

24+
// The git branch to use
25+
Branch string `json:"branch"`
26+
2427
// The command to run on each new Git commit
2528
Up []string `required:"true" json:"up"`
2629

0 commit comments

Comments
 (0)