Conversation
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 d2be5ea. Configure here.
|
|
||
| def get_repository(scm: GetRepositoryProtocol) -> ActionResult[GitRepository]: | ||
| """Get the repository associated with this SourceCodeManager.""" | ||
| return scm.get_repository() |
There was a problem hiding this comment.
get_repository missing from module __all__ export list
Low Severity
The get_repository function, newly added to actions.py, isn't included in the module's __all__ tuple. This deviates from the established pattern for exporting action functions and may affect its availability for imports or registration.
Reviewed by Cursor Bugbot for commit d2be5ea. Configure here.
| repo_size = statistics.get("repository_size", 0) if statistics else 0 | ||
| return GitRepository( | ||
| full_name=raw["path_with_namespace"], | ||
| default_branch=raw["default_branch"], |
There was a problem hiding this comment.
Is Warden right? should we update types to reflect this?
There was a problem hiding this comment.
Are you referring to this #112569 (comment) ? If yes, I marked it as resolved because I think I fixed the issue in d2be5ea above.
There was a problem hiding this comment.
Ah no, was referring to this annotation:
default_branch can be null for empty GitLab repositories
Check warning: default_branch can be null for empty GitLab repositories
Themap_repositoryfunction directly accessesraw["default_branch"]without handling the case where GitLab returnsnullfor empty repositories (repositories with no commits or branches). According to GitLab API documentation,default_branchisnulluntil the first commit creates a branch. TheGitRepositoryTypedDict expectsdefault_branch: str, so passingNoneviolates the type contract and may cause downstream TypeError when the value is used as a string.
|
Replaced by getsentry/scm-platform#2. |
This replaces getsentry/sentry#112569 and getsentry/seer#5688.


This adds
get_repositoryto the SCM platform, for GitHub and GitLab.Client side PR is https://github.com/getsentry/seer/pull/5688.