Skip to content

Fix stale Todos signatures in Go SDK doc comments#290

Merged
jeremy merged 2 commits intomainfrom
pr-279-followup
Apr 28, 2026
Merged

Fix stale Todos signatures in Go SDK doc comments#290
jeremy merged 2 commits intomainfrom
pr-279-followup

Conversation

@jeremy
Copy link
Copy Markdown
Member

@jeremy jeremy commented Apr 28, 2026

Summary

Test plan

  • go build ./...
  • go test ./pkg/basecamp/... (compiles example_test.go, validating the new example's signature)
  • go vet ./...
  • gofmt -l pkg/basecamp/doc.go pkg/basecamp/example_test.go (empty output)
  • go doc github.com/basecamp/basecamp-sdk/go/pkg/basecamp — confirmed the four updated examples render with the corrected signatures

Summary by cubic

Fixes stale Todos examples in the Go SDK docs by removing the old projectID argument to match current List, Create, and Complete signatures. Adds an example showing the TodoListOptions.Completed filter from #279 to illustrate listing completed todos.

  • Bug Fixes

    • Updated four examples in go/pkg/basecamp/doc.go to the current signatures (no leading projectID).
  • New Features

    • Added ExampleTodosService_List_completed in go/pkg/basecamp/example_test.go demonstrating TodoListOptions.Completed.

Written for commit d9b0459. Summary will update on new commits. Review in cubic

jeremy added 2 commits April 28, 2026 12:34
The Todos service signatures changed in #279 (Completed promoted to a
first-class TodoListOptions field), but four examples in the package
doc comment still showed the old leading projectID argument. Update
List, Create, and Complete examples to match the current signatures.
Demonstrate the first-class Completed field on TodoListOptions
introduced in #279. Mirrors the surrounding ExampleTodosService_List
so godoc renders the pair together.
Copilot AI review requested due to automatic review settings April 28, 2026 19:35
@github-actions github-actions Bot added go documentation Improvements or additions to documentation labels Apr 28, 2026
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Go SDK documentation/examples to match the current TodosService method signatures (post-#279) and adds a new example demonstrating the TodoListOptions.Completed filter.

Changes:

  • Fix stale Todos().List, Todos().Create, and Todos().Complete doc-comment examples by removing the obsolete leading projectID argument.
  • Update the concurrency snippet in the package docs to use the corrected Todos().List signature.
  • Add ExampleTodosService_List_completed to demonstrate filtering to completed todos via TodoListOptions.Completed.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
go/pkg/basecamp/example_test.go Adds a new runnable documentation example for listing only completed todos.
go/pkg/basecamp/doc.go Updates package-level doc snippets to reflect current Todos method signatures.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jeremy jeremy merged commit 5a6dc03 into main Apr 28, 2026
50 checks passed
@jeremy jeremy deleted the pr-279-followup branch April 28, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation go

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants