ignore PRs in runIssuesList() (#111)

Merge branch 'master' into 108-issues

Merge branch 'master' into 108-issues

ignore pullrequests

Update SDK v0.11.0 -> 0.11.2

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/111
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
6543
2020-04-01 08:35:42 +00:00
committed by Lunny Xiao
parent 7a10ea10df
commit 08a00add6d
9 changed files with 27 additions and 9 deletions

View File

@ -48,10 +48,23 @@ type ListIssueOption struct {
Page int
// open, closed, all
State string
Type IssueType
Labels []string
KeyWord string
}
// IssueType is issue a pull or only an issue
type IssueType string
const (
// IssueTypeAll pr and issue
IssueTypeAll IssueType = ""
// IssueTypeIssue only issues
IssueTypeIssue IssueType = "issues"
// IssueTypePull only pulls
IssueTypePull IssueType = "pulls"
)
// QueryEncode turns options into querystring argument
func (opt *ListIssueOption) QueryEncode() string {
query := make(url.Values)
@ -81,6 +94,7 @@ func (opt *ListIssueOption) QueryEncode() string {
if len(opt.KeyWord) > 0 {
query.Add("q", opt.KeyWord)
}
query.Add("type", string(opt.Type))
return query.Encode()
}