Repository navigation
feat: implement issue listing functionality and related tests - #9
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds issue listing to the GitLab provider, so Paca's
issue_listtool (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). Implementsgp.IssueListeragainstGET /projects/:id/issues:statemapsopen→opened;closedandallpass through; an empty state means open; anything else is a validation error;scope=all, newest first (order_by=created_at&sort=desc);pagedandnextPagehelpers, so the cursor follows the raw page size (GitLab's issues endpoint returns issues only, so a page needs no filtering).glIssuetype withtoIssue()replaces the anonymous struct and state mapping thatGetIssuecarried, soGetIssueandListIssuesreturn identical shapes.Describe()now declaresIssueList: trueandspi_assert.goassertsgp.IssueLister. The SDK conformance suite requires the interface and the capability to be declared together; both are, alongside the existingIdentityDescription.Compatibility
plugin-sdk-gov0.4.2), and no manifest, data or migration change.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;IssueListis declared.go vet,go test ./...andGOOS=wasip1 GOARCH=wasm go vet .pass.