Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Fixes #1811
Browse files Browse the repository at this point in the history
  • Loading branch information
svanharmelen committed Oct 3, 2023
1 parent 2692fa8 commit 8cb9c32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions merge_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions merge_requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"}

Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 8cb9c32

Please sign in to comment.