fix(forge): empty label lists every open issue (archie #1770)
publish / publish (push) Successful in 1m21s

This commit is contained in:
sam committed 2026-11-03 08:12:06 +11:00
1 parent 6f28cf9013
commit 5864e725e4
2 files changed
+7 -2

No files matched your search

+4 -1
View File
@@ -113,12 +113,15 @@ func (c *GiteaClient) AssignedIssues(ctx context.Context, owner, repo, assignee
}
// IssuesWithLabel returns open issues matching the given label, excluding PRs.
// An empty label matches every open issue.
func (c *GiteaClient) IssuesWithLabel(ctx context.Context, owner, repo, label string) ([]forge.Issue, error) {
opts := gitea.ListIssueOption{
ListOptions: gitea.ListOptions{PageSize: 50},
State: gitea.StateOpen,
Type: gitea.IssueTypeIssue,
Labels: []string{label},
}
if label != "" {
opts.Labels = []string{label}
}
var out []forge.Issue
for {
+3 -1
View File
@@ -144,9 +144,11 @@ func (c *GitHubClient) IssuesWithLabel(ctx context.Context, owner, repo, label s
var out []forge.Issue
opts := &github.IssueListByRepoOptions{
State: "open",
Labels: []string{label},
ListOptions: github.ListOptions{PerPage: 50},
}
if label != "" {
opts.Labels = []string{label}
}
for {
issues, resp, err := c.gh.Issues.ListByRepo(ctx, owner, repo, opts)
if err != nil {