chore: update the 'Update plugin from GitHub'

This commit is contained in:
Yi
2024-11-06 16:49:16 +08:00
parent 0d08b6cf51
commit 4c0e4e490a
8 changed files with 54 additions and 25 deletions

View File

@ -51,3 +51,7 @@ export const parseGitHubUrl = (url: string): GitHubUrlInfo => {
const match = url.match(/^https:\/\/github\.com\/([^\/]+)\/([^\/]+)\/?$/)
return match ? { isValid: true, owner: match[1], repo: match[2] } : { isValid: false }
}
export const convertRepoToUrl = (repo: string) => {
return repo ? `https://github.com/${repo}` : ''
}