diff --git a/scm/driver/harness/git.go b/scm/driver/harness/git.go index c5ca6eab..bde9965e 100644 --- a/scm/driver/harness/git.go +++ b/scm/driver/harness/git.go @@ -80,7 +80,7 @@ func (s *gitService) ListChanges(ctx context.Context, repo, ref string, _ scm.Li func (s *gitService) CompareChanges(ctx context.Context, repo, source, target string, _ scm.ListOptions) ([]*scm.Change, *scm.Response, error) { harnessURI := buildHarnessURI(s.client.account, s.client.organization, s.client.project, repo) - path := fmt.Sprintf("api/v1/repos/%s/compare/%s...%s", harnessURI, source, target) + path := fmt.Sprintf("api/v1/repos/%s/diff/%s...%s", harnessURI, source, target) buf := new(strings.Builder) res, err := s.client.do(ctx, "GET", path, nil, buf) return convertCompareChanges(buf.String()), res, err diff --git a/scm/driver/harness/git_test.go b/scm/driver/harness/git_test.go index 8b5a5cd9..79dae39e 100644 --- a/scm/driver/harness/git_test.go +++ b/scm/driver/harness/git_test.go @@ -215,7 +215,7 @@ func TestCompareChanges(t *testing.T) { defer gock.Off() gock.New(gockOrigin). - Get(fmt.Sprintf("/gateway/code/api/v1/repos/px7xd_BFRCi-pfWPYXVjvw/default/codeciintegration/thomas/+/compare/%s...%s", source, target)). + Get(fmt.Sprintf("/gateway/code/api/v1/repos/px7xd_BFRCi-pfWPYXVjvw/default/codeciintegration/thomas/+/diff/%s...%s", source, target)). Reply(200). Type("application/json"). File("testdata/gitdiff.json")