Skip to content

fix: search issues defaults to all states instead of open only (#108)#123

Merged
q-soriarty merged 1 commit intodevelopfrom
fix/108-search-issues
Apr 2, 2026
Merged

fix: search issues defaults to all states instead of open only (#108)#123
q-soriarty merged 1 commit intodevelopfrom
fix/108-search-issues

Conversation

@q-soriarty
Copy link
Copy Markdown
Contributor

Summary

Closes #108

Root cause

The Gitea API defaults to state=open when no state parameter is given. The search issues command didn't set a default, so it only searched open issues — returning empty results when matching issues were closed.

Fix

Default state to all when not explicitly specified, so search finds issues in any state (matching gh search issues behavior).

Investigation

copia-cli api "/repos/.../issues?q=test&type=issues"          → []
copia-cli api "/repos/.../issues?q=test&type=issues&state=all" → [results]

Test plan

  • TestSearchIssues_DefaultStateAll — empty state defaults to all
  • All existing tests pass

Gitea API defaults to state=open when no state is specified.
Search should find issues in any state, so default to state=all.
This was causing empty results for queries matching closed issues.
@q-soriarty q-soriarty marked this pull request as ready for review April 2, 2026 10:40
@q-soriarty q-soriarty merged commit e20e912 into develop Apr 2, 2026
4 checks passed
@q-soriarty q-soriarty deleted the fix/108-search-issues branch April 3, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant