mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-19 10:12:54 +02:00
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:
14
vendor/code.gitea.io/sdk/gitea/issue.go
generated
vendored
14
vendor/code.gitea.io/sdk/gitea/issue.go
generated
vendored
@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user