Skip to content

Commit 27b86e1

Browse files
committed
fix: anchor .git regex in repo name extraction (handleAddRepo)
Same mid-string strip bug we fixed in RepoDetailView. This instance was in the name = gitUrl.split('/').pop()?.replace('.git', '') line.
1 parent 4a1f0ee commit 27b86e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

frontend/src/components/dashboard/DashboardHome.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export function DashboardHome() {
8686
const handleAddRepo = async (gitUrl: string, branch: string) => {
8787
try {
8888
setLoading(true)
89-
const name = gitUrl.split('/').pop()?.replace('.git', '') || 'unknown'
89+
const name = gitUrl.split('/').pop()?.replace(/\.git$/, '') || 'unknown'
9090
const repoId = await addAndIndex(name, gitUrl, branch)
9191
if (repoId) {
9292
setIndexingRepoId(repoId)

0 commit comments

Comments
 (0)