From a3a431edac978e20ab1887b902ee7240683f7d95 Mon Sep 17 00:00:00 2001 From: amine Date: Thu, 24 Oct 2019 20:45:02 +0200 Subject: vendors: upgrade github.com/xanzy/go-gitlab dependencies to 0.21.0 --- vendor/github.com/xanzy/go-gitlab/commits.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vendor/github.com/xanzy/go-gitlab/commits.go') 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. -- cgit