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

Fix ListMergeRequesDiffs typo, ListMergeRequesDiffs->ListMergeRequestDiffs #1817

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions merge_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions merge_requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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{
Expand All @@ -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)
}
}

Expand Down
Loading