Skip to content

feat: implement issue listing functionality and related tests - #9

Merged
pikann merged 1 commit into
masterfrom
feature/implement-issue-listing-functionality
Nov 3, 2026
Merged

pikann merged 1 commit into
masterfrom
feature/implement-issue-listing-functionality

Conversation

@pikann

@pikann pikann commented Nov 3, 2026 •

Copy link
Copy Markdown

Summary

Adds issue listing to the GitLab provider, so Paca's issue_list tool (and any other caller of the optional issue-list capability) works for GitLab projects the same way it does for GitHub. Before this, the provider could read one issue by number but could not list them.

Changes

  • ListIssues (spi_reads.go). Implements gp.IssueLister against GET /projects/:id/issues:
    • state maps open → opened; closed and all pass through; an empty state means open; anything else is a validation error;
    • scope=all, newest first (order_by=created_at&sort=desc);
    • paginated with the existing paged and nextPage helpers, so the cursor follows the raw page size (GitLab's issues endpoint returns issues only, so a page needs no filtering).
  • Shared issue mapping. A glIssue type with toIssue() replaces the anonymous struct and state mapping that GetIssue carried, so GetIssue and ListIssues return identical shapes.
  • Capability. Describe() now declares IssueList: true and spi_assert.go asserts gp.IssueLister. The SDK conformance suite requires the interface and the capability to be declared together; both are, alongside the existing IdentityDescription.

Compatibility

  • Needs no SDK bump (already on plugin-sdk-go v0.4.2), and no manifest, data or migration change.
  • A host that does not know the capability ignores it. One that does can now list GitLab issues.

Tests

  • spi_fakegitlab_test.go: the fake GitLab serves an issue list.
  • spi_issues_test.go (new): paging and the open/closed/all state mapping; an invalid state or cursor is a validation error and an upstream 403 is propagated; IssueList is declared.
  • go vet, go test ./... and GOOS=wasip1 GOARCH=wasm go vet . pass.

@pikann
pikann merged commit f69dcee into master Nov 3, 2026
3 checks passed
@pikann
pikann deleted the feature/implement-issue-listing-functionality branch November 3, 2026 15:31
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