Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfung committed Dec 18, 2024
1 parent d9a4868 commit 7c9fa1c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ee/tabby-ui/lib/utils/repository.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { go } from 'fuzzysort'

export const findClosestRepositoryMatch = (
target: string,
gitUrls: string[]
) => {
const results = go(target.replace(/\.git$/, ''), gitUrls)
return results.length > 0 ? results[0].target : null
}

0 comments on commit 7c9fa1c

Please sign in to comment.