Migrate gitea-sdk to v0.12.0 (#133)

Migrate

Update code.gitea.io/sdk/gitea to v0.12.0.

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/133
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
6543
2020-05-27 13:48:09 +00:00
committed by Lunny Xiao
parent 3c312cb409
commit 59fe58577a
50 changed files with 1625 additions and 308 deletions

View File

@ -87,8 +87,7 @@ func runIssuesList(ctx *cli.Context) error {
}
issues, err := login.Client().ListRepoIssues(owner, repo, gitea.ListIssueOption{
Page: 0,
State: string(state),
State: state,
Type: gitea.IssueTypeIssue,
})
@ -182,7 +181,7 @@ var CmdIssuesReopen = cli.Command{
Description: `Change state of an issue to 'open'`,
ArgsUsage: "<issue index>",
Action: func(ctx *cli.Context) error {
var s = string(gitea.StateOpen)
var s = gitea.StateOpen
return editIssueState(ctx, gitea.EditIssueOption{State: &s})
},
Flags: AllDefaultFlags,
@ -195,7 +194,7 @@ var CmdIssuesClose = cli.Command{
Description: `Change state of an issue to 'closed'`,
ArgsUsage: "<issue index>",
Action: func(ctx *cli.Context) error {
var s = string(gitea.StateClosed)
var s = gitea.StateClosed
return editIssueState(ctx, gitea.EditIssueOption{State: &s})
},
Flags: AllDefaultFlags,