Skip to content

"Scan Dev Dir" silently skips every repo cloned over SSH (git@github.com: / ssh:// remotes) #441

Description

@matt-edmondson

What's wrong

GitHubRepository.IsRemotePathValid (ProjectDirector/GitHubRepository.cs:20-24) accepts only remotes that start with https://github.com/ (an ordinal comparison). For any other origin:

  1. GitRepository.Create (GitRepository.cs:84-93) returns null.
  2. The dev-dir scan loop (ProjectDirector.cs ~1176-1195) only keeps repo is GitHubRepository, so the clone is dropped and nothing is logged.

A probe against current main gave:

Remote Result
https://github.com/ktsu-dev/ProjectDirector.git accepted
git@github.com:ktsu-dev/ProjectDirector.git null, skipped
ssh://git@github.com/ktsu-dev/ProjectDirector.git null, skipped

The owner/repo parsing in the scan (~1179-1188) also splits the remote on / and reverses the pieces. From reading the code, a remote such as https://github.com/o/r/ with a trailing slash would produce an empty repo name and owner r.

Why it matters

CLAUDE.md and the comment at ProjectDirector.cs:442 both say git operations go through the platform credential helper "which is also what makes SSH remotes work". But a developer who clones over SSH points the dev dir at their clones, runs Scan > Dev Dir, and gets no repos and no owners, with no log message explaining why.

Suggested fix / acceptance criteria

  • Add one parser for GitHub remotes that handles the https://github.com/o/r(.git)(/), git@github.com:o/r(.git) and ssh://git@github.com/o/r(.git) forms, ignores case on the host, and returns (owner, repo). Use it for both IsRemotePathValid and the scan's owner/repo extraction.
  • Log any remote the scan skips, with the reason.
  • Add unit tests covering each remote form, including trailing / and .git.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    readyFully specified; implement as written

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions