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

Add Web URL to response when comparing in a repository #2055

Merged
merged 2 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions repositories.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ type Compare struct {
Diffs []*Diff `json:"diffs"`
CompareTimeout bool `json:"compare_timeout"`
CompareSameRef bool `json:"compare_same_ref"`
WebUrl string `json:"web_url"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read: https://go.dev/wiki/CodeReviewComments#initialisms In Go this field should be named WebURL

}

func (c Compare) String() string {
Expand Down
1 change: 1 addition & 0 deletions repositories_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ func TestRepositoriesService_Compare(t *testing.T) {
}},
CompareTimeout: false,
CompareSameRef: false,
WebUrl: "https://gitlab.example.com/thedude/gitlab-foss/-/compare/ae73cb07c9eeaf35924a10f713b364d32b2dd34f...0b4bc9a49b562e85de7cc9e834518ea6828729b9",
}

c, resp, err := client.Repositories.Compare("12d65c8dd2b2676fa3ac47d955accc085a37a9c1", opt, nil)
Expand Down