mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-23 05:09:22 +00:00
Allow gitea dev version (#914)
* update gitea sdk to latest * As before try to autodetect gitea version, if this does not work, assume it's latest version (v1.17.0 atm)
This commit is contained in:
4
vendor/code.gitea.io/sdk/gitea/repo_collaborator.go
generated
vendored
4
vendor/code.gitea.io/sdk/gitea/repo_collaborator.go
generated
vendored
@@ -66,7 +66,7 @@ const (
|
||||
)
|
||||
|
||||
// Validate the AddCollaboratorOption struct
|
||||
func (opt AddCollaboratorOption) Validate() error {
|
||||
func (opt *AddCollaboratorOption) Validate() error {
|
||||
if opt.Permission != nil {
|
||||
if *opt.Permission == AccessModeOwner {
|
||||
*opt.Permission = AccessModeAdmin
|
||||
@@ -88,7 +88,7 @@ func (c *Client) AddCollaborator(user, repo, collaborator string, opt AddCollabo
|
||||
if err := escapeValidatePathSegments(&user, &repo, &collaborator); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := opt.Validate(); err != nil {
|
||||
if err := (&opt).Validate(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
body, err := json.Marshal(&opt)
|
||||
|
Reference in New Issue
Block a user