feat(seer): Add bulk Seer project connected repos endpoint#115942
Merged
Conversation
Add utility functions for managing SeerProjectRepository records: - add_seer_project_repos (upsert with branch overrides) - replace_all_seer_project_repos (atomic replace) - update_seer_project_repo (single-repo update with row lock) - replace_all_branch_overrides helper - _validate_repo_ids for repo ID validation
- Resolve conflicts with utils branch (CW-1286-utils) - Strip bulk endpoint (GET list, POST, PUT) — will be in separate PR - Keep only single-repo details endpoint (GET, PUT, DELETE) - Move repo ID validation to endpoint layer
JoshFerge
approved these changes
May 20, 2026
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6b1b6cf. Configure here.
JonasBa
pushed a commit
that referenced
this pull request
May 21, 2026
Relates to CW-1286 CRUD helpers for `SeerProjectRepository`, to be used by the new bulk Seer project repos endpoints in #115942. - **`add_seer_project_repos(project, repos_data)`** — Upsert repos with `update_or_create`. Creates `ProjectRepository` if needed. Returns list of created/updated IDs. Used by the bulk POST endpoint. - **`replace_all_seer_project_repos(project, repos_data)`** — Atomically deletes all active Seer repos for a project and recreates from `repos_data`. Used by the bulk PUT endpoint.
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.

Fixes CW-1286
Depends on #115199 and #115904
Adds a bulk Seer project repos endpoint
ProjectSeerReposEndpoint(GET/POST/PUT) at/api/0/projects/{org}/{project}/seer/repos/withProjectPermission.GET — List connected repos
Lists all connected Seer project repos for a project. Supports search by
name(substring, case-insensitive) andprovider(exact match, supports=,!=,IN,NOT IN, with or withoutintegrations:prefix), sorting byname/-name/provider/-provider, and offset pagination. Excludes inactive repos and unsupported providers.POST — Add repos
Upserts repos by ID. Validates all repo IDs are active, belong to the org, and have supported providers — returns 400 with invalid IDs if not. Rejects empty lists, duplicate repo IDs, and duplicate branch overrides.
PUT — Replace all repos
Replaces all connected repos for the project atomically. Accepts an empty list to disconnect all repos. Same validation as POST for non-empty lists.