Repository navigation
feat: add team member removal and a project filter for the member list - #44
Merged
Merged
Conversation
Add Team.Members.Remove to remove a non-Owner member from the team. The member list (Team.Members.List and Iterate) takes FilterProjectID to return only the members who can access a project. The coverage test is strict again: every operation needs a method. Co-Authored-By: Claude <noreply@anthropic.com>
bjornftw
approved these changes
Oct 21, 2026
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.
What changed
Non-breaking. Stacked on the team role management PR.
Team.Members.Remove(ctx, userID, ...RequestOption) (*MessageResponse, error)sendsDELETE /team/members/{userId}and removes a member from the team. It needs a team token. The Owner can't be removed; the 409 is a*ConflictErrorwith the code (for exampleowner_protected). An empty user ID is rejected before a request.Team.Members.ListandTeam.Members.Iteratealready take*ListTeamMembersQuery, which now hasFilterProjectID(filter[project_id]). It returns only the members who can access that project: members with access to all projects and members selected for it. An unknown project returns an empty list.Iteratekeeps the filter on every page. This PR adds the tests and docs; no code change was needed.TestEveryOperationHasAMethodis strict again: every one of the 71 operations needs a method.Removein the Team API table, and the project filter with an example.Usage
Checks
Run on this branch (the top of the stack) with
GOFLAGS=-buildvcs=false(worktree):test -z "$(gofmt -l .)": passesgo vet ./...: passessh scripts/generate.sh --check: passes (generated files up to date; the header check that CI runs also passes)go test -race -coverprofile=coverage.out ./...: passes (coverage 94.4%)go build ./...: passesgo mod tidy && git diff --exit-code go.mod: no changesgo vet,go test -raceandgo buildwith Go 1.24.13, 1.26.4 and 1.27.1: passgorelease -base=v3.1.0: the changes of this stack are all compatible; the one incompatible change it reports (SendBatchMailRequest) is already onmain(see the first PR). Against currentmain(gorelease -base=github.com/lettermint/lettermint-go/v3@8982ddb): only compatible changes.Not run locally
🤖 Generated with Claude Code