mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 17:01:13 +00:00
Update to ADO 5ed9b2130da7f822153531489d802c28986f5d30
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import * as DataModels from "../Contracts/DataModels";
|
||||
import { config } from "../Config";
|
||||
import { RepoListItem } from "../Explorer/Controls/GitHub/GitHubReposComponent";
|
||||
import { IPinnedRepo } from "../Juno/JunoClient";
|
||||
import { IGitHubRepo } from "../GitHub/GitHubClient";
|
||||
|
||||
export class JunoUtils {
|
||||
public static async getLikedNotebooks(authorizationToken: string): Promise<DataModels.LikedNotebooksJunoResponse> {
|
||||
@@ -41,4 +44,23 @@ export class JunoUtils {
|
||||
return undefined;
|
||||
//TODO: add notebookMetadata updation code
|
||||
}
|
||||
|
||||
public static toPinnedRepo(item: RepoListItem): IPinnedRepo {
|
||||
return {
|
||||
owner: item.repo.owner.login,
|
||||
name: item.repo.name,
|
||||
private: item.repo.private,
|
||||
branches: item.branches.map(element => ({ name: element.name }))
|
||||
};
|
||||
}
|
||||
|
||||
public static toGitHubRepo(pinnedRepo: IPinnedRepo): IGitHubRepo {
|
||||
return {
|
||||
owner: {
|
||||
login: pinnedRepo.owner
|
||||
},
|
||||
name: pinnedRepo.name,
|
||||
private: pinnedRepo.private
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user