Skip to content

Commit

Permalink
Rename "detect-changes" to "watch-changes"
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexodia authored and salemhilal committed Jun 17, 2023
1 parent cb06690 commit 4a556be
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions config-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title" : "Hound",
"health-check-uri" : "/healthz",
"vcs-config" : {
"git": {
"git" : {
"detect-ref" : true
}
},
Expand All @@ -14,10 +14,10 @@
},
"AnotherGitRepo" : {
"url" : "https://www.github.com/YourOrganization/RepoOne.git",
"ms-between-poll": 10000,
"exclude-dot-files": true,
"display-name": "RepoOne (dot files not indexed)",
"auto-generated-files": ["example/path"]
"ms-between-poll" : 10000,
"exclude-dot-files" : true,
"display-name" : "RepoOne (dot files not indexed)",
"auto-generated-files" : ["example/path"]
},
"GitRepoWithDetectRefDisabled" : {
"url" : "https://www.github.com/YourOrganization/RepoOne.git",
Expand Down Expand Up @@ -90,16 +90,16 @@
"vcs-config" : {
"ref" : "main"
}
},
"LocalRepo": {
"url": "file:///absolute/path/to/directory",
"vcs": "local",
},
"LocalRepo" : {
"url" : "file:///absolute/path/to/directory",
"vcs" : "local",
"url-pattern" : {
"base-url" : "{url}/{path}"
},
"vcs-config": {
"detect-changes": false,
"ignored-files": []
"vcs-config" : {
"watch-changes" : false,
"ignored-files" : []
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions vcs/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ func init() {
}

type LocalDriver struct {
DetectChanges bool `json:"detect-changes"`
IgnoredFiles []string `json:"ignored-files"`
WatchChanges bool `json:"watch-changes"`
IgnoredFiles []string `json:"ignored-files"`
}

func newLocal(b []byte) (Driver, error) {
Expand Down Expand Up @@ -60,7 +60,7 @@ func myHash(files []string, open func(string) (io.ReadCloser, error)) (string, e
}

func (g *LocalDriver) HeadRev(dir string) (string, error) {
if !g.DetectChanges {
if !g.WatchChanges {
idx := strings.LastIndex(dir, "vcs-")
if idx == -1 {
return "", fmt.Errorf("could not find 'vcs-' in path: %s", dir)
Expand Down

0 comments on commit 4a556be

Please sign in to comment.