diff options
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/commits.go')
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/commits.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/commits.go b/vendor/github.com/xanzy/go-gitlab/commits.go index cb03c3a0..27dd5645 100644 --- a/vendor/github.com/xanzy/go-gitlab/commits.go +++ b/vendor/github.com/xanzy/go-gitlab/commits.go @@ -176,6 +176,9 @@ func (s *CommitsService) GetCommit(pid interface{}, sha string, options ...Optio if err != nil { return nil, nil, err } + if sha == "" { + return nil, nil, fmt.Errorf("SHA must be a non-empty string") + } u := fmt.Sprintf("projects/%s/repository/commits/%s", pathEscape(project), url.PathEscape(sha)) req, err := s.client.NewRequest("GET", u, nil, options) @@ -199,9 +202,13 @@ type CreateCommitOptions struct { Branch *string `url:"branch" json:"branch"` CommitMessage *string `url:"commit_message" json:"commit_message"` StartBranch *string `url:"start_branch,omitempty" json:"start_branch,omitempty"` + StartSHA *string `url:"start_sha,omitempty" json:"start_sha,omitempty"` + StartProject *string `url:"start_project,omitempty" json:"start_project,omitempty"` Actions []*CommitAction `url:"actions" json:"actions"` AuthorEmail *string `url:"author_email,omitempty" json:"author_email,omitempty"` AuthorName *string `url:"author_name,omitempty" json:"author_name,omitempty"` + Stats *bool `url:"stats,omitempty" json:"stats,omitempty"` + Force *bool `url:"force,omitempty" json:"force,omitempty"` } // CreateCommit creates a commit with multiple files and actions. |