aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google/go-github/github/repos_commits.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/google/go-github/github/repos_commits.go')
-rw-r--r--vendor/github.com/google/go-github/github/repos_commits.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/vendor/github.com/google/go-github/github/repos_commits.go b/vendor/github.com/google/go-github/github/repos_commits.go
index bc0fbf9..110e7b2 100644
--- a/vendor/github.com/google/go-github/github/repos_commits.go
+++ b/vendor/github.com/google/go-github/github/repos_commits.go
@@ -107,7 +107,7 @@ type CommitsListOptions struct {
// ListCommits lists the commits of a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/commits/#list
+// GitHub API docs: https://developer.github.com/v3/repos/commits/#list
func (s *RepositoriesService) ListCommits(owner, repo string, opt *CommitsListOptions) ([]*RepositoryCommit, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/commits", owner, repo)
u, err := addOptions(u, opt)
@@ -132,8 +132,8 @@ func (s *RepositoriesService) ListCommits(owner, repo string, opt *CommitsListOp
// GetCommit fetches the specified commit, including all details about it.
// todo: support media formats - https://github.com/google/go-github/issues/6
//
-// GitHub API docs: http://developer.github.com/v3/repos/commits/#get-a-single-commit
-// See also: http://developer.github.com//v3/git/commits/#get-a-single-commit provides the same functionality
+// GitHub API docs: https://developer.github.com/v3/repos/commits/#get-a-single-commit
+// See also: https://developer.github.com//v3/git/commits/#get-a-single-commit provides the same functionality
func (s *RepositoriesService) GetCommit(owner, repo, sha string) (*RepositoryCommit, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/commits/%v", owner, repo, sha)
@@ -151,10 +151,10 @@ func (s *RepositoriesService) GetCommit(owner, repo, sha string) (*RepositoryCom
return nil, resp, err
}
- return commit, resp, err
+ return commit, resp, nil
}
-// GetCommitSHA1 gets the SHA-1 of a commit reference. If a last-known SHA1 is
+// GetCommitSHA1 gets the SHA-1 of a commit reference. If a last-known SHA1 is
// supplied and no new commits have occurred, a 304 Unmodified response is returned.
//
// GitHub API docs: https://developer.github.com/v3/repos/commits/#get-the-sha-1-of-a-commit-reference
@@ -177,13 +177,13 @@ func (s *RepositoriesService) GetCommitSHA1(owner, repo, ref, lastSHA string) (s
return "", resp, err
}
- return buf.String(), resp, err
+ return buf.String(), resp, nil
}
// CompareCommits compares a range of commits with each other.
// todo: support media formats - https://github.com/google/go-github/issues/6
//
-// GitHub API docs: http://developer.github.com/v3/repos/commits/index.html#compare-two-commits
+// GitHub API docs: https://developer.github.com/v3/repos/commits/index.html#compare-two-commits
func (s *RepositoriesService) CompareCommits(owner, repo string, base, head string) (*CommitsComparison, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/compare/%v...%v", owner, repo, base, head)
@@ -198,5 +198,5 @@ func (s *RepositoriesService) CompareCommits(owner, repo string, base, head stri
return nil, resp, err
}
- return comp, resp, err
+ return comp, resp, nil
}