mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-12-12 15:27:09 +00:00
7512b3c1d5
* Initial commit * Address PR comments * Move notebook related stuff to NotebookManager and dynamically load it * Add New gallery callout and other UI tweaks * Update test snapshot
23 lines
652 B
TypeScript
23 lines
652 B
TypeScript
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
|
|
};
|
|
}
|
|
}
|