File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,14 @@ All notable changes to the ld-find-code-refs program will be documented in this
77### Added
88- Added support for relative paths to CLI ` -dir ` parameter.
99- Added a new command line argument, ` debug ` , which enables verbose debug logging.
10- - ` ld-find-code-refs ` will now exit early if required dependencies are not installed on the system PATH
10+ - ` ld-find-code-refs ` will now exit early if required dependencies are not installed on the system PATH.
1111
1212### Changed
13- - Renamed ` parse ` package to ` coderefs ` . The ` Parse() ` method in the aformentioned package is now ` Scan() `
13+ - Renamed ` parse ` package to ` coderefs ` . The ` Parse() ` method in the aformentioned package is now ` Scan() ` .
14+
15+ ### Fixed
16+ - ` ld-find-code-refs ` will no longer erroneously make PATCH API requests to LaunchDarkly when url template parameters have not been configured.
17+
1418
1519## [ 0.3.0] - 2019-01-23
1620
Original file line number Diff line number Diff line change @@ -177,6 +177,18 @@ func (c ApiClient) MaybeUpsertCodeReferenceRepository(repo RepoParams) error {
177177 CommitUrlTemplate : currentRepo .CommitUrlTemplate ,
178178 HunkUrlTemplate : currentRepo .HunkUrlTemplate ,
179179 }
180+
181+ // Don't patch templates if command line arguments are not provided.
182+ // This is done because the LaunchDarkly API may return autogenerated url templates for non-custom connections.
183+ if currentRepo .Type != "custom" {
184+ if repo .CommitUrlTemplate == "" {
185+ currentRepoParams .CommitUrlTemplate = ""
186+ }
187+ if repo .HunkUrlTemplate == "" {
188+ currentRepoParams .HunkUrlTemplate = ""
189+ }
190+ }
191+
180192 if ! reflect .DeepEqual (currentRepoParams , repo ) {
181193 err = c .patchCodeReferenceRepository (currentRepoParams , repo )
182194 if err != nil {
You can’t perform that action at this time.
0 commit comments