Fix Lint errors in JunoUtil (#484)

This commit is contained in:
hardiknai-techm
2021-03-09 04:40:24 +05:30
committed by GitHub
parent 9d30dd5d0a
commit 1af44fb207
4 changed files with 17 additions and 20 deletions

View File

@@ -2,21 +2,19 @@ import { RepoListItem } from "../Explorer/Controls/GitHub/GitHubReposComponent";
import { IGitHubRepo } from "../GitHub/GitHubClient";
import { IPinnedRepo } from "../Juno/JunoClient";
export class JunoUtils {
public static toPinnedRepo(item: RepoListItem): IPinnedRepo {
return {
owner: item.repo.owner,
name: item.repo.name,
private: item.repo.private,
branches: item.branches.map((element) => ({ name: element.name })),
};
}
public static toGitHubRepo(pinnedRepo: IPinnedRepo): IGitHubRepo {
return {
owner: pinnedRepo.owner,
name: pinnedRepo.name,
private: pinnedRepo.private,
};
}
export function toPinnedRepo(item: RepoListItem): IPinnedRepo {
return {
owner: item.repo.owner,
name: item.repo.name,
private: item.repo.private,
branches: item.branches.map((element) => ({ name: element.name })),
};
}
export function toGitHubRepo(pinnedRepo: IPinnedRepo): IGitHubRepo {
return {
owner: pinnedRepo.owner,
name: pinnedRepo.name,
private: pinnedRepo.private,
};
}