From 2ae422a8b2e61a50105a367f41adec97ee555a6c Mon Sep 17 00:00:00 2001 From: Alexey Skriptsov Date: Thu, 5 Oct 2023 11:51:43 +0100 Subject: [PATCH 1/2] fix typo ListMergeRequesDiffs -> ListMergeRequestDiffs --- merge_requests_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/merge_requests_test.go b/merge_requests_test.go index 28ddf5c0f..b7301ca16 100644 --- a/merge_requests_test.go +++ b/merge_requests_test.go @@ -288,7 +288,7 @@ func TestGetIssuesClosedOnMerge_Jira(t *testing.T) { assert.Equal(t, "Title of this issue", issues[0].Title) } -func TestListMergeRequesDiffs(t *testing.T) { +func TestListMergeRequestDiffs(t *testing.T) { mux, client := setup(t) mux.HandleFunc("/api/v4/projects/1/merge_requests/1/diffs", func(w http.ResponseWriter, r *http.Request) { @@ -303,7 +303,7 @@ func TestListMergeRequesDiffs(t *testing.T) { diffs, _, err := client.MergeRequests.ListMergeRequestDiffs(1, 1, opts) if err != nil { - t.Errorf("MergeRequests.ListMergeRequesDiffs returned error: %v", err) + t.Errorf("MergeRequests.ListMergeRequestDiffs returned error: %v", err) } want := []*MergeRequestDiff{ @@ -330,7 +330,7 @@ func TestListMergeRequesDiffs(t *testing.T) { } if !reflect.DeepEqual(want, diffs) { - t.Errorf("MergeRequests.ListMergeRequesDiffs returned %+v, want %+v", diffs, want) + t.Errorf("MergeRequests.ListMergeRequestDiffs returned %+v, want %+v", diffs, want) } } From 822d1b5bc0194e1ddeb20750f266bd9ba889dde9 Mon Sep 17 00:00:00 2001 From: Alexey Skriptsov Date: Thu, 5 Oct 2023 11:53:14 +0100 Subject: [PATCH 2/2] Update merge_requests.go --- merge_requests.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/merge_requests.go b/merge_requests.go index 1531dfdfc..f5b68fdfa 100644 --- a/merge_requests.go +++ b/merge_requests.go @@ -468,7 +468,7 @@ type GetMergeRequestChangesOptions struct { // its files and changes. // // Deprecated: This endpoint has been replaced by -// MergeRequestsService.ListMergeRequesDiffs() +// MergeRequestsService.ListMergeRequestDiffs() // // GitLab API docs: // https://docs.gitlab.com/ee/api/merge_requests.html#get-single-merge-request-changes @@ -493,7 +493,7 @@ func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequ return m, resp, nil } -// ListMergeRequestDiffsOptions represents the available ListMergeRequesDiffs() +// ListMergeRequestDiffsOptions represents the available ListMergeRequestDiffs() // options. // // GitLab API docs: