1
0
mirror of https://github.com/taigrr/wtf synced 2026-03-26 10:52:20 -07:00

Revert "Update dependencies"

This commit is contained in:
Chris Cummer
2018-11-13 12:39:57 -08:00
committed by GitHub
parent 53efd9c18f
commit 705993dd65
96 changed files with 1866 additions and 2551 deletions

View File

@@ -26,11 +26,11 @@ func (s *ProjectsService) GetCommit(projectName, commitID string) (*CommitInfo,
return v, resp, err
}
// GetCommitContent gets the content of a file from a certain commit.
// GetCommitContent gets the content of a file from the HEAD revision of a certain branch.
// The content is returned as base64 encoded string.
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html##get-content-from-commit
func (s *ProjectsService) GetCommitContent(projectName, commitID, fileID string) (string, *Response, error) {
u := fmt.Sprintf("projects/%s/commits/%s/files/%s/content", url.QueryEscape(projectName), commitID, fileID)
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#get-content
func (s *ProjectsService) GetCommitContent(projectName, branchID, fileID string) (string, *Response, error) {
u := fmt.Sprintf("projects/%s/branches/%s/files/%s/content", url.QueryEscape(projectName), branchID, fileID)
return getStringResponseWithoutOptions(s.client, u)
}