"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/code.gitea.io/sdk/gitea/repo_transfer.go" between
gitea-1.13.1.tar.gz and gitea-1.13.2.tar.gz

About: Gitea allows to set up a self-hosted code hosting Git service (a fork of Gogs).

repo_transfer.go  (gitea-1.13.1):repo_transfer.go  (gitea-1.13.2)
skipping to change at line 23 skipping to change at line 23
// TransferRepoOption options when transfer a repository's ownership // TransferRepoOption options when transfer a repository's ownership
type TransferRepoOption struct { type TransferRepoOption struct {
// required: true // required: true
NewOwner string `json:"new_owner"` NewOwner string `json:"new_owner"`
// ID of the team or teams to add to the repository. Teams can only be ad ded to organization-owned repositories. // ID of the team or teams to add to the repository. Teams can only be ad ded to organization-owned repositories.
TeamIDs *[]int64 `json:"team_ids"` TeamIDs *[]int64 `json:"team_ids"`
} }
// TransferRepo transfers the ownership of a repository // TransferRepo transfers the ownership of a repository
func (c *Client) TransferRepo(owner, reponame string, opt TransferRepoOption) (* Repository, *Response, error) { func (c *Client) TransferRepo(owner, reponame string, opt TransferRepoOption) (* Repository, *Response, error) {
if err := c.CheckServerVersionConstraint(">=1.12.0"); err != nil { if err := c.checkServerVersionGreaterThanOrEqual(version1_12_0); err != n il {
return nil, nil, err return nil, nil, err
} }
body, err := json.Marshal(&opt) body, err := json.Marshal(&opt)
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
repo := new(Repository) repo := new(Repository)
resp, err := c.getParsedResponse("POST", fmt.Sprintf("/repos/%s/%s/transf er", owner, reponame), jsonHeader, bytes.NewReader(body), repo) resp, err := c.getParsedResponse("POST", fmt.Sprintf("/repos/%s/%s/transf er", owner, reponame), jsonHeader, bytes.NewReader(body), repo)
return repo, resp, err return repo, resp, err
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)