diff --git a/merge_requests.go b/merge_requests.go index 26b3ca203..1531dfdfc 100644 --- a/merge_requests.go +++ b/merge_requests.go @@ -493,18 +493,18 @@ func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequ return m, resp, nil } -// ListMergeRequesDiffsOptions represents the available ListMergeRequesDiffs() +// ListMergeRequestDiffsOptions represents the available ListMergeRequesDiffs() // options. // // GitLab API docs: // https://docs.gitlab.com/ee/api/merge_requests.html#list-merge-request-diffs -type ListMergeRequesDiffsOptions ListOptions +type ListMergeRequestDiffsOptions ListOptions -// ListMergeRequesDiffs List diffs of the files changed in a merge request +// ListMergeRequestDiffs List diffs of the files changed in a merge request // // GitLab API docs: // https://docs.gitlab.com/ee/api/merge_requests.html#list-merge-request-diffs -func (s *MergeRequestsService) ListMergeRequesDiffs(pid interface{}, mergeRequest int, opt *ListMergeRequesDiffsOptions, options ...RequestOptionFunc) ([]*MergeRequestDiff, *Response, error) { +func (s *MergeRequestsService) ListMergeRequestDiffs(pid interface{}, mergeRequest int, opt *ListMergeRequestDiffsOptions, options ...RequestOptionFunc) ([]*MergeRequestDiff, *Response, error) { project, err := parseID(pid) if err != nil { return nil, nil, err diff --git a/merge_requests_test.go b/merge_requests_test.go index f674daa3e..28ddf5c0f 100644 --- a/merge_requests_test.go +++ b/merge_requests_test.go @@ -260,7 +260,7 @@ func TestGetMergeRequestReviewers(t *testing.T) { log.Fatal(err) } - createdAt := time.Date(2022, 07, 27, 17, 3, 27, 684000000, time.UTC) + createdAt := time.Date(2022, 0o7, 27, 17, 3, 27, 684000000, time.UTC) user1 := BasicUser{ID: 1, Name: "John Doe1", Username: "user1", State: "active", AvatarURL: "http://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon", WebURL: "http://localhost/user1"} user2 := BasicUser{ID: 2, Name: "John Doe2", Username: "user2", State: "active", AvatarURL: "http://www.gravatar.com/avatar/10fc7f102be8de7657fb4d80898bbfe3?s=80&d=identicon", WebURL: "http://localhost/user2"} @@ -296,12 +296,12 @@ func TestListMergeRequesDiffs(t *testing.T) { mustWriteHTTPResponse(t, w, "testdata/list_merge_request_diff.json") }) - opts := &ListMergeRequesDiffsOptions{ + opts := &ListMergeRequestDiffsOptions{ Page: 1, PerPage: 2, } - diffs, _, err := client.MergeRequests.ListMergeRequesDiffs(1, 1, opts) + diffs, _, err := client.MergeRequests.ListMergeRequestDiffs(1, 1, opts) if err != nil { t.Errorf("MergeRequests.ListMergeRequesDiffs returned error: %v", err) }