feat: add new issue trigger in GitHub

This commit is contained in:
Ali BARIN
2022-05-07 23:04:29 +02:00
parent 54152a3564
commit 3a63fc376d
9 changed files with 230 additions and 8 deletions

View File

@@ -1,8 +1,9 @@
export function assignOwnerAndRepo<T extends { repoOwner?: string; repo?: string; }>(object: T, repoFullName: string): T {
export function assignOwnerAndRepo<T extends { repoOwner?: string; repo?: string; hasRepo?: boolean; }>(object: T, repoFullName: string): T {
if (object && repoFullName) {
const [repoOwner, repo] = repoFullName.split('/');
object.repoOwner = repoOwner;
object.repo = repo;
object.hasRepo = true;
}
return object;