diff --git a/pkg/cmd/repo/garden/http.go b/pkg/cmd/repo/garden/http.go index 3ca60d0bd..d968296f4 100644 --- a/pkg/cmd/repo/garden/http.go +++ b/pkg/cmd/repo/garden/http.go @@ -67,7 +67,8 @@ func getCommits(client *http.Client, repo ghrepo.Interface, maxCommits int) ([]* return commits, nil } -// getResponse performs the API call and returns the response's link header. +// getResponse performs the API call and returns the response's link header values. +// If the "Link" header is missing, the returned slice will be nil. func getResponse(client *http.Client, host, path string, data interface{}) ([]string, error) { url := ghinstance.RESTPrefix(host) + path req, err := http.NewRequest("GET", url, nil)