forked from forgejo/forgejo
Vendor Update (#14696)
* github.com/yuin/goldmark v1.3.1 -> v1.3.2 * github.com/xanzy/go-gitlab v0.42.0 -> v0.44.0 * github.com/prometheus/client_golang v1.8.0 -> v1.9.0 * github.com/minio/minio-go v7.0.7 -> v7.0.9 * github.com/lafriks/xormstore v1.3.2 -> v1.4.0 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
dc707aea09
commit
fe628d8406
137 changed files with 3348 additions and 1312 deletions
43
vendor/github.com/xanzy/go-gitlab/commits.go
generated
vendored
43
vendor/github.com/xanzy/go-gitlab/commits.go
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Copyright 2017, Sander van Harmelen
|
||||
// Copyright 2021, Sander van Harmelen
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -18,6 +18,7 @@ package gitlab
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
@ -90,7 +91,7 @@ func (s *CommitsService) ListCommits(pid interface{}, opt *ListCommitsOptions, o
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/repository/commits", pathEscape(project))
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, opt, options)
|
||||
req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
@ -133,7 +134,7 @@ func (s *CommitsService) GetCommitRefs(pid interface{}, sha string, opt *GetComm
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/repository/commits/%s/refs", pathEscape(project), url.PathEscape(sha))
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, opt, options)
|
||||
req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
@ -161,7 +162,7 @@ func (s *CommitsService) GetCommit(pid interface{}, sha string, options ...Reque
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/repository/commits/%s", pathEscape(project), url.PathEscape(sha))
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, nil, options)
|
||||
req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
@ -196,13 +197,13 @@ type CreateCommitOptions struct {
|
|||
//
|
||||
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions
|
||||
type CommitActionOptions struct {
|
||||
Action *FileAction `url:"action,omitempty" json:"action,omitempty"`
|
||||
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
|
||||
PreviousPath *string `url:"previous_path,omitempty" json:"previous_path,omitempty"`
|
||||
Content *string `url:"content,omitempty" json:"content,omitempty"`
|
||||
Encoding *string `url:"encoding,omitempty" json:"encoding,omitempty"`
|
||||
LastCommitID *string `url:"last_commit_id,omitempty" json:"last_commit_id,omitempty"`
|
||||
ExecuteFilemode *bool `url:"execute_filemode,omitempty" json:"execute_filemode,omitempty"`
|
||||
Action *FileActionValue `url:"action,omitempty" json:"action,omitempty"`
|
||||
FilePath *string `url:"file_path,omitempty" json:"file_path,omitempty"`
|
||||
PreviousPath *string `url:"previous_path,omitempty" json:"previous_path,omitempty"`
|
||||
Content *string `url:"content,omitempty" json:"content,omitempty"`
|
||||
Encoding *string `url:"encoding,omitempty" json:"encoding,omitempty"`
|
||||
LastCommitID *string `url:"last_commit_id,omitempty" json:"last_commit_id,omitempty"`
|
||||
ExecuteFilemode *bool `url:"execute_filemode,omitempty" json:"execute_filemode,omitempty"`
|
||||
}
|
||||
|
||||
// CreateCommit creates a commit with multiple files and actions.
|
||||
|
@ -215,7 +216,7 @@ func (s *CommitsService) CreateCommit(pid interface{}, opt *CreateCommitOptions,
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/repository/commits", pathEscape(project))
|
||||
|
||||
req, err := s.client.NewRequest("POST", u, opt, options)
|
||||
req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
@ -264,7 +265,7 @@ func (s *CommitsService) GetCommitDiff(pid interface{}, sha string, opt *GetComm
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/repository/commits/%s/diff", pathEscape(project), url.PathEscape(sha))
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, opt, options)
|
||||
req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
@ -321,7 +322,7 @@ func (s *CommitsService) GetCommitComments(pid interface{}, sha string, opt *Get
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/repository/commits/%s/comments", pathEscape(project), url.PathEscape(sha))
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, opt, options)
|
||||
req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
@ -360,7 +361,7 @@ func (s *CommitsService) PostCommitComment(pid interface{}, sha string, opt *Pos
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/repository/commits/%s/comments", pathEscape(project), url.PathEscape(sha))
|
||||
|
||||
req, err := s.client.NewRequest("POST", u, opt, options)
|
||||
req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
@ -413,7 +414,7 @@ func (s *CommitsService) GetCommitStatuses(pid interface{}, sha string, opt *Get
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/repository/commits/%s/statuses", pathEscape(project), url.PathEscape(sha))
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, opt, options)
|
||||
req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
@ -451,7 +452,7 @@ func (s *CommitsService) SetCommitStatus(pid interface{}, sha string, opt *SetCo
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/statuses/%s", pathEscape(project), url.PathEscape(sha))
|
||||
|
||||
req, err := s.client.NewRequest("POST", u, opt, options)
|
||||
req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
@ -476,7 +477,7 @@ func (s *CommitsService) GetMergeRequestsByCommit(pid interface{}, sha string, o
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/repository/commits/%s/merge_requests", pathEscape(project), url.PathEscape(sha))
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, nil, options)
|
||||
req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
@ -507,7 +508,7 @@ func (s *CommitsService) CherryPickCommit(pid interface{}, sha string, opt *Cher
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/repository/commits/%s/cherry_pick", pathEscape(project), url.PathEscape(sha))
|
||||
|
||||
req, err := s.client.NewRequest("POST", u, opt, options)
|
||||
req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
@ -538,7 +539,7 @@ func (s *CommitsService) RevertCommit(pid interface{}, sha string, opt *RevertCo
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/repository/commits/%s/revert", pathEscape(project), url.PathEscape(sha))
|
||||
|
||||
req, err := s.client.NewRequest("POST", u, opt, options)
|
||||
req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
@ -575,7 +576,7 @@ func (s *CommitsService) GetGPGSiganature(pid interface{}, sha string, options .
|
|||
}
|
||||
u := fmt.Sprintf("projects/%s/repository/commits/%s/signature", pathEscape(project), url.PathEscape(sha))
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, nil, options)
|
||||
req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue