fix(github): return empty without repo in getRepoOwnerAndRepo helper

This commit is contained in:
Ali BARIN
2022-10-19 20:32:42 +02:00
parent 91ec19c7df
commit 486e817a40

View File

@@ -1,9 +1,11 @@
type TRepoOwnerAndRepo = {
repoOwner: string;
repo: string;
repoOwner?: string;
repo?: string;
}
export default function getRepoOwnerAndRepo(repoFullName: string): TRepoOwnerAndRepo {
if (!repoFullName) return {};
const [repoOwner, repo] = repoFullName.split('/');
return {