Process only merged PRs

This commit is contained in:
jaqra 2020-07-30 20:02:03 +03:00
parent f11cd26a09
commit 550ea90c82
1 changed files with 5 additions and 1 deletions

View File

@ -51,7 +51,7 @@ func (ge *Gitea) Generate() (string, []Entry, error) {
PageSize: perPage,
},
Milestones: []string{ge.Milestone},
State: "closed",
State: gitea.StateClosed,
Type: gitea.IssueTypePull,
}
if ge.Issues {
@ -64,6 +64,10 @@ func (ge *Gitea) Generate() (string, []Entry, error) {
}
for _, issue := range issues {
if options.Type == gitea.IssueTypePull && issue.PullRequest != nil && !(issue.PullRequest.HasMerged) {
continue
}
if issue != nil {
entry := convertToEntry(*issue)
entries = append(entries, entry)