From 9d0bc86197aa0228b2b87078e4d5715d7703bdf9 Mon Sep 17 00:00:00 2001 From: Jordi Bunster Date: Thu, 29 Apr 2021 10:20:57 -0700 Subject: [PATCH 1/5] Remove 'explorer' from a few Panes (#650) While working on #549 I realized there were a few places where 'explorer' was only needed to expand the notifications console, so I stripped those out where it was easy. --- src/Explorer/Explorer.tsx | 9 +- .../CopyNotebookPane/CopyNotebookPane.tsx | 2 +- .../DeleteCollectionConfirmationPane.tsx | 2 +- ...teCollectionConfirmationPane.test.tsx.snap | 11 +- .../ExecuteSprocParamsPane.test.tsx | 4 +- .../ExecuteSprocParamsPane.tsx | 7 +- .../ExecuteSprocParamsPane.test.tsx.snap | 4 +- .../GenericRightPaneComponent.tsx | 11 +- .../Panes/LoadQueryPane/LoadQueryPane.tsx | 2 +- .../__snapshots__/LoadQueryPane.test.tsx.snap | 2 +- .../PublishNotebookPane.tsx | 2 +- .../Panes/SaveQueryPane/SaveQueryPane.tsx | 2 +- .../__snapshots__/SaveQueryPane.test.tsx.snap | 6 +- .../Panes/SettingsPane/SettingsPane.test.tsx | 3 +- .../Panes/SettingsPane/SettingsPane.tsx | 7 +- .../__snapshots__/SettingsPane.test.tsx.snap | 1041 +---------------- .../Panes/StringInputPane/StringInputPane.tsx | 2 +- .../StringInputPane.test.tsx.snap | 499 +------- .../__snapshots__/index.test.tsx.snap | 2 +- .../Tables/TableQuerySelectPanel/index.tsx | 2 +- .../Panes/UploadFilePane/UploadFilePane.tsx | 7 +- .../Panes/UploadItemsPane/UploadItemsPane.tsx | 2 +- .../UploadItemsPane.test.tsx.snap | 499 +------- 23 files changed, 79 insertions(+), 2049 deletions(-) diff --git a/src/Explorer/Explorer.tsx b/src/Explorer/Explorer.tsx index 3a090fd7e..3c9ce8659 100644 --- a/src/Explorer/Explorer.tsx +++ b/src/Explorer/Explorer.tsx @@ -2089,15 +2089,18 @@ export default class Explorer { } public openSettingPane(): void { - this.openSidePanel("Settings", ); + this.openSidePanel( + "Settings", + this.expandConsole()} closePanel={this.closeSidePanel} /> + ); } public openExecuteSprocParamsPanel(storedProcedure: StoredProcedure): void { this.openSidePanel( "Input parameters", this.expandConsole()} closePanel={() => this.closeSidePanel()} /> ); @@ -2132,7 +2135,7 @@ export default class Explorer { this.openSidePanel( "Upload File", this.expandConsole()} closePanel={this.closeSidePanel} uploadFile={(name: string, content: string) => this.uploadFile(name, content, parent)} /> diff --git a/src/Explorer/Panes/CopyNotebookPane/CopyNotebookPane.tsx b/src/Explorer/Panes/CopyNotebookPane/CopyNotebookPane.tsx index 3f4c281aa..30e6bdeb5 100644 --- a/src/Explorer/Panes/CopyNotebookPane/CopyNotebookPane.tsx +++ b/src/Explorer/Panes/CopyNotebookPane/CopyNotebookPane.tsx @@ -131,7 +131,6 @@ export const CopyNotebookPane: FunctionComponent = ({ }; const genericPaneProps: GenericRightPaneProps = { - container, formError, formErrorDetail, id: "copynotebookpane", @@ -140,6 +139,7 @@ export const CopyNotebookPane: FunctionComponent = ({ submitButtonText: "OK", onClose: closePanel, onSubmit: () => submit(), + expandConsole: () => container.expandConsole(), }; const copyNotebookPaneProps: CopyNotebookPaneProps = { diff --git a/src/Explorer/Panes/DeleteCollectionConfirmationPane/DeleteCollectionConfirmationPane.tsx b/src/Explorer/Panes/DeleteCollectionConfirmationPane/DeleteCollectionConfirmationPane.tsx index 171289999..b6864aadb 100644 --- a/src/Explorer/Panes/DeleteCollectionConfirmationPane/DeleteCollectionConfirmationPane.tsx +++ b/src/Explorer/Panes/DeleteCollectionConfirmationPane/DeleteCollectionConfirmationPane.tsx @@ -101,7 +101,6 @@ export const DeleteCollectionConfirmationPane: FunctionComponent explorer.expandConsole(), }; return ( diff --git a/src/Explorer/Panes/DeleteCollectionConfirmationPane/__snapshots__/DeleteCollectionConfirmationPane.test.tsx.snap b/src/Explorer/Panes/DeleteCollectionConfirmationPane/__snapshots__/DeleteCollectionConfirmationPane.test.tsx.snap index 8d5985440..a78871304 100644 --- a/src/Explorer/Panes/DeleteCollectionConfirmationPane/__snapshots__/DeleteCollectionConfirmationPane.test.tsx.snap +++ b/src/Explorer/Panes/DeleteCollectionConfirmationPane/__snapshots__/DeleteCollectionConfirmationPane.test.tsx.snap @@ -16,16 +16,7 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect } > { - const fakeExplorer = {} as Explorer; const fakeSproc = {} as StoredProcedure; const props = { - explorer: fakeExplorer, storedProcedure: fakeSproc, + expandConsole: (): void => undefined, closePanel: (): void => undefined, }; diff --git a/src/Explorer/Panes/ExecuteSprocParamsPane/ExecuteSprocParamsPane.tsx b/src/Explorer/Panes/ExecuteSprocParamsPane/ExecuteSprocParamsPane.tsx index ab63e4fcb..2677c6055 100644 --- a/src/Explorer/Panes/ExecuteSprocParamsPane/ExecuteSprocParamsPane.tsx +++ b/src/Explorer/Panes/ExecuteSprocParamsPane/ExecuteSprocParamsPane.tsx @@ -2,7 +2,6 @@ import { useBoolean } from "@uifabric/react-hooks"; import { IDropdownOption, IImageProps, Image, Stack, Text } from "office-ui-fabric-react"; import React, { FunctionComponent, useState } from "react"; import AddPropertyIcon from "../../../../images/Add-property.svg"; -import Explorer from "../../Explorer"; import StoredProcedure from "../../Tree/StoredProcedure"; import { GenericRightPaneComponent, @@ -11,7 +10,7 @@ import { import { InputParameter } from "./InputParameter"; interface ExecuteSprocParamsPaneProps { - explorer: Explorer; + expandConsole: () => void; storedProcedure: StoredProcedure; closePanel: () => void; } @@ -27,7 +26,7 @@ interface UnwrappedExecuteSprocParam { } export const ExecuteSprocParamsPane: FunctionComponent = ({ - explorer, + expandConsole, storedProcedure, closePanel, }: ExecuteSprocParamsPaneProps): JSX.Element => { @@ -43,7 +42,7 @@ export const ExecuteSprocParamsPane: FunctionComponent void; formError: string; formErrorDetail: string; id: string; @@ -24,7 +23,7 @@ export interface GenericRightPaneState { } export const GenericRightPaneComponent: FunctionComponent = ({ - container, + expandConsole, formError, formErrorDetail, id, @@ -72,7 +71,7 @@ export const GenericRightPaneComponent: FunctionComponent {formError} - @@ -114,10 +113,6 @@ export const GenericRightPaneComponent: FunctionComponent } }; - const showErrorDetail = (): void => { - container.expandConsole(); - }; - return (
diff --git a/src/Explorer/Panes/LoadQueryPane/LoadQueryPane.tsx b/src/Explorer/Panes/LoadQueryPane/LoadQueryPane.tsx index 6a8fed727..d2079c010 100644 --- a/src/Explorer/Panes/LoadQueryPane/LoadQueryPane.tsx +++ b/src/Explorer/Panes/LoadQueryPane/LoadQueryPane.tsx @@ -37,7 +37,7 @@ export const LoadQueryPane: FunctionComponent = ({ const title = "Load Query"; const genericPaneProps: GenericRightPaneProps = { - container: explorer, + expandConsole: () => explorer.expandConsole(), formError: formError, formErrorDetail: formErrorsDetails, id: "loadQueryPane", diff --git a/src/Explorer/Panes/LoadQueryPane/__snapshots__/LoadQueryPane.test.tsx.snap b/src/Explorer/Panes/LoadQueryPane/__snapshots__/LoadQueryPane.test.tsx.snap index ee672aa5c..badff47b7 100644 --- a/src/Explorer/Panes/LoadQueryPane/__snapshots__/LoadQueryPane.test.tsx.snap +++ b/src/Explorer/Panes/LoadQueryPane/__snapshots__/LoadQueryPane.test.tsx.snap @@ -2,7 +2,7 @@ exports[`Load Query Pane should render Default properly 1`] = ` = }; const props: GenericRightPaneProps = { - container: container, formError: formError, formErrorDetail: formErrorDetail, id: "publishnotebookpane", @@ -167,6 +166,7 @@ export const PublishNotebookPane: FunctionComponent = submitButtonText: "Publish", onSubmit: () => submit(), onClose: closePanel, + expandConsole: () => container.expandConsole(), isSubmitButtonHidden: !isCodeOfConductAccepted, }; diff --git a/src/Explorer/Panes/SaveQueryPane/SaveQueryPane.tsx b/src/Explorer/Panes/SaveQueryPane/SaveQueryPane.tsx index 949e9203f..652c58949 100644 --- a/src/Explorer/Panes/SaveQueryPane/SaveQueryPane.tsx +++ b/src/Explorer/Panes/SaveQueryPane/SaveQueryPane.tsx @@ -32,7 +32,7 @@ export const SaveQueryPane: FunctionComponent = ({ const title = "Save Query"; const { canSaveQueries } = explorer; const genericPaneProps: GenericRightPaneProps = { - container: explorer, + expandConsole: () => explorer.expandConsole(), formError: formError, formErrorDetail: formErrorsDetails, id: "saveQueryPane", diff --git a/src/Explorer/Panes/SaveQueryPane/__snapshots__/SaveQueryPane.test.tsx.snap b/src/Explorer/Panes/SaveQueryPane/__snapshots__/SaveQueryPane.test.tsx.snap index b5ed7ed77..aba5e17b8 100644 --- a/src/Explorer/Panes/SaveQueryPane/__snapshots__/SaveQueryPane.test.tsx.snap +++ b/src/Explorer/Panes/SaveQueryPane/__snapshots__/SaveQueryPane.test.tsx.snap @@ -2,11 +2,7 @@ exports[`Save Query Pane should render Default properly 1`] = ` undefined, closePanel: (): void => undefined, }; describe("Settings Pane", () => { diff --git a/src/Explorer/Panes/SettingsPane/SettingsPane.tsx b/src/Explorer/Panes/SettingsPane/SettingsPane.tsx index 02dfdd614..480f358c5 100644 --- a/src/Explorer/Panes/SettingsPane/SettingsPane.tsx +++ b/src/Explorer/Panes/SettingsPane/SettingsPane.tsx @@ -7,19 +7,18 @@ import { LocalStorageUtility, StorageKey } from "../../../Shared/StorageUtility" import * as StringUtility from "../../../Shared/StringUtility"; import { userContext } from "../../../UserContext"; import { logConsoleInfo } from "../../../Utils/NotificationConsoleUtils"; -import Explorer from "../../Explorer"; import { GenericRightPaneComponent, GenericRightPaneProps, } from "../GenericRightPaneComponent/GenericRightPaneComponent"; export interface SettingsPaneProps { - explorer: Explorer; + expandConsole: () => void; closePanel: () => void; } export const SettingsPane: FunctionComponent = ({ - explorer: container, + expandConsole, closePanel, }: SettingsPaneProps) => { const [formErrors, setFormErrors] = useState(""); @@ -107,7 +106,7 @@ export const SettingsPane: FunctionComponent = ({ }; const genericPaneProps: GenericRightPaneProps = { - container, + expandConsole, formError: formErrors, formErrorDetail: "", id: "settingspane", diff --git a/src/Explorer/Panes/SettingsPane/__snapshots__/SettingsPane.test.tsx.snap b/src/Explorer/Panes/SettingsPane/__snapshots__/SettingsPane.test.tsx.snap index 69f4ef1b7..c20b14595 100644 --- a/src/Explorer/Panes/SettingsPane/__snapshots__/SettingsPane.test.tsx.snap +++ b/src/Explorer/Panes/SettingsPane/__snapshots__/SettingsPane.test.tsx.snap @@ -2,504 +2,7 @@ exports[`Settings Pane should render Default properly 1`] = `
+ > +
+
+ Query results per page + + Enter the number of query results that should be shown per page. + +
+ +
+
= ({ } }; const genericPaneProps: GenericRightPaneProps = { - container: container, formError: formErrors, formErrorDetail: formErrorsDetails, id: "stringInputPane", @@ -101,6 +100,7 @@ export const StringInputPane: FunctionComponent = ({ submitButtonText: submitButtonLabel, onClose: closePanel, onSubmit: submit, + expandConsole: () => container.expandConsole(), }; return ( diff --git a/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap b/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap index fbdc9fc80..7fd573d15 100644 --- a/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap +++ b/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap @@ -519,504 +519,7 @@ exports[`StringInput Pane should render Create new directory properly 1`] = ` successMessage="Created directory " > (true); const genericPaneProps: GenericRightPaneProps = { - container: explorer, formError: "", formErrorDetail: "", id: "querySelectPane", @@ -41,6 +40,7 @@ export const TableQuerySelectPanel: FunctionComponent closePanel(), onSubmit: () => submit(), + expandConsole: () => explorer.expandConsole(), }; const submit = (): void => { diff --git a/src/Explorer/Panes/UploadFilePane/UploadFilePane.tsx b/src/Explorer/Panes/UploadFilePane/UploadFilePane.tsx index 70b66baea..d65301610 100644 --- a/src/Explorer/Panes/UploadFilePane/UploadFilePane.tsx +++ b/src/Explorer/Panes/UploadFilePane/UploadFilePane.tsx @@ -1,7 +1,6 @@ import React, { ChangeEvent, FunctionComponent, useState } from "react"; import { Upload } from "../../../Common/Upload/Upload"; import { logConsoleError, logConsoleInfo, logConsoleProgress } from "../../../Utils/NotificationConsoleUtils"; -import Explorer from "../../Explorer"; import { NotebookContentItem } from "../../Notebook/NotebookContentItem"; import { GenericRightPaneComponent, @@ -9,13 +8,13 @@ import { } from "../GenericRightPaneComponent/GenericRightPaneComponent"; export interface UploadFilePanelProps { - explorer: Explorer; + expandConsole: () => void; closePanel: () => void; uploadFile: (name: string, content: string) => Promise; } export const UploadFilePane: FunctionComponent = ({ - explorer: container, + expandConsole, closePanel, uploadFile, }: UploadFilePanelProps) => { @@ -93,7 +92,7 @@ export const UploadFilePane: FunctionComponent = ({ }; const genericPaneProps: GenericRightPaneProps = { - container: container, + expandConsole, formError: formErrors, formErrorDetail: formErrorsDetails, id: "uploadFilePane", diff --git a/src/Explorer/Panes/UploadItemsPane/UploadItemsPane.tsx b/src/Explorer/Panes/UploadItemsPane/UploadItemsPane.tsx index c2836ba3c..31448612f 100644 --- a/src/Explorer/Panes/UploadItemsPane/UploadItemsPane.tsx +++ b/src/Explorer/Panes/UploadItemsPane/UploadItemsPane.tsx @@ -71,7 +71,7 @@ export const UploadItemsPane: FunctionComponent = ({ }; const genericPaneProps: GenericRightPaneProps = { - container: explorer, + expandConsole: () => explorer.expandConsole(), formError, formErrorDetail, id: "uploaditemspane", diff --git a/src/Explorer/Panes/UploadItemsPane/__snapshots__/UploadItemsPane.test.tsx.snap b/src/Explorer/Panes/UploadItemsPane/__snapshots__/UploadItemsPane.test.tsx.snap index fc59040bf..c13f7f4ae 100644 --- a/src/Explorer/Panes/UploadItemsPane/__snapshots__/UploadItemsPane.test.tsx.snap +++ b/src/Explorer/Panes/UploadItemsPane/__snapshots__/UploadItemsPane.test.tsx.snap @@ -2,504 +2,7 @@ exports[`Upload Items Pane should render Default properly 1`] = ` Date: Thu, 29 Apr 2021 14:46:31 -0700 Subject: [PATCH 2/5] Remove GraphExplorerAdapter (#736) --- .../GraphExplorerAdapter.tsx | 63 ------------------- src/Explorer/Tabs/GraphTab.tsx | 29 ++++++--- 2 files changed, 20 insertions(+), 72 deletions(-) delete mode 100644 src/Explorer/Graph/GraphExplorerComponent/GraphExplorerAdapter.tsx diff --git a/src/Explorer/Graph/GraphExplorerComponent/GraphExplorerAdapter.tsx b/src/Explorer/Graph/GraphExplorerComponent/GraphExplorerAdapter.tsx deleted file mode 100644 index 77ab623fc..000000000 --- a/src/Explorer/Graph/GraphExplorerComponent/GraphExplorerAdapter.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import * as React from "react"; -import { ReactAdapter } from "../../../Bindings/ReactBindingHandler"; -import { GraphConfig } from "../../Tabs/GraphTab"; -import * as ViewModels from "../../../Contracts/ViewModels"; -import { GraphExplorer, GraphAccessor } from "./GraphExplorer"; - -interface Parameter { - onIsNewVertexDisabledChange: (isEnabled: boolean) => void; - onGraphAccessorCreated: (instance: GraphAccessor) => void; - onIsFilterQueryLoading: (isFilterQueryLoading: boolean) => void; - onIsValidQuery: (isValidQuery: boolean) => void; - onIsPropertyEditing: (isEditing: boolean) => void; - onIsGraphDisplayed: (isDisplayed: boolean) => void; - onResetDefaultGraphConfigValues: () => void; - - graphConfigUiData: ViewModels.GraphConfigUiData; - graphConfig?: GraphConfig; - - collectionPartitionKeyProperty: string; - graphBackendEndpoint: string; - databaseId: string; - collectionId: string; - masterKey: string; - - onLoadStartKey: number; - onLoadStartKeyChange: (newKey: number) => void; - resourceId: string; -} - -export class GraphExplorerAdapter implements ReactAdapter { - public params: Parameter; - public parameters = {}; - public isNewVertexDisabled: boolean; - - public constructor(params: Parameter) { - this.params = params; - } - - public renderComponent(): JSX.Element { - return ( - - ); - } -} diff --git a/src/Explorer/Tabs/GraphTab.tsx b/src/Explorer/Tabs/GraphTab.tsx index 8a6712b67..3402b7275 100644 --- a/src/Explorer/Tabs/GraphTab.tsx +++ b/src/Explorer/Tabs/GraphTab.tsx @@ -5,8 +5,12 @@ import StyleIcon from "../../../images/Style.svg"; import { DatabaseAccount } from "../../Contracts/DataModels"; import * as ViewModels from "../../Contracts/ViewModels"; import { CommandButtonComponentProps } from "../Controls/CommandButton/CommandButtonComponent"; -import { GraphAccessor, GraphExplorerError } from "../Graph/GraphExplorerComponent/GraphExplorer"; -import { GraphExplorerAdapter } from "../Graph/GraphExplorerComponent/GraphExplorerAdapter"; +import { + GraphAccessor, + GraphExplorer, + GraphExplorerError, + GraphExplorerProps, +} from "../Graph/GraphExplorerComponent/GraphExplorer"; import { ContextualPaneBase } from "../Panes/ContextualPaneBase"; import GraphStylingPane from "../Panes/GraphStylingPane"; import { NewVertexPanel } from "../Panes/NewVertexPanel/NewVertexPanel"; @@ -36,15 +40,13 @@ interface GraphTabOptions extends ViewModels.TabOptions { } export default class GraphTab extends TabsBase { - public readonly html = - '
'; // Graph default configuration public static readonly DEFAULT_NODE_CAPTION = "id"; private static readonly LINK_COLOR = "#aaa"; private static readonly NODE_SIZE = 10; private static readonly NODE_COLOR = "orange"; private static readonly LINK_WIDTH = 1; - private graphExplorerAdapter: GraphExplorerAdapter; + private graphExplorerProps: GraphExplorerProps; private isNewVertexDisabled: ko.Observable; private isPropertyEditing: ko.Observable; private isGraphDisplayed: ko.Observable; @@ -70,7 +72,7 @@ export default class GraphTab extends TabsBase { this.graphConfig = GraphTab.createGraphConfig(); // TODO Merge this with this.graphConfig this.graphConfigUiData = GraphTab.createGraphConfigUiData(this.graphConfig); - this.graphExplorerAdapter = new GraphExplorerAdapter({ + this.graphExplorerProps = { onGraphAccessorCreated: (instance: GraphAccessor): void => { this.graphAccessor = instance; }, @@ -89,8 +91,9 @@ export default class GraphTab extends TabsBase { onResetDefaultGraphConfigValues: () => this.setDefaultGraphConfigValues(), graphConfig: this.graphConfig, graphConfigUiData: this.graphConfigUiData, - onIsFilterQueryLoading: (isFilterQueryLoading: boolean): void => this.isFilterQueryLoading(isFilterQueryLoading), - onIsValidQuery: (isValidQuery: boolean): void => this.isValidQuery(isValidQuery), + onIsFilterQueryLoadingChange: (isFilterQueryLoading: boolean): void => + this.isFilterQueryLoading(isFilterQueryLoading), + onIsValidQueryChange: (isValidQuery: boolean): void => this.isValidQuery(isValidQuery), collectionPartitionKeyProperty: options.collectionPartitionKeyProperty, graphBackendEndpoint: GraphTab.getGremlinEndpoint(options.account), databaseId: options.databaseId, @@ -103,7 +106,7 @@ export default class GraphTab extends TabsBase { } }, resourceId: options.account.id, - }); + }; this.isFilterQueryLoading = ko.observable(false); this.isValidQuery = ko.observable(true); @@ -115,6 +118,14 @@ export default class GraphTab extends TabsBase { : `${account.name}.graphs.azure.com:443/`; } + public render(): JSX.Element { + return ( +
+ +
+ ); + } + public onTabClick(): void { super.onTabClick(); this.collection.selectedSubnodeKind(ViewModels.CollectionTabKind.Graph); From 9878bf0d5e6adcedf1aa6039427508040af196d6 Mon Sep 17 00:00:00 2001 From: victor-meng <56978073+victor-meng@users.noreply.github.com> Date: Thu, 29 Apr 2021 17:23:21 -0700 Subject: [PATCH 3/5] Fix table entity boolean and number type property values (#737) --- .../Panes/Tables/EditTableEntityPanel.tsx | 2 +- src/Explorer/Tables/TableEntityProcessor.ts | 36 ++++++++++++------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/Explorer/Panes/Tables/EditTableEntityPanel.tsx b/src/Explorer/Panes/Tables/EditTableEntityPanel.tsx index f34ef865e..9aa50fac3 100644 --- a/src/Explorer/Panes/Tables/EditTableEntityPanel.tsx +++ b/src/Explorer/Panes/Tables/EditTableEntityPanel.tsx @@ -328,7 +328,7 @@ export const EditTableEntityPanel: FunctionComponent selectedKey={entity.type} entityPropertyPlaceHolder={detailedHelp} entityValuePlaceholder={entity.entityValuePlaceholder} - entityValue={entity.value} + entityValue={entity.value?.toString()} isEntityTypeDate={entity.isEntityTypeDate} entityTimeValue={entity.entityTimeValue} isEntityValueDisable={entity.isEntityValueDisable} diff --git a/src/Explorer/Tables/TableEntityProcessor.ts b/src/Explorer/Tables/TableEntityProcessor.ts index 4f6fd4f99..f26d2c38d 100644 --- a/src/Explorer/Tables/TableEntityProcessor.ts +++ b/src/Explorer/Tables/TableEntityProcessor.ts @@ -165,7 +165,7 @@ export function convertEntityToNewDocument(entity: Entities.ITableEntityForTable $id: entity.RowKey._, id: entity.RowKey._, }; - for (var property in entity) { + for (const property in entity) { if ( property !== Constants.EntityKeyNames.PartitionKey && property !== Constants.EntityKeyNames.RowKey && @@ -176,18 +176,30 @@ export function convertEntityToNewDocument(entity: Entities.ITableEntityForTable property !== keyProperties.attachments && property !== keyProperties.Id2 ) { - if (entity[property].$ === Constants.TableType.DateTime) { - // Convert javascript date back to ticks with 20 zeros padding - document[property] = { - $t: (DataTypes)[entity[property].$], - $v: DateTimeUtilities.convertJSDateToTicksWithPadding(entity[property]._), - }; - } else { - document[property] = { - $t: (DataTypes)[entity[property].$], - $v: entity[property]._, - }; + const propertyValue = entity[property]._; + let parsedValue; + switch (entity[property].$) { + case Constants.TableType.DateTime: + parsedValue = DateTimeUtilities.convertJSDateToTicksWithPadding(propertyValue); + break; + case Constants.TableType.Boolean: + parsedValue = propertyValue.toLowerCase() === "true"; + break; + case Constants.TableType.Int32: + case Constants.TableType.Int64: + parsedValue = parseInt(propertyValue, 10); + break; + case Constants.TableType.Double: + parsedValue = parseFloat(propertyValue); + break; + default: + parsedValue = propertyValue; } + + document[property] = { + $t: (DataTypes)[entity[property].$], + $v: parsedValue, + }; } } return document; From 4efacace162bbad3455dd73dab33c8d1cce87647 Mon Sep 17 00:00:00 2001 From: victor-meng <56978073+victor-meng@users.noreply.github.com> Date: Fri, 30 Apr 2021 10:23:34 -0700 Subject: [PATCH 4/5] add collection panel improvements (#630) Co-authored-by: Jordi Bunster --- src/Explorer/ContextMenuButtonFactory.ts | 4 +- .../CollapsibleSectionComponent.tsx | 7 + ...putInputAutoPilotV3Component.test.tsx.snap | 4 +- .../SettingsRenderUtils.test.tsx.snap | 2 +- .../ThroughputInput/ThroughputInput.less | 8 +- .../ThroughputInput/ThroughputInput.tsx | 68 +-- src/Explorer/Explorer.tsx | 24 +- src/Explorer/OpenActions.test.ts | 12 +- src/Explorer/OpenActions.ts | 2 +- src/Explorer/Panes/AddCollectionPane.html | 5 +- src/Explorer/Panes/AddCollectionPane.ts | 1 - src/Explorer/Panes/AddCollectionPanel.tsx | 389 ++++++++++-------- src/Explorer/Panes/AddDatabasePane.ts | 1 - .../DeleteCollectionConfirmationPane.tsx | 4 +- src/Explorer/Panes/PanelComponent.less | 20 +- .../Panes/PanelInfoErrorComponent.tsx | 4 +- ...eteDatabaseConfirmationPanel.test.tsx.snap | 2 +- src/Explorer/Tree/Database.ts | 5 +- src/Explorer/Tree/ResourceTreeAdapter.tsx | 2 +- src/Shared/Telemetry/TelemetryConstants.ts | 1 + src/UserContext.ts | 2 +- src/Utils/APITypeUtils.ts | 30 ++ src/Utils/PricingUtils.ts | 30 +- test/mongo/container.spec.ts | 13 +- test/sql/container.spec.ts | 13 +- test/tables/container.spec.ts | 5 +- 26 files changed, 351 insertions(+), 307 deletions(-) create mode 100644 src/Utils/APITypeUtils.ts diff --git a/src/Explorer/ContextMenuButtonFactory.ts b/src/Explorer/ContextMenuButtonFactory.ts index 6973c5326..1940d025f 100644 --- a/src/Explorer/ContextMenuButtonFactory.ts +++ b/src/Explorer/ContextMenuButtonFactory.ts @@ -29,11 +29,11 @@ export interface DatabaseContextMenuButtonParams { * New resource tree (in ReactJS) */ export class ResourceTreeContextMenuButtonFactory { - public static createDatabaseContextMenu(container: Explorer): TreeNodeMenuItem[] { + public static createDatabaseContextMenu(container: Explorer, databaseId: string): TreeNodeMenuItem[] { const items: TreeNodeMenuItem[] = [ { iconSrc: AddCollectionIcon, - onClick: () => container.onNewCollectionClicked(), + onClick: () => container.onNewCollectionClicked(databaseId), label: container.addCollectionText(), }, ]; diff --git a/src/Explorer/Controls/CollapsiblePanel/CollapsibleSectionComponent.tsx b/src/Explorer/Controls/CollapsiblePanel/CollapsibleSectionComponent.tsx index 9b96f36f4..134fcc7c3 100644 --- a/src/Explorer/Controls/CollapsiblePanel/CollapsibleSectionComponent.tsx +++ b/src/Explorer/Controls/CollapsiblePanel/CollapsibleSectionComponent.tsx @@ -5,6 +5,7 @@ import { accordionStackTokens } from "../Settings/SettingsRenderUtils"; export interface CollapsibleSectionProps { title: string; isExpandedByDefault: boolean; + onExpand?: () => void; } export interface CollapsibleSectionState { @@ -23,6 +24,12 @@ export class CollapsibleSectionComponent extends React.Component diff --git a/src/Explorer/Controls/Settings/SettingsSubComponents/ThroughputInputComponents/__snapshots__/ThroughputInputAutoPilotV3Component.test.tsx.snap b/src/Explorer/Controls/Settings/SettingsSubComponents/ThroughputInputComponents/__snapshots__/ThroughputInputAutoPilotV3Component.test.tsx.snap index accc10398..945bd0644 100644 --- a/src/Explorer/Controls/Settings/SettingsSubComponents/ThroughputInputComponents/__snapshots__/ThroughputInputAutoPilotV3Component.test.tsx.snap +++ b/src/Explorer/Controls/Settings/SettingsSubComponents/ThroughputInputComponents/__snapshots__/ThroughputInputAutoPilotV3Component.test.tsx.snap @@ -415,7 +415,7 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = ` - *This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account + This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account @@ -689,7 +689,7 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = ` - *This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account + This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account diff --git a/src/Explorer/Controls/Settings/__snapshots__/SettingsRenderUtils.test.tsx.snap b/src/Explorer/Controls/Settings/__snapshots__/SettingsRenderUtils.test.tsx.snap index 474866fb9..2f4c53dd3 100644 --- a/src/Explorer/Controls/Settings/__snapshots__/SettingsRenderUtils.test.tsx.snap +++ b/src/Explorer/Controls/Settings/__snapshots__/SettingsRenderUtils.test.tsx.snap @@ -150,7 +150,7 @@ exports[`SettingsUtils functions render 1`] = ` - *This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account + This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account diff --git a/src/Explorer/Controls/ThroughputInput/ThroughputInput.less b/src/Explorer/Controls/ThroughputInput/ThroughputInput.less index dec618d7b..0eed71bec 100644 --- a/src/Explorer/Controls/ThroughputInput/ThroughputInput.less +++ b/src/Explorer/Controls/ThroughputInput/ThroughputInput.less @@ -11,10 +11,6 @@ padding: 0 @LargeSpace 0 @SmallSpace; } -.throughputInputSpacing { - margin-bottom: @SmallSpace; - - & > * { - margin-bottom: @SmallSpace; - } +.throughputInputSpacing > :not(:last-child) { + margin-bottom: @DefaultSpace; } diff --git a/src/Explorer/Controls/ThroughputInput/ThroughputInput.tsx b/src/Explorer/Controls/ThroughputInput/ThroughputInput.tsx index 681b2d1c3..a28c336f8 100644 --- a/src/Explorer/Controls/ThroughputInput/ThroughputInput.tsx +++ b/src/Explorer/Controls/ThroughputInput/ThroughputInput.tsx @@ -3,11 +3,13 @@ import React from "react"; import * as Constants from "../../../Common/Constants"; import * as SharedConstants from "../../../Shared/Constants"; import { userContext } from "../../../UserContext"; +import { getCollectionName } from "../../../Utils/APITypeUtils"; import * as AutoPilotUtils from "../../../Utils/AutoPilotUtils"; import * as PricingUtils from "../../../Utils/PricingUtils"; export interface ThroughputInputProps { isDatabase: boolean; + isSharded: boolean; showFreeTierExceedThroughputTooltip: boolean; setThroughputValue: (throughput: number) => void; setIsAutoscale: (isAutoscale: boolean) => void; @@ -18,6 +20,7 @@ export interface ThroughputInputState { isAutoscaleSelected: boolean; throughput: number; isCostAcknowledged: boolean; + throughputError: string; } export class ThroughputInput extends React.Component { @@ -28,6 +31,7 @@ export class ThroughputInput extends React.Component - + {this.getThroughputLabelText()} - + @@ -74,7 +78,7 @@ export class ThroughputInput extends React.Component - Provision maximum RU/s required by this resource. Estimate your required RU/s with  + Estimate your required RU/s with  capacity calculator @@ -82,11 +86,11 @@ export class ThroughputInput extends React.Component - - Max RU/s + + {this.props.isDatabase ? "Database" : getCollectionName()} max RU/s - + @@ -101,11 +105,12 @@ export class ThroughputInput extends React.Component - Your {this.props.isDatabase ? "database" : "container"} throughput will automatically scale from{" "} + Your {this.props.isDatabase ? "database" : getCollectionName().toLocaleLowerCase()} throughput will + automatically scale from{" "} {AutoPilotUtils.getMinRUsBasedOnUserInput(this.state.throughput)} RU/s (10% of max RU/s) -{" "} {this.state.throughput} RU/s @@ -147,6 +152,7 @@ export class ThroughputInput extends React.Component @@ -156,6 +162,7 @@ export class ThroughputInput extends React.Component SharedConstants.CollectionCreation.DefaultCollectionRUs100K && ( + 10000) { + this.setState({ throughputError: "Unsharded collections support up to 10,000 RUs" }); + } else { + this.setState({ throughputError: undefined }); + } } private getAutoScaleTooltip(): string { - return `After the first ${AutoPilotUtils.getStorageBasedOnUserInput( - this.state.throughput - )} GB of data stored, the max - RU/s will be automatically upgraded based on the new storage value.`; + const collectionName = getCollectionName().toLocaleLowerCase(); + return `Set the max RU/s to the highest RU/s you want your ${collectionName} to scale to. The ${collectionName} will scale between 10% of max RU/s to the max RU/s based on usage.`; } private getCostAcknowledgeText(): string { @@ -271,10 +283,20 @@ const CostEstimateText: React.FunctionComponent = (props: ? PricingUtils.getAutoscalePricePerRu(serverId, multiplier) * multiplier : PricingUtils.getPricePerRu(serverId) * multiplier; + const iconWithEstimatedCostDisclaimer: JSX.Element = ( + + + + ); + if (isAutoscale) { return ( - Estimated monthly cost ({currency}):{" "} + Estimated monthly cost ({currency}){iconWithEstimatedCostDisclaimer}:{" "} {currencySign + PricingUtils.calculateEstimateNumber(monthlyPrice / 10)} -{" "} {currencySign + PricingUtils.calculateEstimateNumber(monthlyPrice)}{" "} @@ -287,7 +309,7 @@ const CostEstimateText: React.FunctionComponent = (props: return ( - Cost ({currency}):{" "} + Estimated cost ({currency}){iconWithEstimatedCostDisclaimer}:{" "} {currencySign + PricingUtils.calculateEstimateNumber(hourlyPrice)} hourly /{" "} {currencySign + PricingUtils.calculateEstimateNumber(dailyPrice)} daily /{" "} @@ -295,8 +317,6 @@ const CostEstimateText: React.FunctionComponent = (props: ({numberOfRegions + (numberOfRegions === 1 ? " region" : " regions")}, {requestUnits}RU/s,{" "} {currencySign + pricePerRu}/RU) -
- {PricingUtils.estimatedCostDisclaimer}
); }; diff --git a/src/Explorer/Explorer.tsx b/src/Explorer/Explorer.tsx index 3c9ce8659..e044581f3 100644 --- a/src/Explorer/Explorer.tsx +++ b/src/Explorer/Explorer.tsx @@ -30,12 +30,12 @@ import { Action, ActionModifiers } from "../Shared/Telemetry/TelemetryConstants" import * as TelemetryProcessor from "../Shared/Telemetry/TelemetryProcessor"; import { ArcadiaResourceManager } from "../SparkClusterManager/ArcadiaResourceManager"; import { userContext } from "../UserContext"; +import { getCollectionName } from "../Utils/APITypeUtils"; import { decryptJWTToken, getAuthorizationHeader } from "../Utils/AuthorizationUtils"; import { stringToBlob } from "../Utils/BlobUtils"; import { fromContentUri, toRawContentUri } from "../Utils/GitHubUtils"; import * as NotificationConsoleUtils from "../Utils/NotificationConsoleUtils"; import { logConsoleError, logConsoleInfo, logConsoleProgress } from "../Utils/NotificationConsoleUtils"; -import * as PricingUtils from "../Utils/PricingUtils"; import * as ComponentRegisterer from "./ComponentRegisterer"; import { ArcadiaWorkspaceItem } from "./Controls/Arcadia/ArcadiaMenuPicker"; import { CommandButtonComponentProps } from "./Controls/CommandButton/CommandButtonComponent"; @@ -1950,14 +1950,14 @@ export default class Explorer { } } - public onNewCollectionClicked(): void { + public onNewCollectionClicked(databaseId?: string): void { if (userContext.apiType === "Cassandra") { this.cassandraAddCollectionPane.open(); - } else if (userContext.features.enableReactPane) { - this.openAddCollectionPanel(); - } else { + } else if (userContext.features.enableKOPanel) { this.addCollectionPane.open(this.selectedDatabaseId()); document.getElementById("linkAddCollection").focus(); + } else { + this.openAddCollectionPanel(databaseId); } } @@ -2061,14 +2061,9 @@ export default class Explorer { } public openDeleteCollectionConfirmationPane(): void { - let collectionName = PricingUtils.getCollectionName(userContext.apiType); this.openSidePanel( - "Delete " + collectionName, - + "Delete " + getCollectionName(), + ); } @@ -2106,14 +2101,15 @@ export default class Explorer { ); } - public async openAddCollectionPanel(): Promise { + public async openAddCollectionPanel(databaseId?: string): Promise { await this.loadDatabaseOffers(); this.openSidePanel( - "New Collection", + "New " + getCollectionName(), this.closeSidePanel()} openNotificationConsole={() => this.expandConsole()} + databaseId={databaseId} /> ); } diff --git a/src/Explorer/OpenActions.test.ts b/src/Explorer/OpenActions.test.ts index 47a3003af..e8113455f 100644 --- a/src/Explorer/OpenActions.test.ts +++ b/src/Explorer/OpenActions.test.ts @@ -3,7 +3,6 @@ import { ActionContracts } from "../Contracts/ExplorerContracts"; import * as ViewModels from "../Contracts/ViewModels"; import Explorer from "./Explorer"; import { handleOpenAction } from "./OpenActions"; -import AddCollectionPane from "./Panes/AddCollectionPane"; import CassandraAddCollectionPane from "./Panes/CassandraAddCollectionPane"; describe("OpenActions", () => { @@ -15,8 +14,7 @@ describe("OpenActions", () => { beforeEach(() => { explorer = {} as Explorer; - explorer.addCollectionPane = {} as AddCollectionPane; - explorer.addCollectionPane.open = jest.fn(); + explorer.onNewCollectionClicked = jest.fn(); explorer.cassandraAddCollectionPane = {} as CassandraAddCollectionPane; explorer.cassandraAddCollectionPane.open = jest.fn(); explorer.closeAllPanes = () => {}; @@ -90,24 +88,24 @@ describe("OpenActions", () => { }); describe("AddCollection pane kind", () => { - it("string value should call addCollectionPane.open", () => { + it("string value should call explorer.onNewCollectionClicked", () => { const action = { actionType: "OpenPane", paneKind: "AddCollection", }; const actionHandled = handleOpenAction(action, [], explorer); - expect(explorer.addCollectionPane.open).toHaveBeenCalled(); + expect(explorer.onNewCollectionClicked).toHaveBeenCalled(); }); - it("enum value should call addCollectionPane.open", () => { + it("enum value should call explorer.onNewCollectionClicked", () => { const action = { actionType: "OpenPane", paneKind: ActionContracts.PaneKind.AddCollection, }; const actionHandled = handleOpenAction(action, [], explorer); - expect(explorer.addCollectionPane.open).toHaveBeenCalled(); + expect(explorer.onNewCollectionClicked).toHaveBeenCalled(); }); }); }); diff --git a/src/Explorer/OpenActions.ts b/src/Explorer/OpenActions.ts index 4742978cc..8a7c87f53 100644 --- a/src/Explorer/OpenActions.ts +++ b/src/Explorer/OpenActions.ts @@ -141,7 +141,7 @@ function openPane(action: ActionContracts.OpenPane, explorer: Explorer) { (action).paneKind === ActionContracts.PaneKind[ActionContracts.PaneKind.AddCollection] ) { explorer.closeAllPanes(); - explorer.addCollectionPane.open(); + explorer.onNewCollectionClicked(); } else if ( action.paneKind === ActionContracts.PaneKind.CassandraAddCollection || (action).paneKind === ActionContracts.PaneKind[ActionContracts.PaneKind.CassandraAddCollection] diff --git a/src/Explorer/Panes/AddCollectionPane.html b/src/Explorer/Panes/AddCollectionPane.html index 8f917cafd..4bba48d36 100644 --- a/src/Explorer/Panes/AddCollectionPane.html +++ b/src/Explorer/Panes/AddCollectionPane.html @@ -143,7 +143,6 @@ size="40" class="collid" data-bind="visible: databaseCreateNew, textInput: databaseId, hasFocus: firstFieldHasFocus" - aria-label="Database id" autofocus /> @@ -161,7 +160,6 @@ size="40" class="collid" data-bind="visible: !databaseCreateNew(), textInput: databaseId, hasFocus: firstFieldHasFocus" - aria-label="Database id" /> @@ -246,7 +244,7 @@ placeholder="e.g., Container1" size="40" class="textfontclr collid" - data-bind="value: collectionId, attr: { 'aria-label': collectionIdTitle }" + data-bind="value: collectionId" />
@@ -352,7 +350,6 @@ attr: { placeholder: partitionKeyPlaceholder, required: partitionKeyVisible(), - 'aria-label': partitionKeyName, pattern: partitionKeyPattern, title: partitionKeyTitle }" diff --git a/src/Explorer/Panes/AddCollectionPane.ts b/src/Explorer/Panes/AddCollectionPane.ts index e8e1eaf6b..8085d885a 100644 --- a/src/Explorer/Panes/AddCollectionPane.ts +++ b/src/Explorer/Panes/AddCollectionPane.ts @@ -476,7 +476,6 @@ export default class AddCollectionPane extends ContextualPaneBase { userContext.portalEnv, this.isFreeTierAccount(), this.container.isFirstResourceCreated(), - userContext.apiType, true ); }); diff --git a/src/Explorer/Panes/AddCollectionPanel.tsx b/src/Explorer/Panes/AddCollectionPanel.tsx index fdbb8c931..271de5d69 100644 --- a/src/Explorer/Panes/AddCollectionPanel.tsx +++ b/src/Explorer/Panes/AddCollectionPanel.tsx @@ -8,6 +8,7 @@ import { IconButton, IDropdownOption, Link, + Separator, Stack, Text, TooltipHost, @@ -23,6 +24,7 @@ import { CollectionCreation, IndexingPolicies } from "../../Shared/Constants"; import { Action } from "../../Shared/Telemetry/TelemetryConstants"; import * as TelemetryProcessor from "../../Shared/Telemetry/TelemetryProcessor"; import { userContext } from "../../UserContext"; +import { getCollectionName } from "../../Utils/APITypeUtils"; import { getUpsellMessage } from "../../Utils/PricingUtils"; import { CollapsibleSectionComponent } from "../Controls/CollapsiblePanel/CollapsibleSectionComponent"; import { ThroughputInput } from "../Controls/ThroughputInput/ThroughputInput"; @@ -35,6 +37,7 @@ export interface AddCollectionPanelProps { explorer: Explorer; closePanel: () => void; openNotificationConsole: () => void; + databaseId?: string; } export interface AddCollectionPanelState { @@ -48,7 +51,7 @@ export interface AddCollectionPanelState { partitionKey: string; enableDedicatedThroughput: boolean; createMongoWildCardIndex: boolean; - useHashV1: boolean; + useHashV2: boolean; enableAnalyticalStore: boolean; uniqueKeys: string[]; errorMessage: string; @@ -67,17 +70,18 @@ export class AddCollectionPanel extends React.Component - Database id + Database {userContext.apiType === "Mongo" ? "name" : "id"} - + @@ -140,7 +140,6 @@ export class AddCollectionPanel extends React.Component @@ -154,8 +153,6 @@ export class AddCollectionPanel extends React.Component @@ -166,8 +163,7 @@ export class AddCollectionPanel extends React.Component ) => @@ -188,7 +184,7 @@ export class AddCollectionPanel extends React.Component - + )} @@ -214,6 +212,7 @@ export class AddCollectionPanel extends React.Component (this.newDatabaseThroughput = throughput)} setIsAutoscale={(isAutoscale: boolean) => (this.isNewDatabaseAutoscale = isAutoscale)} onCostAcknowledgeChange={(isAcknowledge: boolean) => (this.isCostAcknowledged = isAcknowledge)} @@ -230,38 +229,40 @@ export class AddCollectionPanel extends React.Component, database: IDropdownOption) => this.setState({ selectedDatabaseId: database.key as string }) } + defaultSelectedKey={this.props.databaseId} + responsiveMode={999} /> )} + - {`${this.getCollectionName()} id`} + {`${getCollectionName()} ${userContext.apiType === "Mongo" ? "name" : "id"}`} - + ) => this.setState({ collectionId: event.target.value }) @@ -320,13 +321,15 @@ export class AddCollectionPanel extends React.Component - Sharding options + Sharding - + @@ -371,18 +374,15 @@ export class AddCollectionPanel extends React.Component - + ) => - this.setState({ partitionKey: event.target.value }) - } + onChange={(event: React.ChangeEvent) => { + if ( + userContext.apiType !== "Mongo" && + this.state.partitionKey === "" && + !event.target.value.startsWith("/") + ) { + this.setState({ partitionKey: "/" + event.target.value }); + } else { + this.setState({ partitionKey: event.target.value }); + } + }} /> )} @@ -402,7 +410,7 @@ export class AddCollectionPanel extends React.Component - + )} @@ -431,6 +441,7 @@ export class AddCollectionPanel extends React.Component (this.collectionThroughput = throughput)} setIsAutoscale={(isAutoscale: boolean) => (this.isCollectionAutoscale = isAutoscale)} onCostAcknowledgeChange={(isAcknowledged: boolean) => { @@ -451,7 +462,7 @@ export class AddCollectionPanel extends React.Component - + @@ -504,134 +515,129 @@ export class AddCollectionPanel extends React.Component )} - - - {this.props.explorer.isEnableMongoCapabilityPresent() && ( - - - - - Indexing - - - - - + {userContext.apiType !== "Tables" && ( + { + TelemetryProcessor.traceOpen(Action.ExpandAddCollectionPaneAdvancedSection); + this.scrollToAdvancedSection(); + }} + > + + {this.props.explorer.isEnableMongoCapabilityPresent() && ( + + + + + Indexing + + + + + + , isChecked: boolean) => + this.setState({ createMongoWildCardIndex: isChecked }) + } + /> + + )} + + {userContext.apiType === "SQL" && ( , isChecked: boolean) => - this.setState({ createMongoWildCardIndex: isChecked }) + this.setState({ useHashV2: isChecked }) } /> - - )} + )} - {userContext.apiType === "SQL" && ( - - - , isChecked: boolean) => - this.setState({ useHashV1: isChecked }) - } - /> - - My application uses an older Cosmos .NET or Java SDK version (.NET V1 or Java V2) - - - - - To ensure compatibility with older SDKs, the created container will use a legacy partitioning scheme - that supports partition key values of size up to 100 bytes.{" "} - - Learn more - - - - )} - - {this.shouldShowAnalyticalStoreOptions() && ( - - - - Analytical store - - - - - - - - - On - - - Off - - - {!this.isSynapseLinkEnabled() && ( - - - Azure Synapse Link is required for creating an analytical store container. Enable Synapse Link - for this Cosmos DB account.{" "} - - Learn more - + {this.shouldShowAnalyticalStoreOptions() && ( + + + + Analytical store - this.props.explorer.openEnableSynapseLinkDialog()} - style={{ height: 27, width: 80 }} - styles={{ label: { fontSize: 12 } }} - /> + + + - )} - - )} - - + + + + On + + + Off + + + {!this.isSynapseLinkEnabled() && ( + + + Azure Synapse Link is required for creating an analytical store{" "} + {getCollectionName().toLocaleLowerCase()}. Enable Synapse Link for this Cosmos DB account.{" "} + + Learn more + + + this.props.explorer.openEnableSynapseLinkDialog()} + style={{ height: 27, width: 80 }} + styles={{ label: { fontSize: 12 } }} + /> + + )} + + )} + + + )} @@ -648,24 +654,10 @@ export class AddCollectionPanel extends React.Component + Enable analytical store capability to perform near real-time analytics on your operational data, without + impacting the performance of transactional workloads.{" "} + + Learn more + + + ); + } + private shouldShowCollectionThroughputInput(): boolean { if (this.isServerlessAccount()) { return false; @@ -879,6 +899,11 @@ export class AddCollectionPanel extends React.Component CollectionCreation.MaxRUPerPartition && !this.state.isSharded) { + this.setState({ errorMessage: "Unsharded collections support up to 10,000 RUs" }); + return false; + } + if ( userContext.apiType === "Gremlin" && (this.state.partitionKey === "/id" || this.state.partitionKey === "/label") @@ -905,6 +930,10 @@ export class AddCollectionPanel extends React.Component): Promise { event.preventDefault(); @@ -923,7 +952,7 @@ export class AddCollectionPanel extends React.Component void; } export const DeleteCollectionConfirmationPane: FunctionComponent = ({ explorer, closePanel, - collectionName, }: DeleteCollectionConfirmationPaneProps) => { const [deleteCollectionFeedback, setDeleteCollectionFeedback] = useState(""); const [inputCollectionName, setInputCollectionName] = useState(""); @@ -34,6 +33,7 @@ export const DeleteCollectionConfirmationPane: FunctionComponent { return explorer.isLastCollection() && !explorer.isSelectedDatabaseShared(); }; + const collectionName = getCollectionName().toLocaleLowerCase(); const paneTitle = "Delete " + collectionName; const submit = async (): Promise => { const collection = explorer.findSelectedCollection(); diff --git a/src/Explorer/Panes/PanelComponent.less b/src/Explorer/Panes/PanelComponent.less index 03ea9dd6d..2421fe68b 100644 --- a/src/Explorer/Panes/PanelComponent.less +++ b/src/Explorer/Panes/PanelComponent.less @@ -11,11 +11,11 @@ margin: 20px 0; overflow: auto; - & > * { + & > :not(.collapsibleSection) { margin-bottom: @DefaultSpace; - & > * { - margin-bottom: @SmallSpace; + & > :not(:last-child) { + margin-bottom: @DefaultSpace; } } @@ -23,7 +23,6 @@ font-size: @mediumFontSize; width: @mediumFontSize; margin: auto 0 auto @SmallSpace; - color: @InfoIconColor; cursor: default; vertical-align: middle; } @@ -49,10 +48,6 @@ font-size: @mediumFontSize; padding: 0 @LargeSpace 0 @SmallSpace; } - - .collapsibleSection { - margin-bottom: 0; - } } } @@ -99,7 +94,7 @@ } .panelFooter { - padding: 20px 34px; + padding: 16px 34px; border-top: solid 1px #bbbbbb; & button { @@ -123,8 +118,8 @@ cursor: pointer; } -.panelGroupSpacing > * { - margin-bottom: @SmallSpace; +.panelGroupSpacing > :not(:last-child) { + margin-bottom: @DefaultSpace; } .fileUpload { display: none !important; @@ -170,3 +165,6 @@ .column-select-view { margin: 20px 0px 0px 0px; } +.panelSeparator::before { + background-color: #edebe9; +} diff --git a/src/Explorer/Panes/PanelInfoErrorComponent.tsx b/src/Explorer/Panes/PanelInfoErrorComponent.tsx index 97282b12e..150fbcc25 100644 --- a/src/Explorer/Panes/PanelInfoErrorComponent.tsx +++ b/src/Explorer/Panes/PanelInfoErrorComponent.tsx @@ -1,5 +1,5 @@ -import React from "react"; import { Icon, Link, Stack, Text } from "office-ui-fabric-react"; +import React from "react"; export interface PanelInfoErrorProps { message: string; @@ -23,7 +23,7 @@ export const PanelInfoErrorComponent: React.FunctionComponent + {icon} diff --git a/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap b/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap index 88da6e77a..022b8e7c4 100644 --- a/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap +++ b/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap @@ -525,7 +525,7 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
this.isDataNodeSelected(database.id()), - contextMenu: ResourceTreeContextMenuButtonFactory.createDatabaseContextMenu(this.container), + contextMenu: ResourceTreeContextMenuButtonFactory.createDatabaseContextMenu(this.container, database.id()), onClick: async (isExpanded) => { // Rewritten version of expandCollapseDatabase(): if (isExpanded) { diff --git a/src/Shared/Telemetry/TelemetryConstants.ts b/src/Shared/Telemetry/TelemetryConstants.ts index f14cfaf7e..5500118ce 100644 --- a/src/Shared/Telemetry/TelemetryConstants.ts +++ b/src/Shared/Telemetry/TelemetryConstants.ts @@ -115,6 +115,7 @@ export enum Action { NotebooksGalleryFavoritesCount, NotebooksGalleryPublishedCount, SelfServe, + ExpandAddCollectionPaneAdvancedSection, } export const ActionModifiers = { diff --git a/src/UserContext.ts b/src/UserContext.ts index 20596249e..45b1a805e 100644 --- a/src/UserContext.ts +++ b/src/UserContext.ts @@ -19,7 +19,7 @@ interface UserContext { readonly quotaId?: string; // API Type is not yet provided by ARM. You need to manually inspect all the capabilities+kind so we abstract that logic in userContext // This is coming in a future Cosmos ARM API version as a prperty on databaseAccount - apiType?: ApiType; + apiType: ApiType; readonly isTryCosmosDBSubscription?: boolean; readonly portalEnv?: PortalEnv; readonly features: Features; diff --git a/src/Utils/APITypeUtils.ts b/src/Utils/APITypeUtils.ts new file mode 100644 index 000000000..c321bd98b --- /dev/null +++ b/src/Utils/APITypeUtils.ts @@ -0,0 +1,30 @@ +import { userContext } from "../UserContext"; + +export const getCollectionName = (isPlural?: boolean): string => { + let collectionName: string; + let unknownApiType: never; + switch (userContext.apiType) { + case "SQL": + collectionName = "Container"; + break; + case "Mongo": + collectionName = "Collection"; + break; + case "Cassandra": + case "Tables": + collectionName = "Table"; + break; + case "Gremlin": + collectionName = "Graph"; + break; + default: + unknownApiType = userContext.apiType; + throw new Error(`Unknown API type: ${unknownApiType}`); + } + + if (isPlural) { + collectionName += "s"; + } + + return collectionName; +}; diff --git a/src/Utils/PricingUtils.ts b/src/Utils/PricingUtils.ts index ea8e0011b..a3b75e2e7 100644 --- a/src/Utils/PricingUtils.ts +++ b/src/Utils/PricingUtils.ts @@ -1,4 +1,5 @@ import * as Constants from "../Shared/Constants"; +import { getCollectionName } from "../Utils/APITypeUtils"; import * as AutoPilotUtils from "../Utils/AutoPilotUtils"; interface ComputeRUUsagePriceHourlyArgs { @@ -10,7 +11,7 @@ interface ComputeRUUsagePriceHourlyArgs { } export const estimatedCostDisclaimer = - "*This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account"; + "This cost is an estimate and may vary based on the regions where your account is deployed and potential discounts applied to your account"; /** * Anything that is not a number should return 0 @@ -161,7 +162,7 @@ export function getAutoPilotV3SpendHtml(maxAutoPilotThroughputSet: number, isDat return ""; } - const resource: string = isDatabaseThroughput ? "database" : "container"; + const resource: string = isDatabaseThroughput ? "database" : getCollectionName().toLocaleLowerCase(); return `Your ${resource} throughput will automatically scale from ${AutoPilotUtils.getMinRUsBasedOnUserInput( maxAutoPilotThroughputSet )} RU/s (10% of max RU/s) - ${maxAutoPilotThroughputSet} RU/s based on usage.

After the first ${AutoPilotUtils.getStorageBasedOnUserInput( @@ -227,7 +228,7 @@ export function getEstimatedSpendHtml( `${currencySign}${calculateEstimateNumber(monthlyPrice)} monthly
` + `(${regions} ${regions === 1 ? "region" : "regions"}, ${throughput}RU/s, ${currencySign}${pricePerRu}/RU)` + `

` + - `${estimatedCostDisclaimer}

` + `*${estimatedCostDisclaimer}

` ); } @@ -261,11 +262,10 @@ export function getUpsellMessage( serverId = "default", isFreeTier = false, isFirstResourceCreated = false, - defaultExperience: string, isCollection: boolean ): string { if (isFreeTier) { - const collectionName = getCollectionName(defaultExperience); + const collectionName = getCollectionName().toLocaleLowerCase(); const resourceType = isCollection ? collectionName : "database"; return isFirstResourceCreated ? `The free tier discount of 400 RU/s has already been applied to a database or ${collectionName} in this account. Billing will apply to this ${resourceType} after it is created.` @@ -277,22 +277,8 @@ export function getUpsellMessage( price = Constants.OfferPricing.MonthlyPricing.mooncake.Standard.StartingPrice; } - return `Start at ${getCurrencySign(serverId)}${price}/mo per database, multiple containers included`; - } -} - -export function getCollectionName(defaultExperience: string): string { - switch (defaultExperience) { - case "SQL": - return "container"; - case "Mongo": - return "collection"; - case "Tables": - case "Cassandra": - return "table"; - case "Gremlin": - return "graph"; - default: - throw Error("unknown API type"); + return `Start at ${getCurrencySign(serverId)}${price}/mo per database, multiple ${getCollectionName( + true + ).toLocaleLowerCase()} included`; } } diff --git a/test/mongo/container.spec.ts b/test/mongo/container.spec.ts index d2f20358f..02ca87d52 100644 --- a/test/mongo/container.spec.ts +++ b/test/mongo/container.spec.ts @@ -16,15 +16,10 @@ test("Mongo CRUD", async () => { // Create new database and collection await explorer.click('[data-test="New Collection"]'); - await explorer.click('[data-test="addCollection-newDatabaseId"]'); - await explorer.fill('[data-test="addCollection-newDatabaseId"]', databaseId); - await explorer.click('[data-test="addCollection-collectionId"]'); - await explorer.fill('[data-test="addCollection-collectionId"]', containerId); - await explorer.click('[data-test="addCollection-collectionId"]'); - await explorer.fill('[data-test="addCollection-collectionId"]', containerId); - await explorer.click('[data-test="addCollection-partitionKeyValue"]'); - await explorer.fill('[data-test="addCollection-partitionKeyValue"]', "/pk"); - await explorer.click('[data-test="addCollection-createCollection"]'); + await explorer.fill('[aria-label="New database id"]', databaseId); + await explorer.fill('[aria-label="Collection id"]', containerId); + await explorer.fill('[aria-label="Shard key"]', "/pk"); + await explorer.click("#sidePanelOkButton"); await safeClick(explorer, `.nodeItem >> text=${databaseId}`); await safeClick(explorer, `.nodeItem >> text=${containerId}`); // Create indexing policy diff --git a/test/sql/container.spec.ts b/test/sql/container.spec.ts index 689bd3196..5bec9cdef 100644 --- a/test/sql/container.spec.ts +++ b/test/sql/container.spec.ts @@ -15,15 +15,10 @@ test("SQL CRUD", async () => { }); await explorer.click('[data-test="New Container"]'); - await explorer.click('[data-test="addCollection-newDatabaseId"]'); - await explorer.fill('[data-test="addCollection-newDatabaseId"]', databaseId); - await explorer.click('[data-test="addCollection-collectionId"]'); - await explorer.fill('[data-test="addCollection-collectionId"]', containerId); - await explorer.click('[data-test="addCollection-collectionId"]'); - await explorer.fill('[data-test="addCollection-collectionId"]', containerId); - await explorer.click('[data-test="addCollection-partitionKeyValue"]'); - await explorer.fill('[data-test="addCollection-partitionKeyValue"]', "/pk"); - await explorer.click('[data-test="addCollection-createCollection"]'); + await explorer.fill('[aria-label="New database id"]', databaseId); + await explorer.fill('[aria-label="Container id"]', containerId); + await explorer.fill('[aria-label="Partition key"]', "/pk"); + await explorer.click("#sidePanelOkButton"); await safeClick(explorer, `.nodeItem >> text=${databaseId}`); await safeClick(explorer, `[data-test="${containerId}"] [aria-label="More"]`); await safeClick(explorer, 'button[role="menuitem"]:has-text("Delete Container")'); diff --git a/test/tables/container.spec.ts b/test/tables/container.spec.ts index d679b89b6..33362c0e6 100644 --- a/test/tables/container.spec.ts +++ b/test/tables/container.spec.ts @@ -15,9 +15,8 @@ test("Tables CRUD", async () => { }); await explorer.click('[data-test="New Table"]'); - await explorer.click('[data-test="addCollection-collectionId"]'); - await explorer.fill('[data-test="addCollection-collectionId"]', tableId); - await explorer.click('[data-test="addCollection-createCollection"]'); + await explorer.fill('[aria-label="Table id"]', tableId); + await explorer.click("#sidePanelOkButton"); await safeClick(explorer, `[data-test="TablesDB"]`); await safeClick(explorer, `[data-test="${tableId}"] [aria-label="More"]`); await safeClick(explorer, 'button[role="menuitem"]:has-text("Delete Table")'); From 038f3ee6842e4547a57172038608dd1cf7a4ad14 Mon Sep 17 00:00:00 2001 From: vaidankarswapnil <81285216+vaidankarswapnil@users.noreply.github.com> Date: Tue, 4 May 2021 06:26:47 +0530 Subject: [PATCH 5/5] Move GitHub repos panel to react (#638) Co-authored-by: Steve Faulkner --- src/Explorer/ComponentRegisterer.ts | 1 - .../Controls/GitHub/GitHubReposComponent.tsx | 13 - .../Controls/GitHub/GitHubStyleConstants.ts | 15 +- .../SettingsComponent.test.tsx.snap | 3092 ++++++++++++++++- src/Explorer/Explorer.tsx | 48 +- .../CommandBarComponentButtonFactory.tsx | 12 +- src/Explorer/Notebook/NotebookManager.tsx | 19 +- src/Explorer/Panes/GitHubReposPane.html | 14 - .../GitHubReposPanel.test.tsx | 19 + .../GitHubReposPanel.tsx} | 300 +- .../GitHubReposPanel.test.tsx.snap | 1319 +++++++ src/Explorer/Panes/PaneComponents.ts | 10 - .../StringInputPane.test.tsx.snap | 773 ++++- ...eteDatabaseConfirmationPanel.test.tsx.snap | 773 ++++- src/Explorer/Tree/ResourceTreeAdapter.tsx | 2 +- src/Main.tsx | 4 - src/koComment.tsx | 20 - 17 files changed, 6231 insertions(+), 203 deletions(-) delete mode 100644 src/Explorer/Panes/GitHubReposPane.html create mode 100644 src/Explorer/Panes/GitHubReposPanel/GitHubReposPanel.test.tsx rename src/Explorer/Panes/{GitHubReposPane.ts => GitHubReposPanel/GitHubReposPanel.tsx} (52%) create mode 100644 src/Explorer/Panes/GitHubReposPanel/__snapshots__/GitHubReposPanel.test.tsx.snap delete mode 100644 src/koComment.tsx diff --git a/src/Explorer/ComponentRegisterer.ts b/src/Explorer/ComponentRegisterer.ts index 82d5bdcfa..af9ef47a7 100644 --- a/src/Explorer/ComponentRegisterer.ts +++ b/src/Explorer/ComponentRegisterer.ts @@ -25,4 +25,3 @@ ko.components.register("graph-styling-pane", new PaneComponents.GraphStylingPane ko.components.register("table-add-entity-pane", new PaneComponents.TableAddEntityPaneComponent()); ko.components.register("table-edit-entity-pane", new PaneComponents.TableEditEntityPaneComponent()); ko.components.register("cassandra-add-collection-pane", new PaneComponents.CassandraAddCollectionPaneComponent()); -ko.components.register("github-repos-pane", new PaneComponents.GitHubReposPaneComponent()); diff --git a/src/Explorer/Controls/GitHub/GitHubReposComponent.tsx b/src/Explorer/Controls/GitHub/GitHubReposComponent.tsx index 7a87f4246..a75fe5060 100644 --- a/src/Explorer/Controls/GitHub/GitHubReposComponent.tsx +++ b/src/Explorer/Controls/GitHub/GitHubReposComponent.tsx @@ -23,8 +23,6 @@ export interface RepoListItem { } export class GitHubReposComponent extends React.Component { - public static readonly ConnectToGitHubTitle = "Connect to GitHub"; - public static readonly ManageGitHubRepoTitle = "Manage GitHub settings"; private static readonly ManageGitHubRepoDescription = "Select your GitHub repos and branch(es) to pin to your notebooks workspace."; private static readonly ManageGitHubRepoResetConnection = "View or change your GitHub authorization settings."; @@ -32,14 +30,6 @@ export class GitHubReposComponent extends React.Component - {this.props.showAuthorizeAccess - ? GitHubReposComponent.ConnectToGitHubTitle - : GitHubReposComponent.ManageGitHubRepoTitle} -

- ); - const content: JSX.Element = this.props.showAuthorizeAccess ? ( ) : ( @@ -66,9 +56,6 @@ export class GitHubReposComponent extends React.Component -
- {header} -
{content}
{!this.props.showAuthorizeAccess && ( <> diff --git a/src/Explorer/Controls/GitHub/GitHubStyleConstants.ts b/src/Explorer/Controls/GitHub/GitHubStyleConstants.ts index 25866271d..190719325 100644 --- a/src/Explorer/Controls/GitHub/GitHubStyleConstants.ts +++ b/src/Explorer/Controls/GitHub/GitHubStyleConstants.ts @@ -1,19 +1,21 @@ import { - IStyleFunctionOrObject, ICheckboxStyleProps, ICheckboxStyles, - IDropdownStyles, IDropdownStyleProps, + IDropdownStyles, + IStyleFunctionOrObject, } from "office-ui-fabric-react"; export const ButtonsFooterStyle: React.CSSProperties = { - padding: 14, + paddingTop: 14, height: "auto", + borderTop: "2px solid lightGray", }; export const ContentFooterStyle: React.CSSProperties = { - padding: "10px 24px 10px 24px", + paddingTop: "10px", height: "auto", + borderTop: "2px solid lightGray", }; export const ChildrenMargin = 10; @@ -53,6 +55,11 @@ export const BranchesDropdownOptionContainerStyle: React.CSSProperties = { padding: 8, }; +export const ContentMainStyle: React.CSSProperties = { + display: "flex", + flexDirection: "column", +}; + export const ReposListRepoColumnMinWidth = 192; export const ReposListBranchesColumnWidth = 116; export const BranchesDropdownWidth = 200; diff --git a/src/Explorer/Controls/Settings/__snapshots__/SettingsComponent.test.tsx.snap b/src/Explorer/Controls/Settings/__snapshots__/SettingsComponent.test.tsx.snap index 30cd9914c..f116d83f7 100644 --- a/src/Explorer/Controls/Settings/__snapshots__/SettingsComponent.test.tsx.snap +++ b/src/Explorer/Controls/Settings/__snapshots__/SettingsComponent.test.tsx.snap @@ -427,6 +427,773 @@ exports[`SettingsComponent renders 1`] = ` "defaultExperience": [Function], "deleteCollectionText": [Function], "deleteDatabaseText": [Function], + "gitHubClient": GitHubClient { + "errorCallback": [Function], + "ocktokit": OctokitWithDefaults { + "actions": Object { + "addSelectedRepoToOrgSecret": [Function], + "cancelWorkflowRun": [Function], + "createOrUpdateOrgSecret": [Function], + "createOrUpdateRepoSecret": [Function], + "createOrUpdateSecretForRepo": [Function], + "createRegistrationToken": [Function], + "createRegistrationTokenForOrg": [Function], + "createRegistrationTokenForRepo": [Function], + "createRemoveToken": [Function], + "createRemoveTokenForOrg": [Function], + "createRemoveTokenForRepo": [Function], + "deleteArtifact": [Function], + "deleteOrgSecret": [Function], + "deleteRepoSecret": [Function], + "deleteSecretFromRepo": [Function], + "deleteSelfHostedRunnerFromOrg": [Function], + "deleteSelfHostedRunnerFromRepo": [Function], + "deleteWorkflowRunLogs": [Function], + "downloadArtifact": [Function], + "downloadJobLogsForWorkflowRun": [Function], + "downloadWorkflowJobLogs": [Function], + "downloadWorkflowRunLogs": [Function], + "getArtifact": [Function], + "getJobForWorkflowRun": [Function], + "getOrgPublicKey": [Function], + "getOrgSecret": [Function], + "getPublicKey": [Function], + "getRepoPublicKey": [Function], + "getRepoSecret": [Function], + "getSecret": [Function], + "getSelfHostedRunner": [Function], + "getSelfHostedRunnerForOrg": [Function], + "getSelfHostedRunnerForRepo": [Function], + "getWorkflow": [Function], + "getWorkflowJob": [Function], + "getWorkflowRun": [Function], + "getWorkflowRunUsage": [Function], + "getWorkflowUsage": [Function], + "listArtifactsForRepo": [Function], + "listDownloadsForSelfHostedRunnerApplication": [Function], + "listJobsForWorkflowRun": [Function], + "listOrgSecrets": [Function], + "listRepoSecrets": [Function], + "listRepoWorkflowRuns": [Function], + "listRepoWorkflows": [Function], + "listRunnerApplicationsForOrg": [Function], + "listRunnerApplicationsForRepo": [Function], + "listSecretsForRepo": [Function], + "listSelectedReposForOrgSecret": [Function], + "listSelfHostedRunnersForOrg": [Function], + "listSelfHostedRunnersForRepo": [Function], + "listWorkflowJobLogs": [Function], + "listWorkflowRunArtifacts": [Function], + "listWorkflowRunLogs": [Function], + "listWorkflowRuns": [Function], + "listWorkflowRunsForRepo": [Function], + "reRunWorkflow": [Function], + "removeSelectedRepoFromOrgSecret": [Function], + "removeSelfHostedRunner": [Function], + "setSelectedReposForOrgSecret": [Function], + }, + "activity": Object { + "checkRepoIsStarredByAuthenticatedUser": [Function], + "checkStarringRepo": [Function], + "deleteRepoSubscription": [Function], + "deleteThreadSubscription": [Function], + "getFeeds": [Function], + "getRepoSubscription": [Function], + "getThread": [Function], + "getThreadSubscription": [Function], + "getThreadSubscriptionForAuthenticatedUser": [Function], + "listEventsForAuthenticatedUser": [Function], + "listEventsForOrg": [Function], + "listEventsForUser": [Function], + "listFeeds": [Function], + "listNotifications": [Function], + "listNotificationsForAuthenticatedUser": [Function], + "listNotificationsForRepo": [Function], + "listOrgEventsForAuthenticatedUser": [Function], + "listPublicEvents": [Function], + "listPublicEventsForOrg": [Function], + "listPublicEventsForRepoNetwork": [Function], + "listPublicEventsForUser": [Function], + "listPublicOrgEvents": [Function], + "listReceivedEventsForUser": [Function], + "listReceivedPublicEventsForUser": [Function], + "listRepoEvents": [Function], + "listRepoNotificationsForAuthenticatedUser": [Function], + "listReposStarredByAuthenticatedUser": [Function], + "listReposStarredByUser": [Function], + "listReposWatchedByUser": [Function], + "listStargazersForRepo": [Function], + "listWatchedReposForAuthenticatedUser": [Function], + "listWatchersForRepo": [Function], + "markAsRead": [Function], + "markNotificationsAsRead": [Function], + "markNotificationsAsReadForRepo": [Function], + "markRepoNotificationsAsRead": [Function], + "markThreadAsRead": [Function], + "setRepoSubscription": [Function], + "setThreadSubscription": [Function], + "starRepo": [Function], + "starRepoForAuthenticatedUser": [Function], + "unstarRepo": [Function], + "unstarRepoForAuthenticatedUser": [Function], + }, + "apps": Object { + "addRepoToInstallation": [Function], + "checkAccountIsAssociatedWithAny": [Function], + "checkAccountIsAssociatedWithAnyStubbed": [Function], + "checkToken": [Function], + "createContentAttachment": [Function], + "createFromManifest": [Function], + "createInstallationAccessToken": [Function], + "createInstallationToken": [Function], + "deleteAuthorization": [Function], + "deleteInstallation": [Function], + "deleteToken": [Function], + "getAuthenticated": [Function], + "getBySlug": [Function], + "getInstallation": [Function], + "getOrgInstallation": [Function], + "getRepoInstallation": [Function], + "getSubscriptionPlanForAccount": [Function], + "getSubscriptionPlanForAccountStubbed": [Function], + "getUserInstallation": [Function], + "listAccountsForPlan": [Function], + "listAccountsForPlanStubbed": [Function], + "listAccountsUserOrOrgOnPlan": [Function], + "listAccountsUserOrOrgOnPlanStubbed": [Function], + "listInstallationReposForAuthenticatedUser": [Function], + "listInstallations": [Function], + "listInstallationsForAuthenticatedUser": [Function], + "listMarketplacePurchasesForAuthenticatedUser": [Function], + "listMarketplacePurchasesForAuthenticatedUserStubbed": [Function], + "listPlans": [Function], + "listPlansStubbed": [Function], + "listRepos": [Function], + "listReposAccessibleToInstallation": [Function], + "listSubscriptionsForAuthenticatedUser": [Function], + "listSubscriptionsForAuthenticatedUserStubbed": [Function], + "removeRepoFromInstallation": [Function], + "resetToken": [Function], + "revokeInstallationAccessToken": [Function], + "revokeInstallationToken": [Function], + "suspendInstallation": [Function], + "unsuspendInstallation": [Function], + }, + "auth": [Function], + "checks": Object { + "create": [Function], + "createSuite": [Function], + "get": [Function], + "getSuite": [Function], + "listAnnotations": [Function], + "listForRef": [Function], + "listForSuite": [Function], + "listSuitesForRef": [Function], + "rerequestSuite": [Function], + "setSuitesPreferences": [Function], + "update": [Function], + }, + "codeScanning": Object { + "getAlert": [Function], + "listAlertsForRepo": [Function], + }, + "codesOfConduct": Object { + "getAllCodesOfConduct": [Function], + "getConductCode": [Function], + "getForRepo": [Function], + "listConductCodes": [Function], + }, + "emojis": Object { + "get": [Function], + }, + "gists": Object { + "checkIsStarred": [Function], + "create": [Function], + "createComment": [Function], + "delete": [Function], + "deleteComment": [Function], + "fork": [Function], + "get": [Function], + "getComment": [Function], + "getRevision": [Function], + "list": [Function], + "listComments": [Function], + "listCommits": [Function], + "listForUser": [Function], + "listForks": [Function], + "listPublic": [Function], + "listPublicForUser": [Function], + "listStarred": [Function], + "star": [Function], + "unstar": [Function], + "update": [Function], + "updateComment": [Function], + }, + "git": Object { + "createBlob": [Function], + "createCommit": [Function], + "createRef": [Function], + "createTag": [Function], + "createTree": [Function], + "deleteRef": [Function], + "getBlob": [Function], + "getCommit": [Function], + "getRef": [Function], + "getTag": [Function], + "getTree": [Function], + "listMatchingRefs": [Function], + "updateRef": [Function], + }, + "gitignore": Object { + "getAllTemplates": [Function], + "getTemplate": [Function], + "listTemplates": [Function], + }, + "graphql": [Function], + "hook": [Function], + "interactions": Object { + "addOrUpdateRestrictionsForOrg": [Function], + "addOrUpdateRestrictionsForRepo": [Function], + "getRestrictionsForOrg": [Function], + "getRestrictionsForRepo": [Function], + "removeRestrictionsForOrg": [Function], + "removeRestrictionsForRepo": [Function], + "setRestrictionsForOrg": [Function], + "setRestrictionsForRepo": [Function], + }, + "issues": Object { + "addAssignees": [Function], + "addLabels": [Function], + "checkAssignee": [Function], + "checkUserCanBeAssigned": [Function], + "create": [Function], + "createComment": [Function], + "createLabel": [Function], + "createMilestone": [Function], + "deleteComment": [Function], + "deleteLabel": [Function], + "deleteMilestone": [Function], + "get": [Function], + "getComment": [Function], + "getEvent": [Function], + "getLabel": [Function], + "getMilestone": [Function], + "list": [Function], + "listAssignees": [Function], + "listComments": [Function], + "listCommentsForRepo": [Function], + "listEvents": [Function], + "listEventsForRepo": [Function], + "listEventsForTimeline": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listForRepo": [Function], + "listLabelsForMilestone": [Function], + "listLabelsForRepo": [Function], + "listLabelsOnIssue": [Function], + "listMilestones": [Function], + "listMilestonesForRepo": [Function], + "lock": [Function], + "removeAllLabels": [Function], + "removeAssignees": [Function], + "removeLabel": [Function], + "removeLabels": [Function], + "replaceAllLabels": [Function], + "replaceLabels": [Function], + "setLabels": [Function], + "unlock": [Function], + "update": [Function], + "updateComment": [Function], + "updateLabel": [Function], + "updateMilestone": [Function], + }, + "licenses": Object { + "get": [Function], + "getAllCommonlyUsed": [Function], + "getForRepo": [Function], + "listCommonlyUsed": [Function], + }, + "log": Object { + "debug": [Function], + "error": [Function], + "info": [Function], + "warn": [Function], + }, + "markdown": Object { + "render": [Function], + "renderRaw": [Function], + }, + "meta": Object { + "get": [Function], + }, + "migrations": Object { + "cancelImport": [Function], + "deleteArchiveForAuthenticatedUser": [Function], + "deleteArchiveForOrg": [Function], + "downloadArchiveForOrg": [Function], + "getArchiveForAuthenticatedUser": [Function], + "getCommitAuthors": [Function], + "getImportProgress": [Function], + "getImportStatus": [Function], + "getLargeFiles": [Function], + "getStatusForAuthenticatedUser": [Function], + "getStatusForOrg": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listReposForOrg": [Function], + "listReposForUser": [Function], + "mapCommitAuthor": [Function], + "setLfsPreference": [Function], + "startForAuthenticatedUser": [Function], + "startForOrg": [Function], + "startImport": [Function], + "unlockRepoForAuthenticatedUser": [Function], + "unlockRepoForOrg": [Function], + "updateImport": [Function], + }, + "orgs": Object { + "addOrUpdateMembership": [Function], + "blockUser": [Function], + "checkBlockedUser": [Function], + "checkMembership": [Function], + "checkMembershipForUser": [Function], + "checkPublicMembership": [Function], + "checkPublicMembershipForUser": [Function], + "concealMembership": [Function], + "convertMemberToOutsideCollaborator": [Function], + "createHook": [Function], + "createInvitation": [Function], + "createWebhook": [Function], + "deleteHook": [Function], + "deleteWebhook": [Function], + "get": [Function], + "getHook": [Function], + "getMembership": [Function], + "getMembershipForAuthenticatedUser": [Function], + "getMembershipForUser": [Function], + "getWebhook": [Function], + "list": [Function], + "listAppInstallations": [Function], + "listBlockedUsers": [Function], + "listForAuthenticatedUser": [Function], + "listForUser": [Function], + "listHooks": [Function], + "listInstallations": [Function], + "listInvitationTeams": [Function], + "listMembers": [Function], + "listMemberships": [Function], + "listMembershipsForAuthenticatedUser": [Function], + "listOutsideCollaborators": [Function], + "listPendingInvitations": [Function], + "listPublicMembers": [Function], + "listWebhooks": [Function], + "pingHook": [Function], + "pingWebhook": [Function], + "publicizeMembership": [Function], + "removeMember": [Function], + "removeMembership": [Function], + "removeMembershipForUser": [Function], + "removeOutsideCollaborator": [Function], + "removePublicMembershipForAuthenticatedUser": [Function], + "setMembershipForUser": [Function], + "setPublicMembershipForAuthenticatedUser": [Function], + "unblockUser": [Function], + "update": [Function], + "updateHook": [Function], + "updateMembership": [Function], + "updateMembershipForAuthenticatedUser": [Function], + "updateWebhook": [Function], + }, + "paginate": [Function], + "projects": Object { + "addCollaborator": [Function], + "createCard": [Function], + "createColumn": [Function], + "createForAuthenticatedUser": [Function], + "createForOrg": [Function], + "createForRepo": [Function], + "delete": [Function], + "deleteCard": [Function], + "deleteColumn": [Function], + "get": [Function], + "getCard": [Function], + "getColumn": [Function], + "getPermissionForUser": [Function], + "listCards": [Function], + "listCollaborators": [Function], + "listColumns": [Function], + "listForOrg": [Function], + "listForRepo": [Function], + "listForUser": [Function], + "moveCard": [Function], + "moveColumn": [Function], + "removeCollaborator": [Function], + "reviewUserPermissionLevel": [Function], + "update": [Function], + "updateCard": [Function], + "updateColumn": [Function], + }, + "pulls": Object { + "checkIfMerged": [Function], + "create": [Function], + "createComment": [Function], + "createReplyForReviewComment": [Function], + "createReview": [Function], + "createReviewComment": [Function], + "createReviewCommentReply": [Function], + "createReviewRequest": [Function], + "deleteComment": [Function], + "deletePendingReview": [Function], + "deleteReviewComment": [Function], + "deleteReviewRequest": [Function], + "dismissReview": [Function], + "get": [Function], + "getComment": [Function], + "getCommentsForReview": [Function], + "getReview": [Function], + "getReviewComment": [Function], + "list": [Function], + "listComments": [Function], + "listCommentsForRepo": [Function], + "listCommentsForReview": [Function], + "listCommits": [Function], + "listFiles": [Function], + "listRequestedReviewers": [Function], + "listReviewComments": [Function], + "listReviewCommentsForRepo": [Function], + "listReviewRequests": [Function], + "listReviews": [Function], + "merge": [Function], + "removeRequestedReviewers": [Function], + "requestReviewers": [Function], + "submitReview": [Function], + "update": [Function], + "updateBranch": [Function], + "updateComment": [Function], + "updateReview": [Function], + "updateReviewComment": [Function], + }, + "rateLimit": Object { + "get": [Function], + }, + "reactions": Object { + "createForCommitComment": [Function], + "createForIssue": [Function], + "createForIssueComment": [Function], + "createForPullRequestReviewComment": [Function], + "createForTeamDiscussionCommentInOrg": [Function], + "createForTeamDiscussionInOrg": [Function], + "delete": [Function], + "deleteForCommitComment": [Function], + "deleteForIssue": [Function], + "deleteForIssueComment": [Function], + "deleteForPullRequestComment": [Function], + "deleteForTeamDiscussion": [Function], + "deleteForTeamDiscussionComment": [Function], + "deleteLegacy": [Function], + "listForCommitComment": [Function], + "listForIssue": [Function], + "listForIssueComment": [Function], + "listForPullRequestReviewComment": [Function], + "listForTeamDiscussionCommentInOrg": [Function], + "listForTeamDiscussionInOrg": [Function], + }, + "repos": Object { + "acceptInvitation": [Function], + "addAppAccessRestrictions": [Function], + "addCollaborator": [Function], + "addDeployKey": [Function], + "addProtectedBranchAdminEnforcement": [Function], + "addProtectedBranchAppRestrictions": [Function], + "addProtectedBranchRequiredSignatures": [Function], + "addProtectedBranchRequiredStatusChecksContexts": [Function], + "addProtectedBranchTeamRestrictions": [Function], + "addProtectedBranchUserRestrictions": [Function], + "addStatusCheckContexts": [Function], + "addTeamAccessRestrictions": [Function], + "addUserAccessRestrictions": [Function], + "checkCollaborator": [Function], + "checkVulnerabilityAlerts": [Function], + "compareCommits": [Function], + "createCommitComment": [Function], + "createCommitSignatureProtection": [Function], + "createCommitStatus": [Function], + "createDeployKey": [Function], + "createDeployment": [Function], + "createDeploymentStatus": [Function], + "createDispatchEvent": [Function], + "createForAuthenticatedUser": [Function], + "createFork": [Function], + "createHook": [Function], + "createInOrg": [Function], + "createOrUpdateFile": [Function], + "createOrUpdateFileContents": [Function], + "createPagesSite": [Function], + "createRelease": [Function], + "createStatus": [Function], + "createUsingTemplate": [Function], + "createWebhook": [Function], + "declineInvitation": [Function], + "delete": [Function], + "deleteAccessRestrictions": [Function], + "deleteAdminBranchProtection": [Function], + "deleteBranchProtection": [Function], + "deleteCommitComment": [Function], + "deleteCommitSignatureProtection": [Function], + "deleteDeployKey": [Function], + "deleteDeployment": [Function], + "deleteDownload": [Function], + "deleteFile": [Function], + "deleteHook": [Function], + "deleteInvitation": [Function], + "deletePagesSite": [Function], + "deletePullRequestReviewProtection": [Function], + "deleteRelease": [Function], + "deleteReleaseAsset": [Function], + "deleteWebhook": [Function], + "disableAutomatedSecurityFixes": [Function], + "disablePagesSite": [Function], + "disableVulnerabilityAlerts": [Function], + "downloadArchive": [Function], + "enableAutomatedSecurityFixes": [Function], + "enablePagesSite": [Function], + "enableVulnerabilityAlerts": [Function], + "get": [Function], + "getAccessRestrictions": [Function], + "getAdminBranchProtection": [Function], + "getAllStatusCheckContexts": [Function], + "getAllTopics": [Function], + "getAppsWithAccessToProtectedBranch": [Function], + "getArchiveLink": [Function], + "getBranch": [Function], + "getBranchProtection": [Function], + "getClones": [Function], + "getCodeFrequencyStats": [Function], + "getCollaboratorPermissionLevel": [Function], + "getCombinedStatusForRef": [Function], + "getCommit": [Function], + "getCommitActivityStats": [Function], + "getCommitComment": [Function], + "getCommitSignatureProtection": [Function], + "getCommunityProfileMetrics": [Function], + "getContent": [Function], + "getContents": [Function], + "getContributorsStats": [Function], + "getDeployKey": [Function], + "getDeployment": [Function], + "getDeploymentStatus": [Function], + "getDownload": [Function], + "getHook": [Function], + "getLatestPagesBuild": [Function], + "getLatestRelease": [Function], + "getPages": [Function], + "getPagesBuild": [Function], + "getParticipationStats": [Function], + "getProtectedBranchAdminEnforcement": [Function], + "getProtectedBranchPullRequestReviewEnforcement": [Function], + "getProtectedBranchRequiredSignatures": [Function], + "getProtectedBranchRequiredStatusChecks": [Function], + "getProtectedBranchRestrictions": [Function], + "getPullRequestReviewProtection": [Function], + "getPunchCardStats": [Function], + "getReadme": [Function], + "getRelease": [Function], + "getReleaseAsset": [Function], + "getReleaseByTag": [Function], + "getStatusChecksProtection": [Function], + "getTeamsWithAccessToProtectedBranch": [Function], + "getTopPaths": [Function], + "getTopReferrers": [Function], + "getUsersWithAccessToProtectedBranch": [Function], + "getViews": [Function], + "getWebhook": [Function], + "list": [Function], + "listAssetsForRelease": [Function], + "listBranches": [Function], + "listBranchesForHeadCommit": [Function], + "listCollaborators": [Function], + "listCommentsForCommit": [Function], + "listCommitComments": [Function], + "listCommitCommentsForRepo": [Function], + "listCommitStatusesForRef": [Function], + "listCommits": [Function], + "listContributors": [Function], + "listDeployKeys": [Function], + "listDeploymentStatuses": [Function], + "listDeployments": [Function], + "listDownloads": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listForUser": [Function], + "listForks": [Function], + "listHooks": [Function], + "listInvitations": [Function], + "listInvitationsForAuthenticatedUser": [Function], + "listLanguages": [Function], + "listPagesBuilds": [Function], + "listProtectedBranchRequiredStatusChecksContexts": [Function], + "listPublic": [Function], + "listPullRequestsAssociatedWithCommit": [Function], + "listReleaseAssets": [Function], + "listReleases": [Function], + "listStatusesForRef": [Function], + "listTags": [Function], + "listTeams": [Function], + "listTopics": [Function], + "listWebhooks": [Function], + "merge": [Function], + "pingHook": [Function], + "pingWebhook": [Function], + "removeAppAccessRestrictions": [Function], + "removeBranchProtection": [Function], + "removeCollaborator": [Function], + "removeDeployKey": [Function], + "removeProtectedBranchAdminEnforcement": [Function], + "removeProtectedBranchAppRestrictions": [Function], + "removeProtectedBranchPullRequestReviewEnforcement": [Function], + "removeProtectedBranchRequiredSignatures": [Function], + "removeProtectedBranchRequiredStatusChecks": [Function], + "removeProtectedBranchRequiredStatusChecksContexts": [Function], + "removeProtectedBranchRestrictions": [Function], + "removeProtectedBranchTeamRestrictions": [Function], + "removeProtectedBranchUserRestrictions": [Function], + "removeStatusCheckContexts": [Function], + "removeStatusCheckProtection": [Function], + "removeTeamAccessRestrictions": [Function], + "removeUserAccessRestrictions": [Function], + "replaceAllTopics": [Function], + "replaceProtectedBranchAppRestrictions": [Function], + "replaceProtectedBranchRequiredStatusChecksContexts": [Function], + "replaceProtectedBranchTeamRestrictions": [Function], + "replaceProtectedBranchUserRestrictions": [Function], + "replaceTopics": [Function], + "requestPageBuild": [Function], + "requestPagesBuild": [Function], + "retrieveCommunityProfileMetrics": [Function], + "setAdminBranchProtection": [Function], + "setAppAccessRestrictions": [Function], + "setStatusCheckContexts": [Function], + "setTeamAccessRestrictions": [Function], + "setUserAccessRestrictions": [Function], + "testPushHook": [Function], + "testPushWebhook": [Function], + "transfer": [Function], + "update": [Function], + "updateBranchProtection": [Function], + "updateCommitComment": [Function], + "updateHook": [Function], + "updateInformationAboutPagesSite": [Function], + "updateInvitation": [Function], + "updateProtectedBranchPullRequestReviewEnforcement": [Function], + "updateProtectedBranchRequiredStatusChecks": [Function], + "updatePullRequestReviewProtection": [Function], + "updateRelease": [Function], + "updateReleaseAsset": [Function], + "updateStatusCheckPotection": [Function], + "updateWebhook": [Function], + "uploadReleaseAsset": [Function], + }, + "request": [Function], + "search": Object { + "code": [Function], + "commits": [Function], + "issuesAndPullRequests": [Function], + "labels": [Function], + "repos": [Function], + "topics": [Function], + "users": [Function], + }, + "teams": Object { + "addOrUpdateMembershipForUserInOrg": [Function], + "addOrUpdateMembershipInOrg": [Function], + "addOrUpdateProjectInOrg": [Function], + "addOrUpdateProjectPermissionsInOrg": [Function], + "addOrUpdateRepoInOrg": [Function], + "addOrUpdateRepoPermissionsInOrg": [Function], + "checkManagesRepoInOrg": [Function], + "checkPermissionsForProjectInOrg": [Function], + "checkPermissionsForRepoInOrg": [Function], + "create": [Function], + "createDiscussionCommentInOrg": [Function], + "createDiscussionInOrg": [Function], + "deleteDiscussionCommentInOrg": [Function], + "deleteDiscussionInOrg": [Function], + "deleteInOrg": [Function], + "getByName": [Function], + "getDiscussionCommentInOrg": [Function], + "getDiscussionInOrg": [Function], + "getMembershipForUserInOrg": [Function], + "getMembershipInOrg": [Function], + "list": [Function], + "listChildInOrg": [Function], + "listDiscussionCommentsInOrg": [Function], + "listDiscussionsInOrg": [Function], + "listForAuthenticatedUser": [Function], + "listMembersInOrg": [Function], + "listPendingInvitationsInOrg": [Function], + "listProjectsInOrg": [Function], + "listReposInOrg": [Function], + "removeMembershipForUserInOrg": [Function], + "removeMembershipInOrg": [Function], + "removeProjectInOrg": [Function], + "removeRepoInOrg": [Function], + "reviewProjectInOrg": [Function], + "updateDiscussionCommentInOrg": [Function], + "updateDiscussionInOrg": [Function], + "updateInOrg": [Function], + }, + "users": Object { + "addEmailForAuthenticated": [Function], + "addEmails": [Function], + "block": [Function], + "checkBlocked": [Function], + "checkFollowing": [Function], + "checkFollowingForUser": [Function], + "checkPersonIsFollowedByAuthenticated": [Function], + "createGpgKey": [Function], + "createGpgKeyForAuthenticated": [Function], + "createPublicKey": [Function], + "createPublicSshKeyForAuthenticated": [Function], + "deleteEmailForAuthenticated": [Function], + "deleteEmails": [Function], + "deleteGpgKey": [Function], + "deleteGpgKeyForAuthenticated": [Function], + "deletePublicKey": [Function], + "deletePublicSshKeyForAuthenticated": [Function], + "follow": [Function], + "getAuthenticated": [Function], + "getByUsername": [Function], + "getContextForUser": [Function], + "getGpgKey": [Function], + "getGpgKeyForAuthenticated": [Function], + "getPublicKey": [Function], + "getPublicSshKeyForAuthenticated": [Function], + "list": [Function], + "listBlocked": [Function], + "listBlockedByAuthenticated": [Function], + "listEmails": [Function], + "listEmailsForAuthenticated": [Function], + "listFollowedByAuthenticated": [Function], + "listFollowersForAuthenticatedUser": [Function], + "listFollowersForUser": [Function], + "listFollowingForAuthenticatedUser": [Function], + "listFollowingForUser": [Function], + "listGpgKeys": [Function], + "listGpgKeysForAuthenticated": [Function], + "listGpgKeysForUser": [Function], + "listPublicEmails": [Function], + "listPublicEmailsForAuthenticated": [Function], + "listPublicKeys": [Function], + "listPublicKeysForUser": [Function], + "listPublicSshKeysForAuthenticated": [Function], + "setPrimaryEmailVisibilityForAuthenticated": [Function], + "togglePrimaryEmailVisibility": [Function], + "unblock": [Function], + "unfollow": [Function], + "updateAuthenticated": [Function], + }, + }, + }, "graphStylingPane": GraphStylingPane { "container": [Circular], "firstFieldHasFocus": [Function], @@ -452,7 +1219,6 @@ exports[`SettingsComponent renders 1`] = ` "isAutoscaleDefaultEnabled": [Function], "isEnableMongoCapabilityPresent": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function], - "isGitHubPaneEnabled": [Function], "isHostedDataExplorerEnabled": [Function], "isLeftPaneExpanded": [Function], "isMongoIndexingEnabled": [Function], @@ -467,9 +1233,14 @@ exports[`SettingsComponent renders 1`] = ` "isSparkEnabledForAccount": [Function], "isSynapseLinkUpdating": [Function], "isTabsContentExpanded": [Function], + "junoClient": JunoClient { + "cachedPinnedRepos": [Function], + "databaseAccount": undefined, + }, "memoryUsageInfo": [Function], "notebookBasePath": [Function], "notebookServerInfo": [Function], + "onGitHubClientError": [Function], "onRefreshDatabasesKeyPress": [Function], "onRefreshResourcesClick": [Function], "onSwitchToConnectionString": [Function], @@ -942,6 +1713,773 @@ exports[`SettingsComponent renders 1`] = ` "defaultExperience": [Function], "deleteCollectionText": [Function], "deleteDatabaseText": [Function], + "gitHubClient": GitHubClient { + "errorCallback": [Function], + "ocktokit": OctokitWithDefaults { + "actions": Object { + "addSelectedRepoToOrgSecret": [Function], + "cancelWorkflowRun": [Function], + "createOrUpdateOrgSecret": [Function], + "createOrUpdateRepoSecret": [Function], + "createOrUpdateSecretForRepo": [Function], + "createRegistrationToken": [Function], + "createRegistrationTokenForOrg": [Function], + "createRegistrationTokenForRepo": [Function], + "createRemoveToken": [Function], + "createRemoveTokenForOrg": [Function], + "createRemoveTokenForRepo": [Function], + "deleteArtifact": [Function], + "deleteOrgSecret": [Function], + "deleteRepoSecret": [Function], + "deleteSecretFromRepo": [Function], + "deleteSelfHostedRunnerFromOrg": [Function], + "deleteSelfHostedRunnerFromRepo": [Function], + "deleteWorkflowRunLogs": [Function], + "downloadArtifact": [Function], + "downloadJobLogsForWorkflowRun": [Function], + "downloadWorkflowJobLogs": [Function], + "downloadWorkflowRunLogs": [Function], + "getArtifact": [Function], + "getJobForWorkflowRun": [Function], + "getOrgPublicKey": [Function], + "getOrgSecret": [Function], + "getPublicKey": [Function], + "getRepoPublicKey": [Function], + "getRepoSecret": [Function], + "getSecret": [Function], + "getSelfHostedRunner": [Function], + "getSelfHostedRunnerForOrg": [Function], + "getSelfHostedRunnerForRepo": [Function], + "getWorkflow": [Function], + "getWorkflowJob": [Function], + "getWorkflowRun": [Function], + "getWorkflowRunUsage": [Function], + "getWorkflowUsage": [Function], + "listArtifactsForRepo": [Function], + "listDownloadsForSelfHostedRunnerApplication": [Function], + "listJobsForWorkflowRun": [Function], + "listOrgSecrets": [Function], + "listRepoSecrets": [Function], + "listRepoWorkflowRuns": [Function], + "listRepoWorkflows": [Function], + "listRunnerApplicationsForOrg": [Function], + "listRunnerApplicationsForRepo": [Function], + "listSecretsForRepo": [Function], + "listSelectedReposForOrgSecret": [Function], + "listSelfHostedRunnersForOrg": [Function], + "listSelfHostedRunnersForRepo": [Function], + "listWorkflowJobLogs": [Function], + "listWorkflowRunArtifacts": [Function], + "listWorkflowRunLogs": [Function], + "listWorkflowRuns": [Function], + "listWorkflowRunsForRepo": [Function], + "reRunWorkflow": [Function], + "removeSelectedRepoFromOrgSecret": [Function], + "removeSelfHostedRunner": [Function], + "setSelectedReposForOrgSecret": [Function], + }, + "activity": Object { + "checkRepoIsStarredByAuthenticatedUser": [Function], + "checkStarringRepo": [Function], + "deleteRepoSubscription": [Function], + "deleteThreadSubscription": [Function], + "getFeeds": [Function], + "getRepoSubscription": [Function], + "getThread": [Function], + "getThreadSubscription": [Function], + "getThreadSubscriptionForAuthenticatedUser": [Function], + "listEventsForAuthenticatedUser": [Function], + "listEventsForOrg": [Function], + "listEventsForUser": [Function], + "listFeeds": [Function], + "listNotifications": [Function], + "listNotificationsForAuthenticatedUser": [Function], + "listNotificationsForRepo": [Function], + "listOrgEventsForAuthenticatedUser": [Function], + "listPublicEvents": [Function], + "listPublicEventsForOrg": [Function], + "listPublicEventsForRepoNetwork": [Function], + "listPublicEventsForUser": [Function], + "listPublicOrgEvents": [Function], + "listReceivedEventsForUser": [Function], + "listReceivedPublicEventsForUser": [Function], + "listRepoEvents": [Function], + "listRepoNotificationsForAuthenticatedUser": [Function], + "listReposStarredByAuthenticatedUser": [Function], + "listReposStarredByUser": [Function], + "listReposWatchedByUser": [Function], + "listStargazersForRepo": [Function], + "listWatchedReposForAuthenticatedUser": [Function], + "listWatchersForRepo": [Function], + "markAsRead": [Function], + "markNotificationsAsRead": [Function], + "markNotificationsAsReadForRepo": [Function], + "markRepoNotificationsAsRead": [Function], + "markThreadAsRead": [Function], + "setRepoSubscription": [Function], + "setThreadSubscription": [Function], + "starRepo": [Function], + "starRepoForAuthenticatedUser": [Function], + "unstarRepo": [Function], + "unstarRepoForAuthenticatedUser": [Function], + }, + "apps": Object { + "addRepoToInstallation": [Function], + "checkAccountIsAssociatedWithAny": [Function], + "checkAccountIsAssociatedWithAnyStubbed": [Function], + "checkToken": [Function], + "createContentAttachment": [Function], + "createFromManifest": [Function], + "createInstallationAccessToken": [Function], + "createInstallationToken": [Function], + "deleteAuthorization": [Function], + "deleteInstallation": [Function], + "deleteToken": [Function], + "getAuthenticated": [Function], + "getBySlug": [Function], + "getInstallation": [Function], + "getOrgInstallation": [Function], + "getRepoInstallation": [Function], + "getSubscriptionPlanForAccount": [Function], + "getSubscriptionPlanForAccountStubbed": [Function], + "getUserInstallation": [Function], + "listAccountsForPlan": [Function], + "listAccountsForPlanStubbed": [Function], + "listAccountsUserOrOrgOnPlan": [Function], + "listAccountsUserOrOrgOnPlanStubbed": [Function], + "listInstallationReposForAuthenticatedUser": [Function], + "listInstallations": [Function], + "listInstallationsForAuthenticatedUser": [Function], + "listMarketplacePurchasesForAuthenticatedUser": [Function], + "listMarketplacePurchasesForAuthenticatedUserStubbed": [Function], + "listPlans": [Function], + "listPlansStubbed": [Function], + "listRepos": [Function], + "listReposAccessibleToInstallation": [Function], + "listSubscriptionsForAuthenticatedUser": [Function], + "listSubscriptionsForAuthenticatedUserStubbed": [Function], + "removeRepoFromInstallation": [Function], + "resetToken": [Function], + "revokeInstallationAccessToken": [Function], + "revokeInstallationToken": [Function], + "suspendInstallation": [Function], + "unsuspendInstallation": [Function], + }, + "auth": [Function], + "checks": Object { + "create": [Function], + "createSuite": [Function], + "get": [Function], + "getSuite": [Function], + "listAnnotations": [Function], + "listForRef": [Function], + "listForSuite": [Function], + "listSuitesForRef": [Function], + "rerequestSuite": [Function], + "setSuitesPreferences": [Function], + "update": [Function], + }, + "codeScanning": Object { + "getAlert": [Function], + "listAlertsForRepo": [Function], + }, + "codesOfConduct": Object { + "getAllCodesOfConduct": [Function], + "getConductCode": [Function], + "getForRepo": [Function], + "listConductCodes": [Function], + }, + "emojis": Object { + "get": [Function], + }, + "gists": Object { + "checkIsStarred": [Function], + "create": [Function], + "createComment": [Function], + "delete": [Function], + "deleteComment": [Function], + "fork": [Function], + "get": [Function], + "getComment": [Function], + "getRevision": [Function], + "list": [Function], + "listComments": [Function], + "listCommits": [Function], + "listForUser": [Function], + "listForks": [Function], + "listPublic": [Function], + "listPublicForUser": [Function], + "listStarred": [Function], + "star": [Function], + "unstar": [Function], + "update": [Function], + "updateComment": [Function], + }, + "git": Object { + "createBlob": [Function], + "createCommit": [Function], + "createRef": [Function], + "createTag": [Function], + "createTree": [Function], + "deleteRef": [Function], + "getBlob": [Function], + "getCommit": [Function], + "getRef": [Function], + "getTag": [Function], + "getTree": [Function], + "listMatchingRefs": [Function], + "updateRef": [Function], + }, + "gitignore": Object { + "getAllTemplates": [Function], + "getTemplate": [Function], + "listTemplates": [Function], + }, + "graphql": [Function], + "hook": [Function], + "interactions": Object { + "addOrUpdateRestrictionsForOrg": [Function], + "addOrUpdateRestrictionsForRepo": [Function], + "getRestrictionsForOrg": [Function], + "getRestrictionsForRepo": [Function], + "removeRestrictionsForOrg": [Function], + "removeRestrictionsForRepo": [Function], + "setRestrictionsForOrg": [Function], + "setRestrictionsForRepo": [Function], + }, + "issues": Object { + "addAssignees": [Function], + "addLabels": [Function], + "checkAssignee": [Function], + "checkUserCanBeAssigned": [Function], + "create": [Function], + "createComment": [Function], + "createLabel": [Function], + "createMilestone": [Function], + "deleteComment": [Function], + "deleteLabel": [Function], + "deleteMilestone": [Function], + "get": [Function], + "getComment": [Function], + "getEvent": [Function], + "getLabel": [Function], + "getMilestone": [Function], + "list": [Function], + "listAssignees": [Function], + "listComments": [Function], + "listCommentsForRepo": [Function], + "listEvents": [Function], + "listEventsForRepo": [Function], + "listEventsForTimeline": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listForRepo": [Function], + "listLabelsForMilestone": [Function], + "listLabelsForRepo": [Function], + "listLabelsOnIssue": [Function], + "listMilestones": [Function], + "listMilestonesForRepo": [Function], + "lock": [Function], + "removeAllLabels": [Function], + "removeAssignees": [Function], + "removeLabel": [Function], + "removeLabels": [Function], + "replaceAllLabels": [Function], + "replaceLabels": [Function], + "setLabels": [Function], + "unlock": [Function], + "update": [Function], + "updateComment": [Function], + "updateLabel": [Function], + "updateMilestone": [Function], + }, + "licenses": Object { + "get": [Function], + "getAllCommonlyUsed": [Function], + "getForRepo": [Function], + "listCommonlyUsed": [Function], + }, + "log": Object { + "debug": [Function], + "error": [Function], + "info": [Function], + "warn": [Function], + }, + "markdown": Object { + "render": [Function], + "renderRaw": [Function], + }, + "meta": Object { + "get": [Function], + }, + "migrations": Object { + "cancelImport": [Function], + "deleteArchiveForAuthenticatedUser": [Function], + "deleteArchiveForOrg": [Function], + "downloadArchiveForOrg": [Function], + "getArchiveForAuthenticatedUser": [Function], + "getCommitAuthors": [Function], + "getImportProgress": [Function], + "getImportStatus": [Function], + "getLargeFiles": [Function], + "getStatusForAuthenticatedUser": [Function], + "getStatusForOrg": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listReposForOrg": [Function], + "listReposForUser": [Function], + "mapCommitAuthor": [Function], + "setLfsPreference": [Function], + "startForAuthenticatedUser": [Function], + "startForOrg": [Function], + "startImport": [Function], + "unlockRepoForAuthenticatedUser": [Function], + "unlockRepoForOrg": [Function], + "updateImport": [Function], + }, + "orgs": Object { + "addOrUpdateMembership": [Function], + "blockUser": [Function], + "checkBlockedUser": [Function], + "checkMembership": [Function], + "checkMembershipForUser": [Function], + "checkPublicMembership": [Function], + "checkPublicMembershipForUser": [Function], + "concealMembership": [Function], + "convertMemberToOutsideCollaborator": [Function], + "createHook": [Function], + "createInvitation": [Function], + "createWebhook": [Function], + "deleteHook": [Function], + "deleteWebhook": [Function], + "get": [Function], + "getHook": [Function], + "getMembership": [Function], + "getMembershipForAuthenticatedUser": [Function], + "getMembershipForUser": [Function], + "getWebhook": [Function], + "list": [Function], + "listAppInstallations": [Function], + "listBlockedUsers": [Function], + "listForAuthenticatedUser": [Function], + "listForUser": [Function], + "listHooks": [Function], + "listInstallations": [Function], + "listInvitationTeams": [Function], + "listMembers": [Function], + "listMemberships": [Function], + "listMembershipsForAuthenticatedUser": [Function], + "listOutsideCollaborators": [Function], + "listPendingInvitations": [Function], + "listPublicMembers": [Function], + "listWebhooks": [Function], + "pingHook": [Function], + "pingWebhook": [Function], + "publicizeMembership": [Function], + "removeMember": [Function], + "removeMembership": [Function], + "removeMembershipForUser": [Function], + "removeOutsideCollaborator": [Function], + "removePublicMembershipForAuthenticatedUser": [Function], + "setMembershipForUser": [Function], + "setPublicMembershipForAuthenticatedUser": [Function], + "unblockUser": [Function], + "update": [Function], + "updateHook": [Function], + "updateMembership": [Function], + "updateMembershipForAuthenticatedUser": [Function], + "updateWebhook": [Function], + }, + "paginate": [Function], + "projects": Object { + "addCollaborator": [Function], + "createCard": [Function], + "createColumn": [Function], + "createForAuthenticatedUser": [Function], + "createForOrg": [Function], + "createForRepo": [Function], + "delete": [Function], + "deleteCard": [Function], + "deleteColumn": [Function], + "get": [Function], + "getCard": [Function], + "getColumn": [Function], + "getPermissionForUser": [Function], + "listCards": [Function], + "listCollaborators": [Function], + "listColumns": [Function], + "listForOrg": [Function], + "listForRepo": [Function], + "listForUser": [Function], + "moveCard": [Function], + "moveColumn": [Function], + "removeCollaborator": [Function], + "reviewUserPermissionLevel": [Function], + "update": [Function], + "updateCard": [Function], + "updateColumn": [Function], + }, + "pulls": Object { + "checkIfMerged": [Function], + "create": [Function], + "createComment": [Function], + "createReplyForReviewComment": [Function], + "createReview": [Function], + "createReviewComment": [Function], + "createReviewCommentReply": [Function], + "createReviewRequest": [Function], + "deleteComment": [Function], + "deletePendingReview": [Function], + "deleteReviewComment": [Function], + "deleteReviewRequest": [Function], + "dismissReview": [Function], + "get": [Function], + "getComment": [Function], + "getCommentsForReview": [Function], + "getReview": [Function], + "getReviewComment": [Function], + "list": [Function], + "listComments": [Function], + "listCommentsForRepo": [Function], + "listCommentsForReview": [Function], + "listCommits": [Function], + "listFiles": [Function], + "listRequestedReviewers": [Function], + "listReviewComments": [Function], + "listReviewCommentsForRepo": [Function], + "listReviewRequests": [Function], + "listReviews": [Function], + "merge": [Function], + "removeRequestedReviewers": [Function], + "requestReviewers": [Function], + "submitReview": [Function], + "update": [Function], + "updateBranch": [Function], + "updateComment": [Function], + "updateReview": [Function], + "updateReviewComment": [Function], + }, + "rateLimit": Object { + "get": [Function], + }, + "reactions": Object { + "createForCommitComment": [Function], + "createForIssue": [Function], + "createForIssueComment": [Function], + "createForPullRequestReviewComment": [Function], + "createForTeamDiscussionCommentInOrg": [Function], + "createForTeamDiscussionInOrg": [Function], + "delete": [Function], + "deleteForCommitComment": [Function], + "deleteForIssue": [Function], + "deleteForIssueComment": [Function], + "deleteForPullRequestComment": [Function], + "deleteForTeamDiscussion": [Function], + "deleteForTeamDiscussionComment": [Function], + "deleteLegacy": [Function], + "listForCommitComment": [Function], + "listForIssue": [Function], + "listForIssueComment": [Function], + "listForPullRequestReviewComment": [Function], + "listForTeamDiscussionCommentInOrg": [Function], + "listForTeamDiscussionInOrg": [Function], + }, + "repos": Object { + "acceptInvitation": [Function], + "addAppAccessRestrictions": [Function], + "addCollaborator": [Function], + "addDeployKey": [Function], + "addProtectedBranchAdminEnforcement": [Function], + "addProtectedBranchAppRestrictions": [Function], + "addProtectedBranchRequiredSignatures": [Function], + "addProtectedBranchRequiredStatusChecksContexts": [Function], + "addProtectedBranchTeamRestrictions": [Function], + "addProtectedBranchUserRestrictions": [Function], + "addStatusCheckContexts": [Function], + "addTeamAccessRestrictions": [Function], + "addUserAccessRestrictions": [Function], + "checkCollaborator": [Function], + "checkVulnerabilityAlerts": [Function], + "compareCommits": [Function], + "createCommitComment": [Function], + "createCommitSignatureProtection": [Function], + "createCommitStatus": [Function], + "createDeployKey": [Function], + "createDeployment": [Function], + "createDeploymentStatus": [Function], + "createDispatchEvent": [Function], + "createForAuthenticatedUser": [Function], + "createFork": [Function], + "createHook": [Function], + "createInOrg": [Function], + "createOrUpdateFile": [Function], + "createOrUpdateFileContents": [Function], + "createPagesSite": [Function], + "createRelease": [Function], + "createStatus": [Function], + "createUsingTemplate": [Function], + "createWebhook": [Function], + "declineInvitation": [Function], + "delete": [Function], + "deleteAccessRestrictions": [Function], + "deleteAdminBranchProtection": [Function], + "deleteBranchProtection": [Function], + "deleteCommitComment": [Function], + "deleteCommitSignatureProtection": [Function], + "deleteDeployKey": [Function], + "deleteDeployment": [Function], + "deleteDownload": [Function], + "deleteFile": [Function], + "deleteHook": [Function], + "deleteInvitation": [Function], + "deletePagesSite": [Function], + "deletePullRequestReviewProtection": [Function], + "deleteRelease": [Function], + "deleteReleaseAsset": [Function], + "deleteWebhook": [Function], + "disableAutomatedSecurityFixes": [Function], + "disablePagesSite": [Function], + "disableVulnerabilityAlerts": [Function], + "downloadArchive": [Function], + "enableAutomatedSecurityFixes": [Function], + "enablePagesSite": [Function], + "enableVulnerabilityAlerts": [Function], + "get": [Function], + "getAccessRestrictions": [Function], + "getAdminBranchProtection": [Function], + "getAllStatusCheckContexts": [Function], + "getAllTopics": [Function], + "getAppsWithAccessToProtectedBranch": [Function], + "getArchiveLink": [Function], + "getBranch": [Function], + "getBranchProtection": [Function], + "getClones": [Function], + "getCodeFrequencyStats": [Function], + "getCollaboratorPermissionLevel": [Function], + "getCombinedStatusForRef": [Function], + "getCommit": [Function], + "getCommitActivityStats": [Function], + "getCommitComment": [Function], + "getCommitSignatureProtection": [Function], + "getCommunityProfileMetrics": [Function], + "getContent": [Function], + "getContents": [Function], + "getContributorsStats": [Function], + "getDeployKey": [Function], + "getDeployment": [Function], + "getDeploymentStatus": [Function], + "getDownload": [Function], + "getHook": [Function], + "getLatestPagesBuild": [Function], + "getLatestRelease": [Function], + "getPages": [Function], + "getPagesBuild": [Function], + "getParticipationStats": [Function], + "getProtectedBranchAdminEnforcement": [Function], + "getProtectedBranchPullRequestReviewEnforcement": [Function], + "getProtectedBranchRequiredSignatures": [Function], + "getProtectedBranchRequiredStatusChecks": [Function], + "getProtectedBranchRestrictions": [Function], + "getPullRequestReviewProtection": [Function], + "getPunchCardStats": [Function], + "getReadme": [Function], + "getRelease": [Function], + "getReleaseAsset": [Function], + "getReleaseByTag": [Function], + "getStatusChecksProtection": [Function], + "getTeamsWithAccessToProtectedBranch": [Function], + "getTopPaths": [Function], + "getTopReferrers": [Function], + "getUsersWithAccessToProtectedBranch": [Function], + "getViews": [Function], + "getWebhook": [Function], + "list": [Function], + "listAssetsForRelease": [Function], + "listBranches": [Function], + "listBranchesForHeadCommit": [Function], + "listCollaborators": [Function], + "listCommentsForCommit": [Function], + "listCommitComments": [Function], + "listCommitCommentsForRepo": [Function], + "listCommitStatusesForRef": [Function], + "listCommits": [Function], + "listContributors": [Function], + "listDeployKeys": [Function], + "listDeploymentStatuses": [Function], + "listDeployments": [Function], + "listDownloads": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listForUser": [Function], + "listForks": [Function], + "listHooks": [Function], + "listInvitations": [Function], + "listInvitationsForAuthenticatedUser": [Function], + "listLanguages": [Function], + "listPagesBuilds": [Function], + "listProtectedBranchRequiredStatusChecksContexts": [Function], + "listPublic": [Function], + "listPullRequestsAssociatedWithCommit": [Function], + "listReleaseAssets": [Function], + "listReleases": [Function], + "listStatusesForRef": [Function], + "listTags": [Function], + "listTeams": [Function], + "listTopics": [Function], + "listWebhooks": [Function], + "merge": [Function], + "pingHook": [Function], + "pingWebhook": [Function], + "removeAppAccessRestrictions": [Function], + "removeBranchProtection": [Function], + "removeCollaborator": [Function], + "removeDeployKey": [Function], + "removeProtectedBranchAdminEnforcement": [Function], + "removeProtectedBranchAppRestrictions": [Function], + "removeProtectedBranchPullRequestReviewEnforcement": [Function], + "removeProtectedBranchRequiredSignatures": [Function], + "removeProtectedBranchRequiredStatusChecks": [Function], + "removeProtectedBranchRequiredStatusChecksContexts": [Function], + "removeProtectedBranchRestrictions": [Function], + "removeProtectedBranchTeamRestrictions": [Function], + "removeProtectedBranchUserRestrictions": [Function], + "removeStatusCheckContexts": [Function], + "removeStatusCheckProtection": [Function], + "removeTeamAccessRestrictions": [Function], + "removeUserAccessRestrictions": [Function], + "replaceAllTopics": [Function], + "replaceProtectedBranchAppRestrictions": [Function], + "replaceProtectedBranchRequiredStatusChecksContexts": [Function], + "replaceProtectedBranchTeamRestrictions": [Function], + "replaceProtectedBranchUserRestrictions": [Function], + "replaceTopics": [Function], + "requestPageBuild": [Function], + "requestPagesBuild": [Function], + "retrieveCommunityProfileMetrics": [Function], + "setAdminBranchProtection": [Function], + "setAppAccessRestrictions": [Function], + "setStatusCheckContexts": [Function], + "setTeamAccessRestrictions": [Function], + "setUserAccessRestrictions": [Function], + "testPushHook": [Function], + "testPushWebhook": [Function], + "transfer": [Function], + "update": [Function], + "updateBranchProtection": [Function], + "updateCommitComment": [Function], + "updateHook": [Function], + "updateInformationAboutPagesSite": [Function], + "updateInvitation": [Function], + "updateProtectedBranchPullRequestReviewEnforcement": [Function], + "updateProtectedBranchRequiredStatusChecks": [Function], + "updatePullRequestReviewProtection": [Function], + "updateRelease": [Function], + "updateReleaseAsset": [Function], + "updateStatusCheckPotection": [Function], + "updateWebhook": [Function], + "uploadReleaseAsset": [Function], + }, + "request": [Function], + "search": Object { + "code": [Function], + "commits": [Function], + "issuesAndPullRequests": [Function], + "labels": [Function], + "repos": [Function], + "topics": [Function], + "users": [Function], + }, + "teams": Object { + "addOrUpdateMembershipForUserInOrg": [Function], + "addOrUpdateMembershipInOrg": [Function], + "addOrUpdateProjectInOrg": [Function], + "addOrUpdateProjectPermissionsInOrg": [Function], + "addOrUpdateRepoInOrg": [Function], + "addOrUpdateRepoPermissionsInOrg": [Function], + "checkManagesRepoInOrg": [Function], + "checkPermissionsForProjectInOrg": [Function], + "checkPermissionsForRepoInOrg": [Function], + "create": [Function], + "createDiscussionCommentInOrg": [Function], + "createDiscussionInOrg": [Function], + "deleteDiscussionCommentInOrg": [Function], + "deleteDiscussionInOrg": [Function], + "deleteInOrg": [Function], + "getByName": [Function], + "getDiscussionCommentInOrg": [Function], + "getDiscussionInOrg": [Function], + "getMembershipForUserInOrg": [Function], + "getMembershipInOrg": [Function], + "list": [Function], + "listChildInOrg": [Function], + "listDiscussionCommentsInOrg": [Function], + "listDiscussionsInOrg": [Function], + "listForAuthenticatedUser": [Function], + "listMembersInOrg": [Function], + "listPendingInvitationsInOrg": [Function], + "listProjectsInOrg": [Function], + "listReposInOrg": [Function], + "removeMembershipForUserInOrg": [Function], + "removeMembershipInOrg": [Function], + "removeProjectInOrg": [Function], + "removeRepoInOrg": [Function], + "reviewProjectInOrg": [Function], + "updateDiscussionCommentInOrg": [Function], + "updateDiscussionInOrg": [Function], + "updateInOrg": [Function], + }, + "users": Object { + "addEmailForAuthenticated": [Function], + "addEmails": [Function], + "block": [Function], + "checkBlocked": [Function], + "checkFollowing": [Function], + "checkFollowingForUser": [Function], + "checkPersonIsFollowedByAuthenticated": [Function], + "createGpgKey": [Function], + "createGpgKeyForAuthenticated": [Function], + "createPublicKey": [Function], + "createPublicSshKeyForAuthenticated": [Function], + "deleteEmailForAuthenticated": [Function], + "deleteEmails": [Function], + "deleteGpgKey": [Function], + "deleteGpgKeyForAuthenticated": [Function], + "deletePublicKey": [Function], + "deletePublicSshKeyForAuthenticated": [Function], + "follow": [Function], + "getAuthenticated": [Function], + "getByUsername": [Function], + "getContextForUser": [Function], + "getGpgKey": [Function], + "getGpgKeyForAuthenticated": [Function], + "getPublicKey": [Function], + "getPublicSshKeyForAuthenticated": [Function], + "list": [Function], + "listBlocked": [Function], + "listBlockedByAuthenticated": [Function], + "listEmails": [Function], + "listEmailsForAuthenticated": [Function], + "listFollowedByAuthenticated": [Function], + "listFollowersForAuthenticatedUser": [Function], + "listFollowersForUser": [Function], + "listFollowingForAuthenticatedUser": [Function], + "listFollowingForUser": [Function], + "listGpgKeys": [Function], + "listGpgKeysForAuthenticated": [Function], + "listGpgKeysForUser": [Function], + "listPublicEmails": [Function], + "listPublicEmailsForAuthenticated": [Function], + "listPublicKeys": [Function], + "listPublicKeysForUser": [Function], + "listPublicSshKeysForAuthenticated": [Function], + "setPrimaryEmailVisibilityForAuthenticated": [Function], + "togglePrimaryEmailVisibility": [Function], + "unblock": [Function], + "unfollow": [Function], + "updateAuthenticated": [Function], + }, + }, + }, "graphStylingPane": GraphStylingPane { "container": [Circular], "firstFieldHasFocus": [Function], @@ -967,7 +2505,6 @@ exports[`SettingsComponent renders 1`] = ` "isAutoscaleDefaultEnabled": [Function], "isEnableMongoCapabilityPresent": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function], - "isGitHubPaneEnabled": [Function], "isHostedDataExplorerEnabled": [Function], "isLeftPaneExpanded": [Function], "isMongoIndexingEnabled": [Function], @@ -982,9 +2519,14 @@ exports[`SettingsComponent renders 1`] = ` "isSparkEnabledForAccount": [Function], "isSynapseLinkUpdating": [Function], "isTabsContentExpanded": [Function], + "junoClient": JunoClient { + "cachedPinnedRepos": [Function], + "databaseAccount": undefined, + }, "memoryUsageInfo": [Function], "notebookBasePath": [Function], "notebookServerInfo": [Function], + "onGitHubClientError": [Function], "onRefreshDatabasesKeyPress": [Function], "onRefreshResourcesClick": [Function], "onSwitchToConnectionString": [Function], @@ -1470,6 +3012,773 @@ exports[`SettingsComponent renders 1`] = ` "defaultExperience": [Function], "deleteCollectionText": [Function], "deleteDatabaseText": [Function], + "gitHubClient": GitHubClient { + "errorCallback": [Function], + "ocktokit": OctokitWithDefaults { + "actions": Object { + "addSelectedRepoToOrgSecret": [Function], + "cancelWorkflowRun": [Function], + "createOrUpdateOrgSecret": [Function], + "createOrUpdateRepoSecret": [Function], + "createOrUpdateSecretForRepo": [Function], + "createRegistrationToken": [Function], + "createRegistrationTokenForOrg": [Function], + "createRegistrationTokenForRepo": [Function], + "createRemoveToken": [Function], + "createRemoveTokenForOrg": [Function], + "createRemoveTokenForRepo": [Function], + "deleteArtifact": [Function], + "deleteOrgSecret": [Function], + "deleteRepoSecret": [Function], + "deleteSecretFromRepo": [Function], + "deleteSelfHostedRunnerFromOrg": [Function], + "deleteSelfHostedRunnerFromRepo": [Function], + "deleteWorkflowRunLogs": [Function], + "downloadArtifact": [Function], + "downloadJobLogsForWorkflowRun": [Function], + "downloadWorkflowJobLogs": [Function], + "downloadWorkflowRunLogs": [Function], + "getArtifact": [Function], + "getJobForWorkflowRun": [Function], + "getOrgPublicKey": [Function], + "getOrgSecret": [Function], + "getPublicKey": [Function], + "getRepoPublicKey": [Function], + "getRepoSecret": [Function], + "getSecret": [Function], + "getSelfHostedRunner": [Function], + "getSelfHostedRunnerForOrg": [Function], + "getSelfHostedRunnerForRepo": [Function], + "getWorkflow": [Function], + "getWorkflowJob": [Function], + "getWorkflowRun": [Function], + "getWorkflowRunUsage": [Function], + "getWorkflowUsage": [Function], + "listArtifactsForRepo": [Function], + "listDownloadsForSelfHostedRunnerApplication": [Function], + "listJobsForWorkflowRun": [Function], + "listOrgSecrets": [Function], + "listRepoSecrets": [Function], + "listRepoWorkflowRuns": [Function], + "listRepoWorkflows": [Function], + "listRunnerApplicationsForOrg": [Function], + "listRunnerApplicationsForRepo": [Function], + "listSecretsForRepo": [Function], + "listSelectedReposForOrgSecret": [Function], + "listSelfHostedRunnersForOrg": [Function], + "listSelfHostedRunnersForRepo": [Function], + "listWorkflowJobLogs": [Function], + "listWorkflowRunArtifacts": [Function], + "listWorkflowRunLogs": [Function], + "listWorkflowRuns": [Function], + "listWorkflowRunsForRepo": [Function], + "reRunWorkflow": [Function], + "removeSelectedRepoFromOrgSecret": [Function], + "removeSelfHostedRunner": [Function], + "setSelectedReposForOrgSecret": [Function], + }, + "activity": Object { + "checkRepoIsStarredByAuthenticatedUser": [Function], + "checkStarringRepo": [Function], + "deleteRepoSubscription": [Function], + "deleteThreadSubscription": [Function], + "getFeeds": [Function], + "getRepoSubscription": [Function], + "getThread": [Function], + "getThreadSubscription": [Function], + "getThreadSubscriptionForAuthenticatedUser": [Function], + "listEventsForAuthenticatedUser": [Function], + "listEventsForOrg": [Function], + "listEventsForUser": [Function], + "listFeeds": [Function], + "listNotifications": [Function], + "listNotificationsForAuthenticatedUser": [Function], + "listNotificationsForRepo": [Function], + "listOrgEventsForAuthenticatedUser": [Function], + "listPublicEvents": [Function], + "listPublicEventsForOrg": [Function], + "listPublicEventsForRepoNetwork": [Function], + "listPublicEventsForUser": [Function], + "listPublicOrgEvents": [Function], + "listReceivedEventsForUser": [Function], + "listReceivedPublicEventsForUser": [Function], + "listRepoEvents": [Function], + "listRepoNotificationsForAuthenticatedUser": [Function], + "listReposStarredByAuthenticatedUser": [Function], + "listReposStarredByUser": [Function], + "listReposWatchedByUser": [Function], + "listStargazersForRepo": [Function], + "listWatchedReposForAuthenticatedUser": [Function], + "listWatchersForRepo": [Function], + "markAsRead": [Function], + "markNotificationsAsRead": [Function], + "markNotificationsAsReadForRepo": [Function], + "markRepoNotificationsAsRead": [Function], + "markThreadAsRead": [Function], + "setRepoSubscription": [Function], + "setThreadSubscription": [Function], + "starRepo": [Function], + "starRepoForAuthenticatedUser": [Function], + "unstarRepo": [Function], + "unstarRepoForAuthenticatedUser": [Function], + }, + "apps": Object { + "addRepoToInstallation": [Function], + "checkAccountIsAssociatedWithAny": [Function], + "checkAccountIsAssociatedWithAnyStubbed": [Function], + "checkToken": [Function], + "createContentAttachment": [Function], + "createFromManifest": [Function], + "createInstallationAccessToken": [Function], + "createInstallationToken": [Function], + "deleteAuthorization": [Function], + "deleteInstallation": [Function], + "deleteToken": [Function], + "getAuthenticated": [Function], + "getBySlug": [Function], + "getInstallation": [Function], + "getOrgInstallation": [Function], + "getRepoInstallation": [Function], + "getSubscriptionPlanForAccount": [Function], + "getSubscriptionPlanForAccountStubbed": [Function], + "getUserInstallation": [Function], + "listAccountsForPlan": [Function], + "listAccountsForPlanStubbed": [Function], + "listAccountsUserOrOrgOnPlan": [Function], + "listAccountsUserOrOrgOnPlanStubbed": [Function], + "listInstallationReposForAuthenticatedUser": [Function], + "listInstallations": [Function], + "listInstallationsForAuthenticatedUser": [Function], + "listMarketplacePurchasesForAuthenticatedUser": [Function], + "listMarketplacePurchasesForAuthenticatedUserStubbed": [Function], + "listPlans": [Function], + "listPlansStubbed": [Function], + "listRepos": [Function], + "listReposAccessibleToInstallation": [Function], + "listSubscriptionsForAuthenticatedUser": [Function], + "listSubscriptionsForAuthenticatedUserStubbed": [Function], + "removeRepoFromInstallation": [Function], + "resetToken": [Function], + "revokeInstallationAccessToken": [Function], + "revokeInstallationToken": [Function], + "suspendInstallation": [Function], + "unsuspendInstallation": [Function], + }, + "auth": [Function], + "checks": Object { + "create": [Function], + "createSuite": [Function], + "get": [Function], + "getSuite": [Function], + "listAnnotations": [Function], + "listForRef": [Function], + "listForSuite": [Function], + "listSuitesForRef": [Function], + "rerequestSuite": [Function], + "setSuitesPreferences": [Function], + "update": [Function], + }, + "codeScanning": Object { + "getAlert": [Function], + "listAlertsForRepo": [Function], + }, + "codesOfConduct": Object { + "getAllCodesOfConduct": [Function], + "getConductCode": [Function], + "getForRepo": [Function], + "listConductCodes": [Function], + }, + "emojis": Object { + "get": [Function], + }, + "gists": Object { + "checkIsStarred": [Function], + "create": [Function], + "createComment": [Function], + "delete": [Function], + "deleteComment": [Function], + "fork": [Function], + "get": [Function], + "getComment": [Function], + "getRevision": [Function], + "list": [Function], + "listComments": [Function], + "listCommits": [Function], + "listForUser": [Function], + "listForks": [Function], + "listPublic": [Function], + "listPublicForUser": [Function], + "listStarred": [Function], + "star": [Function], + "unstar": [Function], + "update": [Function], + "updateComment": [Function], + }, + "git": Object { + "createBlob": [Function], + "createCommit": [Function], + "createRef": [Function], + "createTag": [Function], + "createTree": [Function], + "deleteRef": [Function], + "getBlob": [Function], + "getCommit": [Function], + "getRef": [Function], + "getTag": [Function], + "getTree": [Function], + "listMatchingRefs": [Function], + "updateRef": [Function], + }, + "gitignore": Object { + "getAllTemplates": [Function], + "getTemplate": [Function], + "listTemplates": [Function], + }, + "graphql": [Function], + "hook": [Function], + "interactions": Object { + "addOrUpdateRestrictionsForOrg": [Function], + "addOrUpdateRestrictionsForRepo": [Function], + "getRestrictionsForOrg": [Function], + "getRestrictionsForRepo": [Function], + "removeRestrictionsForOrg": [Function], + "removeRestrictionsForRepo": [Function], + "setRestrictionsForOrg": [Function], + "setRestrictionsForRepo": [Function], + }, + "issues": Object { + "addAssignees": [Function], + "addLabels": [Function], + "checkAssignee": [Function], + "checkUserCanBeAssigned": [Function], + "create": [Function], + "createComment": [Function], + "createLabel": [Function], + "createMilestone": [Function], + "deleteComment": [Function], + "deleteLabel": [Function], + "deleteMilestone": [Function], + "get": [Function], + "getComment": [Function], + "getEvent": [Function], + "getLabel": [Function], + "getMilestone": [Function], + "list": [Function], + "listAssignees": [Function], + "listComments": [Function], + "listCommentsForRepo": [Function], + "listEvents": [Function], + "listEventsForRepo": [Function], + "listEventsForTimeline": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listForRepo": [Function], + "listLabelsForMilestone": [Function], + "listLabelsForRepo": [Function], + "listLabelsOnIssue": [Function], + "listMilestones": [Function], + "listMilestonesForRepo": [Function], + "lock": [Function], + "removeAllLabels": [Function], + "removeAssignees": [Function], + "removeLabel": [Function], + "removeLabels": [Function], + "replaceAllLabels": [Function], + "replaceLabels": [Function], + "setLabels": [Function], + "unlock": [Function], + "update": [Function], + "updateComment": [Function], + "updateLabel": [Function], + "updateMilestone": [Function], + }, + "licenses": Object { + "get": [Function], + "getAllCommonlyUsed": [Function], + "getForRepo": [Function], + "listCommonlyUsed": [Function], + }, + "log": Object { + "debug": [Function], + "error": [Function], + "info": [Function], + "warn": [Function], + }, + "markdown": Object { + "render": [Function], + "renderRaw": [Function], + }, + "meta": Object { + "get": [Function], + }, + "migrations": Object { + "cancelImport": [Function], + "deleteArchiveForAuthenticatedUser": [Function], + "deleteArchiveForOrg": [Function], + "downloadArchiveForOrg": [Function], + "getArchiveForAuthenticatedUser": [Function], + "getCommitAuthors": [Function], + "getImportProgress": [Function], + "getImportStatus": [Function], + "getLargeFiles": [Function], + "getStatusForAuthenticatedUser": [Function], + "getStatusForOrg": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listReposForOrg": [Function], + "listReposForUser": [Function], + "mapCommitAuthor": [Function], + "setLfsPreference": [Function], + "startForAuthenticatedUser": [Function], + "startForOrg": [Function], + "startImport": [Function], + "unlockRepoForAuthenticatedUser": [Function], + "unlockRepoForOrg": [Function], + "updateImport": [Function], + }, + "orgs": Object { + "addOrUpdateMembership": [Function], + "blockUser": [Function], + "checkBlockedUser": [Function], + "checkMembership": [Function], + "checkMembershipForUser": [Function], + "checkPublicMembership": [Function], + "checkPublicMembershipForUser": [Function], + "concealMembership": [Function], + "convertMemberToOutsideCollaborator": [Function], + "createHook": [Function], + "createInvitation": [Function], + "createWebhook": [Function], + "deleteHook": [Function], + "deleteWebhook": [Function], + "get": [Function], + "getHook": [Function], + "getMembership": [Function], + "getMembershipForAuthenticatedUser": [Function], + "getMembershipForUser": [Function], + "getWebhook": [Function], + "list": [Function], + "listAppInstallations": [Function], + "listBlockedUsers": [Function], + "listForAuthenticatedUser": [Function], + "listForUser": [Function], + "listHooks": [Function], + "listInstallations": [Function], + "listInvitationTeams": [Function], + "listMembers": [Function], + "listMemberships": [Function], + "listMembershipsForAuthenticatedUser": [Function], + "listOutsideCollaborators": [Function], + "listPendingInvitations": [Function], + "listPublicMembers": [Function], + "listWebhooks": [Function], + "pingHook": [Function], + "pingWebhook": [Function], + "publicizeMembership": [Function], + "removeMember": [Function], + "removeMembership": [Function], + "removeMembershipForUser": [Function], + "removeOutsideCollaborator": [Function], + "removePublicMembershipForAuthenticatedUser": [Function], + "setMembershipForUser": [Function], + "setPublicMembershipForAuthenticatedUser": [Function], + "unblockUser": [Function], + "update": [Function], + "updateHook": [Function], + "updateMembership": [Function], + "updateMembershipForAuthenticatedUser": [Function], + "updateWebhook": [Function], + }, + "paginate": [Function], + "projects": Object { + "addCollaborator": [Function], + "createCard": [Function], + "createColumn": [Function], + "createForAuthenticatedUser": [Function], + "createForOrg": [Function], + "createForRepo": [Function], + "delete": [Function], + "deleteCard": [Function], + "deleteColumn": [Function], + "get": [Function], + "getCard": [Function], + "getColumn": [Function], + "getPermissionForUser": [Function], + "listCards": [Function], + "listCollaborators": [Function], + "listColumns": [Function], + "listForOrg": [Function], + "listForRepo": [Function], + "listForUser": [Function], + "moveCard": [Function], + "moveColumn": [Function], + "removeCollaborator": [Function], + "reviewUserPermissionLevel": [Function], + "update": [Function], + "updateCard": [Function], + "updateColumn": [Function], + }, + "pulls": Object { + "checkIfMerged": [Function], + "create": [Function], + "createComment": [Function], + "createReplyForReviewComment": [Function], + "createReview": [Function], + "createReviewComment": [Function], + "createReviewCommentReply": [Function], + "createReviewRequest": [Function], + "deleteComment": [Function], + "deletePendingReview": [Function], + "deleteReviewComment": [Function], + "deleteReviewRequest": [Function], + "dismissReview": [Function], + "get": [Function], + "getComment": [Function], + "getCommentsForReview": [Function], + "getReview": [Function], + "getReviewComment": [Function], + "list": [Function], + "listComments": [Function], + "listCommentsForRepo": [Function], + "listCommentsForReview": [Function], + "listCommits": [Function], + "listFiles": [Function], + "listRequestedReviewers": [Function], + "listReviewComments": [Function], + "listReviewCommentsForRepo": [Function], + "listReviewRequests": [Function], + "listReviews": [Function], + "merge": [Function], + "removeRequestedReviewers": [Function], + "requestReviewers": [Function], + "submitReview": [Function], + "update": [Function], + "updateBranch": [Function], + "updateComment": [Function], + "updateReview": [Function], + "updateReviewComment": [Function], + }, + "rateLimit": Object { + "get": [Function], + }, + "reactions": Object { + "createForCommitComment": [Function], + "createForIssue": [Function], + "createForIssueComment": [Function], + "createForPullRequestReviewComment": [Function], + "createForTeamDiscussionCommentInOrg": [Function], + "createForTeamDiscussionInOrg": [Function], + "delete": [Function], + "deleteForCommitComment": [Function], + "deleteForIssue": [Function], + "deleteForIssueComment": [Function], + "deleteForPullRequestComment": [Function], + "deleteForTeamDiscussion": [Function], + "deleteForTeamDiscussionComment": [Function], + "deleteLegacy": [Function], + "listForCommitComment": [Function], + "listForIssue": [Function], + "listForIssueComment": [Function], + "listForPullRequestReviewComment": [Function], + "listForTeamDiscussionCommentInOrg": [Function], + "listForTeamDiscussionInOrg": [Function], + }, + "repos": Object { + "acceptInvitation": [Function], + "addAppAccessRestrictions": [Function], + "addCollaborator": [Function], + "addDeployKey": [Function], + "addProtectedBranchAdminEnforcement": [Function], + "addProtectedBranchAppRestrictions": [Function], + "addProtectedBranchRequiredSignatures": [Function], + "addProtectedBranchRequiredStatusChecksContexts": [Function], + "addProtectedBranchTeamRestrictions": [Function], + "addProtectedBranchUserRestrictions": [Function], + "addStatusCheckContexts": [Function], + "addTeamAccessRestrictions": [Function], + "addUserAccessRestrictions": [Function], + "checkCollaborator": [Function], + "checkVulnerabilityAlerts": [Function], + "compareCommits": [Function], + "createCommitComment": [Function], + "createCommitSignatureProtection": [Function], + "createCommitStatus": [Function], + "createDeployKey": [Function], + "createDeployment": [Function], + "createDeploymentStatus": [Function], + "createDispatchEvent": [Function], + "createForAuthenticatedUser": [Function], + "createFork": [Function], + "createHook": [Function], + "createInOrg": [Function], + "createOrUpdateFile": [Function], + "createOrUpdateFileContents": [Function], + "createPagesSite": [Function], + "createRelease": [Function], + "createStatus": [Function], + "createUsingTemplate": [Function], + "createWebhook": [Function], + "declineInvitation": [Function], + "delete": [Function], + "deleteAccessRestrictions": [Function], + "deleteAdminBranchProtection": [Function], + "deleteBranchProtection": [Function], + "deleteCommitComment": [Function], + "deleteCommitSignatureProtection": [Function], + "deleteDeployKey": [Function], + "deleteDeployment": [Function], + "deleteDownload": [Function], + "deleteFile": [Function], + "deleteHook": [Function], + "deleteInvitation": [Function], + "deletePagesSite": [Function], + "deletePullRequestReviewProtection": [Function], + "deleteRelease": [Function], + "deleteReleaseAsset": [Function], + "deleteWebhook": [Function], + "disableAutomatedSecurityFixes": [Function], + "disablePagesSite": [Function], + "disableVulnerabilityAlerts": [Function], + "downloadArchive": [Function], + "enableAutomatedSecurityFixes": [Function], + "enablePagesSite": [Function], + "enableVulnerabilityAlerts": [Function], + "get": [Function], + "getAccessRestrictions": [Function], + "getAdminBranchProtection": [Function], + "getAllStatusCheckContexts": [Function], + "getAllTopics": [Function], + "getAppsWithAccessToProtectedBranch": [Function], + "getArchiveLink": [Function], + "getBranch": [Function], + "getBranchProtection": [Function], + "getClones": [Function], + "getCodeFrequencyStats": [Function], + "getCollaboratorPermissionLevel": [Function], + "getCombinedStatusForRef": [Function], + "getCommit": [Function], + "getCommitActivityStats": [Function], + "getCommitComment": [Function], + "getCommitSignatureProtection": [Function], + "getCommunityProfileMetrics": [Function], + "getContent": [Function], + "getContents": [Function], + "getContributorsStats": [Function], + "getDeployKey": [Function], + "getDeployment": [Function], + "getDeploymentStatus": [Function], + "getDownload": [Function], + "getHook": [Function], + "getLatestPagesBuild": [Function], + "getLatestRelease": [Function], + "getPages": [Function], + "getPagesBuild": [Function], + "getParticipationStats": [Function], + "getProtectedBranchAdminEnforcement": [Function], + "getProtectedBranchPullRequestReviewEnforcement": [Function], + "getProtectedBranchRequiredSignatures": [Function], + "getProtectedBranchRequiredStatusChecks": [Function], + "getProtectedBranchRestrictions": [Function], + "getPullRequestReviewProtection": [Function], + "getPunchCardStats": [Function], + "getReadme": [Function], + "getRelease": [Function], + "getReleaseAsset": [Function], + "getReleaseByTag": [Function], + "getStatusChecksProtection": [Function], + "getTeamsWithAccessToProtectedBranch": [Function], + "getTopPaths": [Function], + "getTopReferrers": [Function], + "getUsersWithAccessToProtectedBranch": [Function], + "getViews": [Function], + "getWebhook": [Function], + "list": [Function], + "listAssetsForRelease": [Function], + "listBranches": [Function], + "listBranchesForHeadCommit": [Function], + "listCollaborators": [Function], + "listCommentsForCommit": [Function], + "listCommitComments": [Function], + "listCommitCommentsForRepo": [Function], + "listCommitStatusesForRef": [Function], + "listCommits": [Function], + "listContributors": [Function], + "listDeployKeys": [Function], + "listDeploymentStatuses": [Function], + "listDeployments": [Function], + "listDownloads": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listForUser": [Function], + "listForks": [Function], + "listHooks": [Function], + "listInvitations": [Function], + "listInvitationsForAuthenticatedUser": [Function], + "listLanguages": [Function], + "listPagesBuilds": [Function], + "listProtectedBranchRequiredStatusChecksContexts": [Function], + "listPublic": [Function], + "listPullRequestsAssociatedWithCommit": [Function], + "listReleaseAssets": [Function], + "listReleases": [Function], + "listStatusesForRef": [Function], + "listTags": [Function], + "listTeams": [Function], + "listTopics": [Function], + "listWebhooks": [Function], + "merge": [Function], + "pingHook": [Function], + "pingWebhook": [Function], + "removeAppAccessRestrictions": [Function], + "removeBranchProtection": [Function], + "removeCollaborator": [Function], + "removeDeployKey": [Function], + "removeProtectedBranchAdminEnforcement": [Function], + "removeProtectedBranchAppRestrictions": [Function], + "removeProtectedBranchPullRequestReviewEnforcement": [Function], + "removeProtectedBranchRequiredSignatures": [Function], + "removeProtectedBranchRequiredStatusChecks": [Function], + "removeProtectedBranchRequiredStatusChecksContexts": [Function], + "removeProtectedBranchRestrictions": [Function], + "removeProtectedBranchTeamRestrictions": [Function], + "removeProtectedBranchUserRestrictions": [Function], + "removeStatusCheckContexts": [Function], + "removeStatusCheckProtection": [Function], + "removeTeamAccessRestrictions": [Function], + "removeUserAccessRestrictions": [Function], + "replaceAllTopics": [Function], + "replaceProtectedBranchAppRestrictions": [Function], + "replaceProtectedBranchRequiredStatusChecksContexts": [Function], + "replaceProtectedBranchTeamRestrictions": [Function], + "replaceProtectedBranchUserRestrictions": [Function], + "replaceTopics": [Function], + "requestPageBuild": [Function], + "requestPagesBuild": [Function], + "retrieveCommunityProfileMetrics": [Function], + "setAdminBranchProtection": [Function], + "setAppAccessRestrictions": [Function], + "setStatusCheckContexts": [Function], + "setTeamAccessRestrictions": [Function], + "setUserAccessRestrictions": [Function], + "testPushHook": [Function], + "testPushWebhook": [Function], + "transfer": [Function], + "update": [Function], + "updateBranchProtection": [Function], + "updateCommitComment": [Function], + "updateHook": [Function], + "updateInformationAboutPagesSite": [Function], + "updateInvitation": [Function], + "updateProtectedBranchPullRequestReviewEnforcement": [Function], + "updateProtectedBranchRequiredStatusChecks": [Function], + "updatePullRequestReviewProtection": [Function], + "updateRelease": [Function], + "updateReleaseAsset": [Function], + "updateStatusCheckPotection": [Function], + "updateWebhook": [Function], + "uploadReleaseAsset": [Function], + }, + "request": [Function], + "search": Object { + "code": [Function], + "commits": [Function], + "issuesAndPullRequests": [Function], + "labels": [Function], + "repos": [Function], + "topics": [Function], + "users": [Function], + }, + "teams": Object { + "addOrUpdateMembershipForUserInOrg": [Function], + "addOrUpdateMembershipInOrg": [Function], + "addOrUpdateProjectInOrg": [Function], + "addOrUpdateProjectPermissionsInOrg": [Function], + "addOrUpdateRepoInOrg": [Function], + "addOrUpdateRepoPermissionsInOrg": [Function], + "checkManagesRepoInOrg": [Function], + "checkPermissionsForProjectInOrg": [Function], + "checkPermissionsForRepoInOrg": [Function], + "create": [Function], + "createDiscussionCommentInOrg": [Function], + "createDiscussionInOrg": [Function], + "deleteDiscussionCommentInOrg": [Function], + "deleteDiscussionInOrg": [Function], + "deleteInOrg": [Function], + "getByName": [Function], + "getDiscussionCommentInOrg": [Function], + "getDiscussionInOrg": [Function], + "getMembershipForUserInOrg": [Function], + "getMembershipInOrg": [Function], + "list": [Function], + "listChildInOrg": [Function], + "listDiscussionCommentsInOrg": [Function], + "listDiscussionsInOrg": [Function], + "listForAuthenticatedUser": [Function], + "listMembersInOrg": [Function], + "listPendingInvitationsInOrg": [Function], + "listProjectsInOrg": [Function], + "listReposInOrg": [Function], + "removeMembershipForUserInOrg": [Function], + "removeMembershipInOrg": [Function], + "removeProjectInOrg": [Function], + "removeRepoInOrg": [Function], + "reviewProjectInOrg": [Function], + "updateDiscussionCommentInOrg": [Function], + "updateDiscussionInOrg": [Function], + "updateInOrg": [Function], + }, + "users": Object { + "addEmailForAuthenticated": [Function], + "addEmails": [Function], + "block": [Function], + "checkBlocked": [Function], + "checkFollowing": [Function], + "checkFollowingForUser": [Function], + "checkPersonIsFollowedByAuthenticated": [Function], + "createGpgKey": [Function], + "createGpgKeyForAuthenticated": [Function], + "createPublicKey": [Function], + "createPublicSshKeyForAuthenticated": [Function], + "deleteEmailForAuthenticated": [Function], + "deleteEmails": [Function], + "deleteGpgKey": [Function], + "deleteGpgKeyForAuthenticated": [Function], + "deletePublicKey": [Function], + "deletePublicSshKeyForAuthenticated": [Function], + "follow": [Function], + "getAuthenticated": [Function], + "getByUsername": [Function], + "getContextForUser": [Function], + "getGpgKey": [Function], + "getGpgKeyForAuthenticated": [Function], + "getPublicKey": [Function], + "getPublicSshKeyForAuthenticated": [Function], + "list": [Function], + "listBlocked": [Function], + "listBlockedByAuthenticated": [Function], + "listEmails": [Function], + "listEmailsForAuthenticated": [Function], + "listFollowedByAuthenticated": [Function], + "listFollowersForAuthenticatedUser": [Function], + "listFollowersForUser": [Function], + "listFollowingForAuthenticatedUser": [Function], + "listFollowingForUser": [Function], + "listGpgKeys": [Function], + "listGpgKeysForAuthenticated": [Function], + "listGpgKeysForUser": [Function], + "listPublicEmails": [Function], + "listPublicEmailsForAuthenticated": [Function], + "listPublicKeys": [Function], + "listPublicKeysForUser": [Function], + "listPublicSshKeysForAuthenticated": [Function], + "setPrimaryEmailVisibilityForAuthenticated": [Function], + "togglePrimaryEmailVisibility": [Function], + "unblock": [Function], + "unfollow": [Function], + "updateAuthenticated": [Function], + }, + }, + }, "graphStylingPane": GraphStylingPane { "container": [Circular], "firstFieldHasFocus": [Function], @@ -1495,7 +3804,6 @@ exports[`SettingsComponent renders 1`] = ` "isAutoscaleDefaultEnabled": [Function], "isEnableMongoCapabilityPresent": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function], - "isGitHubPaneEnabled": [Function], "isHostedDataExplorerEnabled": [Function], "isLeftPaneExpanded": [Function], "isMongoIndexingEnabled": [Function], @@ -1510,9 +3818,14 @@ exports[`SettingsComponent renders 1`] = ` "isSparkEnabledForAccount": [Function], "isSynapseLinkUpdating": [Function], "isTabsContentExpanded": [Function], + "junoClient": JunoClient { + "cachedPinnedRepos": [Function], + "databaseAccount": undefined, + }, "memoryUsageInfo": [Function], "notebookBasePath": [Function], "notebookServerInfo": [Function], + "onGitHubClientError": [Function], "onRefreshDatabasesKeyPress": [Function], "onRefreshResourcesClick": [Function], "onSwitchToConnectionString": [Function], @@ -1985,6 +4298,773 @@ exports[`SettingsComponent renders 1`] = ` "defaultExperience": [Function], "deleteCollectionText": [Function], "deleteDatabaseText": [Function], + "gitHubClient": GitHubClient { + "errorCallback": [Function], + "ocktokit": OctokitWithDefaults { + "actions": Object { + "addSelectedRepoToOrgSecret": [Function], + "cancelWorkflowRun": [Function], + "createOrUpdateOrgSecret": [Function], + "createOrUpdateRepoSecret": [Function], + "createOrUpdateSecretForRepo": [Function], + "createRegistrationToken": [Function], + "createRegistrationTokenForOrg": [Function], + "createRegistrationTokenForRepo": [Function], + "createRemoveToken": [Function], + "createRemoveTokenForOrg": [Function], + "createRemoveTokenForRepo": [Function], + "deleteArtifact": [Function], + "deleteOrgSecret": [Function], + "deleteRepoSecret": [Function], + "deleteSecretFromRepo": [Function], + "deleteSelfHostedRunnerFromOrg": [Function], + "deleteSelfHostedRunnerFromRepo": [Function], + "deleteWorkflowRunLogs": [Function], + "downloadArtifact": [Function], + "downloadJobLogsForWorkflowRun": [Function], + "downloadWorkflowJobLogs": [Function], + "downloadWorkflowRunLogs": [Function], + "getArtifact": [Function], + "getJobForWorkflowRun": [Function], + "getOrgPublicKey": [Function], + "getOrgSecret": [Function], + "getPublicKey": [Function], + "getRepoPublicKey": [Function], + "getRepoSecret": [Function], + "getSecret": [Function], + "getSelfHostedRunner": [Function], + "getSelfHostedRunnerForOrg": [Function], + "getSelfHostedRunnerForRepo": [Function], + "getWorkflow": [Function], + "getWorkflowJob": [Function], + "getWorkflowRun": [Function], + "getWorkflowRunUsage": [Function], + "getWorkflowUsage": [Function], + "listArtifactsForRepo": [Function], + "listDownloadsForSelfHostedRunnerApplication": [Function], + "listJobsForWorkflowRun": [Function], + "listOrgSecrets": [Function], + "listRepoSecrets": [Function], + "listRepoWorkflowRuns": [Function], + "listRepoWorkflows": [Function], + "listRunnerApplicationsForOrg": [Function], + "listRunnerApplicationsForRepo": [Function], + "listSecretsForRepo": [Function], + "listSelectedReposForOrgSecret": [Function], + "listSelfHostedRunnersForOrg": [Function], + "listSelfHostedRunnersForRepo": [Function], + "listWorkflowJobLogs": [Function], + "listWorkflowRunArtifacts": [Function], + "listWorkflowRunLogs": [Function], + "listWorkflowRuns": [Function], + "listWorkflowRunsForRepo": [Function], + "reRunWorkflow": [Function], + "removeSelectedRepoFromOrgSecret": [Function], + "removeSelfHostedRunner": [Function], + "setSelectedReposForOrgSecret": [Function], + }, + "activity": Object { + "checkRepoIsStarredByAuthenticatedUser": [Function], + "checkStarringRepo": [Function], + "deleteRepoSubscription": [Function], + "deleteThreadSubscription": [Function], + "getFeeds": [Function], + "getRepoSubscription": [Function], + "getThread": [Function], + "getThreadSubscription": [Function], + "getThreadSubscriptionForAuthenticatedUser": [Function], + "listEventsForAuthenticatedUser": [Function], + "listEventsForOrg": [Function], + "listEventsForUser": [Function], + "listFeeds": [Function], + "listNotifications": [Function], + "listNotificationsForAuthenticatedUser": [Function], + "listNotificationsForRepo": [Function], + "listOrgEventsForAuthenticatedUser": [Function], + "listPublicEvents": [Function], + "listPublicEventsForOrg": [Function], + "listPublicEventsForRepoNetwork": [Function], + "listPublicEventsForUser": [Function], + "listPublicOrgEvents": [Function], + "listReceivedEventsForUser": [Function], + "listReceivedPublicEventsForUser": [Function], + "listRepoEvents": [Function], + "listRepoNotificationsForAuthenticatedUser": [Function], + "listReposStarredByAuthenticatedUser": [Function], + "listReposStarredByUser": [Function], + "listReposWatchedByUser": [Function], + "listStargazersForRepo": [Function], + "listWatchedReposForAuthenticatedUser": [Function], + "listWatchersForRepo": [Function], + "markAsRead": [Function], + "markNotificationsAsRead": [Function], + "markNotificationsAsReadForRepo": [Function], + "markRepoNotificationsAsRead": [Function], + "markThreadAsRead": [Function], + "setRepoSubscription": [Function], + "setThreadSubscription": [Function], + "starRepo": [Function], + "starRepoForAuthenticatedUser": [Function], + "unstarRepo": [Function], + "unstarRepoForAuthenticatedUser": [Function], + }, + "apps": Object { + "addRepoToInstallation": [Function], + "checkAccountIsAssociatedWithAny": [Function], + "checkAccountIsAssociatedWithAnyStubbed": [Function], + "checkToken": [Function], + "createContentAttachment": [Function], + "createFromManifest": [Function], + "createInstallationAccessToken": [Function], + "createInstallationToken": [Function], + "deleteAuthorization": [Function], + "deleteInstallation": [Function], + "deleteToken": [Function], + "getAuthenticated": [Function], + "getBySlug": [Function], + "getInstallation": [Function], + "getOrgInstallation": [Function], + "getRepoInstallation": [Function], + "getSubscriptionPlanForAccount": [Function], + "getSubscriptionPlanForAccountStubbed": [Function], + "getUserInstallation": [Function], + "listAccountsForPlan": [Function], + "listAccountsForPlanStubbed": [Function], + "listAccountsUserOrOrgOnPlan": [Function], + "listAccountsUserOrOrgOnPlanStubbed": [Function], + "listInstallationReposForAuthenticatedUser": [Function], + "listInstallations": [Function], + "listInstallationsForAuthenticatedUser": [Function], + "listMarketplacePurchasesForAuthenticatedUser": [Function], + "listMarketplacePurchasesForAuthenticatedUserStubbed": [Function], + "listPlans": [Function], + "listPlansStubbed": [Function], + "listRepos": [Function], + "listReposAccessibleToInstallation": [Function], + "listSubscriptionsForAuthenticatedUser": [Function], + "listSubscriptionsForAuthenticatedUserStubbed": [Function], + "removeRepoFromInstallation": [Function], + "resetToken": [Function], + "revokeInstallationAccessToken": [Function], + "revokeInstallationToken": [Function], + "suspendInstallation": [Function], + "unsuspendInstallation": [Function], + }, + "auth": [Function], + "checks": Object { + "create": [Function], + "createSuite": [Function], + "get": [Function], + "getSuite": [Function], + "listAnnotations": [Function], + "listForRef": [Function], + "listForSuite": [Function], + "listSuitesForRef": [Function], + "rerequestSuite": [Function], + "setSuitesPreferences": [Function], + "update": [Function], + }, + "codeScanning": Object { + "getAlert": [Function], + "listAlertsForRepo": [Function], + }, + "codesOfConduct": Object { + "getAllCodesOfConduct": [Function], + "getConductCode": [Function], + "getForRepo": [Function], + "listConductCodes": [Function], + }, + "emojis": Object { + "get": [Function], + }, + "gists": Object { + "checkIsStarred": [Function], + "create": [Function], + "createComment": [Function], + "delete": [Function], + "deleteComment": [Function], + "fork": [Function], + "get": [Function], + "getComment": [Function], + "getRevision": [Function], + "list": [Function], + "listComments": [Function], + "listCommits": [Function], + "listForUser": [Function], + "listForks": [Function], + "listPublic": [Function], + "listPublicForUser": [Function], + "listStarred": [Function], + "star": [Function], + "unstar": [Function], + "update": [Function], + "updateComment": [Function], + }, + "git": Object { + "createBlob": [Function], + "createCommit": [Function], + "createRef": [Function], + "createTag": [Function], + "createTree": [Function], + "deleteRef": [Function], + "getBlob": [Function], + "getCommit": [Function], + "getRef": [Function], + "getTag": [Function], + "getTree": [Function], + "listMatchingRefs": [Function], + "updateRef": [Function], + }, + "gitignore": Object { + "getAllTemplates": [Function], + "getTemplate": [Function], + "listTemplates": [Function], + }, + "graphql": [Function], + "hook": [Function], + "interactions": Object { + "addOrUpdateRestrictionsForOrg": [Function], + "addOrUpdateRestrictionsForRepo": [Function], + "getRestrictionsForOrg": [Function], + "getRestrictionsForRepo": [Function], + "removeRestrictionsForOrg": [Function], + "removeRestrictionsForRepo": [Function], + "setRestrictionsForOrg": [Function], + "setRestrictionsForRepo": [Function], + }, + "issues": Object { + "addAssignees": [Function], + "addLabels": [Function], + "checkAssignee": [Function], + "checkUserCanBeAssigned": [Function], + "create": [Function], + "createComment": [Function], + "createLabel": [Function], + "createMilestone": [Function], + "deleteComment": [Function], + "deleteLabel": [Function], + "deleteMilestone": [Function], + "get": [Function], + "getComment": [Function], + "getEvent": [Function], + "getLabel": [Function], + "getMilestone": [Function], + "list": [Function], + "listAssignees": [Function], + "listComments": [Function], + "listCommentsForRepo": [Function], + "listEvents": [Function], + "listEventsForRepo": [Function], + "listEventsForTimeline": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listForRepo": [Function], + "listLabelsForMilestone": [Function], + "listLabelsForRepo": [Function], + "listLabelsOnIssue": [Function], + "listMilestones": [Function], + "listMilestonesForRepo": [Function], + "lock": [Function], + "removeAllLabels": [Function], + "removeAssignees": [Function], + "removeLabel": [Function], + "removeLabels": [Function], + "replaceAllLabels": [Function], + "replaceLabels": [Function], + "setLabels": [Function], + "unlock": [Function], + "update": [Function], + "updateComment": [Function], + "updateLabel": [Function], + "updateMilestone": [Function], + }, + "licenses": Object { + "get": [Function], + "getAllCommonlyUsed": [Function], + "getForRepo": [Function], + "listCommonlyUsed": [Function], + }, + "log": Object { + "debug": [Function], + "error": [Function], + "info": [Function], + "warn": [Function], + }, + "markdown": Object { + "render": [Function], + "renderRaw": [Function], + }, + "meta": Object { + "get": [Function], + }, + "migrations": Object { + "cancelImport": [Function], + "deleteArchiveForAuthenticatedUser": [Function], + "deleteArchiveForOrg": [Function], + "downloadArchiveForOrg": [Function], + "getArchiveForAuthenticatedUser": [Function], + "getCommitAuthors": [Function], + "getImportProgress": [Function], + "getImportStatus": [Function], + "getLargeFiles": [Function], + "getStatusForAuthenticatedUser": [Function], + "getStatusForOrg": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listReposForOrg": [Function], + "listReposForUser": [Function], + "mapCommitAuthor": [Function], + "setLfsPreference": [Function], + "startForAuthenticatedUser": [Function], + "startForOrg": [Function], + "startImport": [Function], + "unlockRepoForAuthenticatedUser": [Function], + "unlockRepoForOrg": [Function], + "updateImport": [Function], + }, + "orgs": Object { + "addOrUpdateMembership": [Function], + "blockUser": [Function], + "checkBlockedUser": [Function], + "checkMembership": [Function], + "checkMembershipForUser": [Function], + "checkPublicMembership": [Function], + "checkPublicMembershipForUser": [Function], + "concealMembership": [Function], + "convertMemberToOutsideCollaborator": [Function], + "createHook": [Function], + "createInvitation": [Function], + "createWebhook": [Function], + "deleteHook": [Function], + "deleteWebhook": [Function], + "get": [Function], + "getHook": [Function], + "getMembership": [Function], + "getMembershipForAuthenticatedUser": [Function], + "getMembershipForUser": [Function], + "getWebhook": [Function], + "list": [Function], + "listAppInstallations": [Function], + "listBlockedUsers": [Function], + "listForAuthenticatedUser": [Function], + "listForUser": [Function], + "listHooks": [Function], + "listInstallations": [Function], + "listInvitationTeams": [Function], + "listMembers": [Function], + "listMemberships": [Function], + "listMembershipsForAuthenticatedUser": [Function], + "listOutsideCollaborators": [Function], + "listPendingInvitations": [Function], + "listPublicMembers": [Function], + "listWebhooks": [Function], + "pingHook": [Function], + "pingWebhook": [Function], + "publicizeMembership": [Function], + "removeMember": [Function], + "removeMembership": [Function], + "removeMembershipForUser": [Function], + "removeOutsideCollaborator": [Function], + "removePublicMembershipForAuthenticatedUser": [Function], + "setMembershipForUser": [Function], + "setPublicMembershipForAuthenticatedUser": [Function], + "unblockUser": [Function], + "update": [Function], + "updateHook": [Function], + "updateMembership": [Function], + "updateMembershipForAuthenticatedUser": [Function], + "updateWebhook": [Function], + }, + "paginate": [Function], + "projects": Object { + "addCollaborator": [Function], + "createCard": [Function], + "createColumn": [Function], + "createForAuthenticatedUser": [Function], + "createForOrg": [Function], + "createForRepo": [Function], + "delete": [Function], + "deleteCard": [Function], + "deleteColumn": [Function], + "get": [Function], + "getCard": [Function], + "getColumn": [Function], + "getPermissionForUser": [Function], + "listCards": [Function], + "listCollaborators": [Function], + "listColumns": [Function], + "listForOrg": [Function], + "listForRepo": [Function], + "listForUser": [Function], + "moveCard": [Function], + "moveColumn": [Function], + "removeCollaborator": [Function], + "reviewUserPermissionLevel": [Function], + "update": [Function], + "updateCard": [Function], + "updateColumn": [Function], + }, + "pulls": Object { + "checkIfMerged": [Function], + "create": [Function], + "createComment": [Function], + "createReplyForReviewComment": [Function], + "createReview": [Function], + "createReviewComment": [Function], + "createReviewCommentReply": [Function], + "createReviewRequest": [Function], + "deleteComment": [Function], + "deletePendingReview": [Function], + "deleteReviewComment": [Function], + "deleteReviewRequest": [Function], + "dismissReview": [Function], + "get": [Function], + "getComment": [Function], + "getCommentsForReview": [Function], + "getReview": [Function], + "getReviewComment": [Function], + "list": [Function], + "listComments": [Function], + "listCommentsForRepo": [Function], + "listCommentsForReview": [Function], + "listCommits": [Function], + "listFiles": [Function], + "listRequestedReviewers": [Function], + "listReviewComments": [Function], + "listReviewCommentsForRepo": [Function], + "listReviewRequests": [Function], + "listReviews": [Function], + "merge": [Function], + "removeRequestedReviewers": [Function], + "requestReviewers": [Function], + "submitReview": [Function], + "update": [Function], + "updateBranch": [Function], + "updateComment": [Function], + "updateReview": [Function], + "updateReviewComment": [Function], + }, + "rateLimit": Object { + "get": [Function], + }, + "reactions": Object { + "createForCommitComment": [Function], + "createForIssue": [Function], + "createForIssueComment": [Function], + "createForPullRequestReviewComment": [Function], + "createForTeamDiscussionCommentInOrg": [Function], + "createForTeamDiscussionInOrg": [Function], + "delete": [Function], + "deleteForCommitComment": [Function], + "deleteForIssue": [Function], + "deleteForIssueComment": [Function], + "deleteForPullRequestComment": [Function], + "deleteForTeamDiscussion": [Function], + "deleteForTeamDiscussionComment": [Function], + "deleteLegacy": [Function], + "listForCommitComment": [Function], + "listForIssue": [Function], + "listForIssueComment": [Function], + "listForPullRequestReviewComment": [Function], + "listForTeamDiscussionCommentInOrg": [Function], + "listForTeamDiscussionInOrg": [Function], + }, + "repos": Object { + "acceptInvitation": [Function], + "addAppAccessRestrictions": [Function], + "addCollaborator": [Function], + "addDeployKey": [Function], + "addProtectedBranchAdminEnforcement": [Function], + "addProtectedBranchAppRestrictions": [Function], + "addProtectedBranchRequiredSignatures": [Function], + "addProtectedBranchRequiredStatusChecksContexts": [Function], + "addProtectedBranchTeamRestrictions": [Function], + "addProtectedBranchUserRestrictions": [Function], + "addStatusCheckContexts": [Function], + "addTeamAccessRestrictions": [Function], + "addUserAccessRestrictions": [Function], + "checkCollaborator": [Function], + "checkVulnerabilityAlerts": [Function], + "compareCommits": [Function], + "createCommitComment": [Function], + "createCommitSignatureProtection": [Function], + "createCommitStatus": [Function], + "createDeployKey": [Function], + "createDeployment": [Function], + "createDeploymentStatus": [Function], + "createDispatchEvent": [Function], + "createForAuthenticatedUser": [Function], + "createFork": [Function], + "createHook": [Function], + "createInOrg": [Function], + "createOrUpdateFile": [Function], + "createOrUpdateFileContents": [Function], + "createPagesSite": [Function], + "createRelease": [Function], + "createStatus": [Function], + "createUsingTemplate": [Function], + "createWebhook": [Function], + "declineInvitation": [Function], + "delete": [Function], + "deleteAccessRestrictions": [Function], + "deleteAdminBranchProtection": [Function], + "deleteBranchProtection": [Function], + "deleteCommitComment": [Function], + "deleteCommitSignatureProtection": [Function], + "deleteDeployKey": [Function], + "deleteDeployment": [Function], + "deleteDownload": [Function], + "deleteFile": [Function], + "deleteHook": [Function], + "deleteInvitation": [Function], + "deletePagesSite": [Function], + "deletePullRequestReviewProtection": [Function], + "deleteRelease": [Function], + "deleteReleaseAsset": [Function], + "deleteWebhook": [Function], + "disableAutomatedSecurityFixes": [Function], + "disablePagesSite": [Function], + "disableVulnerabilityAlerts": [Function], + "downloadArchive": [Function], + "enableAutomatedSecurityFixes": [Function], + "enablePagesSite": [Function], + "enableVulnerabilityAlerts": [Function], + "get": [Function], + "getAccessRestrictions": [Function], + "getAdminBranchProtection": [Function], + "getAllStatusCheckContexts": [Function], + "getAllTopics": [Function], + "getAppsWithAccessToProtectedBranch": [Function], + "getArchiveLink": [Function], + "getBranch": [Function], + "getBranchProtection": [Function], + "getClones": [Function], + "getCodeFrequencyStats": [Function], + "getCollaboratorPermissionLevel": [Function], + "getCombinedStatusForRef": [Function], + "getCommit": [Function], + "getCommitActivityStats": [Function], + "getCommitComment": [Function], + "getCommitSignatureProtection": [Function], + "getCommunityProfileMetrics": [Function], + "getContent": [Function], + "getContents": [Function], + "getContributorsStats": [Function], + "getDeployKey": [Function], + "getDeployment": [Function], + "getDeploymentStatus": [Function], + "getDownload": [Function], + "getHook": [Function], + "getLatestPagesBuild": [Function], + "getLatestRelease": [Function], + "getPages": [Function], + "getPagesBuild": [Function], + "getParticipationStats": [Function], + "getProtectedBranchAdminEnforcement": [Function], + "getProtectedBranchPullRequestReviewEnforcement": [Function], + "getProtectedBranchRequiredSignatures": [Function], + "getProtectedBranchRequiredStatusChecks": [Function], + "getProtectedBranchRestrictions": [Function], + "getPullRequestReviewProtection": [Function], + "getPunchCardStats": [Function], + "getReadme": [Function], + "getRelease": [Function], + "getReleaseAsset": [Function], + "getReleaseByTag": [Function], + "getStatusChecksProtection": [Function], + "getTeamsWithAccessToProtectedBranch": [Function], + "getTopPaths": [Function], + "getTopReferrers": [Function], + "getUsersWithAccessToProtectedBranch": [Function], + "getViews": [Function], + "getWebhook": [Function], + "list": [Function], + "listAssetsForRelease": [Function], + "listBranches": [Function], + "listBranchesForHeadCommit": [Function], + "listCollaborators": [Function], + "listCommentsForCommit": [Function], + "listCommitComments": [Function], + "listCommitCommentsForRepo": [Function], + "listCommitStatusesForRef": [Function], + "listCommits": [Function], + "listContributors": [Function], + "listDeployKeys": [Function], + "listDeploymentStatuses": [Function], + "listDeployments": [Function], + "listDownloads": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listForUser": [Function], + "listForks": [Function], + "listHooks": [Function], + "listInvitations": [Function], + "listInvitationsForAuthenticatedUser": [Function], + "listLanguages": [Function], + "listPagesBuilds": [Function], + "listProtectedBranchRequiredStatusChecksContexts": [Function], + "listPublic": [Function], + "listPullRequestsAssociatedWithCommit": [Function], + "listReleaseAssets": [Function], + "listReleases": [Function], + "listStatusesForRef": [Function], + "listTags": [Function], + "listTeams": [Function], + "listTopics": [Function], + "listWebhooks": [Function], + "merge": [Function], + "pingHook": [Function], + "pingWebhook": [Function], + "removeAppAccessRestrictions": [Function], + "removeBranchProtection": [Function], + "removeCollaborator": [Function], + "removeDeployKey": [Function], + "removeProtectedBranchAdminEnforcement": [Function], + "removeProtectedBranchAppRestrictions": [Function], + "removeProtectedBranchPullRequestReviewEnforcement": [Function], + "removeProtectedBranchRequiredSignatures": [Function], + "removeProtectedBranchRequiredStatusChecks": [Function], + "removeProtectedBranchRequiredStatusChecksContexts": [Function], + "removeProtectedBranchRestrictions": [Function], + "removeProtectedBranchTeamRestrictions": [Function], + "removeProtectedBranchUserRestrictions": [Function], + "removeStatusCheckContexts": [Function], + "removeStatusCheckProtection": [Function], + "removeTeamAccessRestrictions": [Function], + "removeUserAccessRestrictions": [Function], + "replaceAllTopics": [Function], + "replaceProtectedBranchAppRestrictions": [Function], + "replaceProtectedBranchRequiredStatusChecksContexts": [Function], + "replaceProtectedBranchTeamRestrictions": [Function], + "replaceProtectedBranchUserRestrictions": [Function], + "replaceTopics": [Function], + "requestPageBuild": [Function], + "requestPagesBuild": [Function], + "retrieveCommunityProfileMetrics": [Function], + "setAdminBranchProtection": [Function], + "setAppAccessRestrictions": [Function], + "setStatusCheckContexts": [Function], + "setTeamAccessRestrictions": [Function], + "setUserAccessRestrictions": [Function], + "testPushHook": [Function], + "testPushWebhook": [Function], + "transfer": [Function], + "update": [Function], + "updateBranchProtection": [Function], + "updateCommitComment": [Function], + "updateHook": [Function], + "updateInformationAboutPagesSite": [Function], + "updateInvitation": [Function], + "updateProtectedBranchPullRequestReviewEnforcement": [Function], + "updateProtectedBranchRequiredStatusChecks": [Function], + "updatePullRequestReviewProtection": [Function], + "updateRelease": [Function], + "updateReleaseAsset": [Function], + "updateStatusCheckPotection": [Function], + "updateWebhook": [Function], + "uploadReleaseAsset": [Function], + }, + "request": [Function], + "search": Object { + "code": [Function], + "commits": [Function], + "issuesAndPullRequests": [Function], + "labels": [Function], + "repos": [Function], + "topics": [Function], + "users": [Function], + }, + "teams": Object { + "addOrUpdateMembershipForUserInOrg": [Function], + "addOrUpdateMembershipInOrg": [Function], + "addOrUpdateProjectInOrg": [Function], + "addOrUpdateProjectPermissionsInOrg": [Function], + "addOrUpdateRepoInOrg": [Function], + "addOrUpdateRepoPermissionsInOrg": [Function], + "checkManagesRepoInOrg": [Function], + "checkPermissionsForProjectInOrg": [Function], + "checkPermissionsForRepoInOrg": [Function], + "create": [Function], + "createDiscussionCommentInOrg": [Function], + "createDiscussionInOrg": [Function], + "deleteDiscussionCommentInOrg": [Function], + "deleteDiscussionInOrg": [Function], + "deleteInOrg": [Function], + "getByName": [Function], + "getDiscussionCommentInOrg": [Function], + "getDiscussionInOrg": [Function], + "getMembershipForUserInOrg": [Function], + "getMembershipInOrg": [Function], + "list": [Function], + "listChildInOrg": [Function], + "listDiscussionCommentsInOrg": [Function], + "listDiscussionsInOrg": [Function], + "listForAuthenticatedUser": [Function], + "listMembersInOrg": [Function], + "listPendingInvitationsInOrg": [Function], + "listProjectsInOrg": [Function], + "listReposInOrg": [Function], + "removeMembershipForUserInOrg": [Function], + "removeMembershipInOrg": [Function], + "removeProjectInOrg": [Function], + "removeRepoInOrg": [Function], + "reviewProjectInOrg": [Function], + "updateDiscussionCommentInOrg": [Function], + "updateDiscussionInOrg": [Function], + "updateInOrg": [Function], + }, + "users": Object { + "addEmailForAuthenticated": [Function], + "addEmails": [Function], + "block": [Function], + "checkBlocked": [Function], + "checkFollowing": [Function], + "checkFollowingForUser": [Function], + "checkPersonIsFollowedByAuthenticated": [Function], + "createGpgKey": [Function], + "createGpgKeyForAuthenticated": [Function], + "createPublicKey": [Function], + "createPublicSshKeyForAuthenticated": [Function], + "deleteEmailForAuthenticated": [Function], + "deleteEmails": [Function], + "deleteGpgKey": [Function], + "deleteGpgKeyForAuthenticated": [Function], + "deletePublicKey": [Function], + "deletePublicSshKeyForAuthenticated": [Function], + "follow": [Function], + "getAuthenticated": [Function], + "getByUsername": [Function], + "getContextForUser": [Function], + "getGpgKey": [Function], + "getGpgKeyForAuthenticated": [Function], + "getPublicKey": [Function], + "getPublicSshKeyForAuthenticated": [Function], + "list": [Function], + "listBlocked": [Function], + "listBlockedByAuthenticated": [Function], + "listEmails": [Function], + "listEmailsForAuthenticated": [Function], + "listFollowedByAuthenticated": [Function], + "listFollowersForAuthenticatedUser": [Function], + "listFollowersForUser": [Function], + "listFollowingForAuthenticatedUser": [Function], + "listFollowingForUser": [Function], + "listGpgKeys": [Function], + "listGpgKeysForAuthenticated": [Function], + "listGpgKeysForUser": [Function], + "listPublicEmails": [Function], + "listPublicEmailsForAuthenticated": [Function], + "listPublicKeys": [Function], + "listPublicKeysForUser": [Function], + "listPublicSshKeysForAuthenticated": [Function], + "setPrimaryEmailVisibilityForAuthenticated": [Function], + "togglePrimaryEmailVisibility": [Function], + "unblock": [Function], + "unfollow": [Function], + "updateAuthenticated": [Function], + }, + }, + }, "graphStylingPane": GraphStylingPane { "container": [Circular], "firstFieldHasFocus": [Function], @@ -2010,7 +5090,6 @@ exports[`SettingsComponent renders 1`] = ` "isAutoscaleDefaultEnabled": [Function], "isEnableMongoCapabilityPresent": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function], - "isGitHubPaneEnabled": [Function], "isHostedDataExplorerEnabled": [Function], "isLeftPaneExpanded": [Function], "isMongoIndexingEnabled": [Function], @@ -2025,9 +5104,14 @@ exports[`SettingsComponent renders 1`] = ` "isSparkEnabledForAccount": [Function], "isSynapseLinkUpdating": [Function], "isTabsContentExpanded": [Function], + "junoClient": JunoClient { + "cachedPinnedRepos": [Function], + "databaseAccount": undefined, + }, "memoryUsageInfo": [Function], "notebookBasePath": [Function], "notebookServerInfo": [Function], + "onGitHubClientError": [Function], "onRefreshDatabasesKeyPress": [Function], "onRefreshResourcesClick": [Function], "onSwitchToConnectionString": [Function], diff --git a/src/Explorer/Explorer.tsx b/src/Explorer/Explorer.tsx index e044581f3..b68d1756f 100644 --- a/src/Explorer/Explorer.tsx +++ b/src/Explorer/Explorer.tsx @@ -7,7 +7,7 @@ import _ from "underscore"; import { AuthType } from "../AuthType"; import { BindingHandlersRegisterer } from "../Bindings/BindingHandlersRegisterer"; import * as Constants from "../Common/Constants"; -import { ExplorerMetrics } from "../Common/Constants"; +import { ExplorerMetrics, HttpStatusCodes } from "../Common/Constants"; import { readCollection } from "../Common/dataAccess/readCollection"; import { readDatabases } from "../Common/dataAccess/readDatabases"; import { getErrorMessage, getErrorStack, handleError } from "../Common/ErrorHandlingUtils"; @@ -19,7 +19,9 @@ import { configContext, Platform } from "../ConfigContext"; import * as DataModels from "../Contracts/DataModels"; import { MessageTypes } from "../Contracts/ExplorerContracts"; import * as ViewModels from "../Contracts/ViewModels"; -import { IGalleryItem } from "../Juno/JunoClient"; +import { GitHubClient } from "../GitHub/GitHubClient"; +import { GitHubOAuthService } from "../GitHub/GitHubOAuthService"; +import { IGalleryItem, JunoClient } from "../Juno/JunoClient"; import { NotebookWorkspaceManager } from "../NotebookWorkspaceManager/NotebookWorkspaceManager"; import { ResourceProviderClientFactory } from "../ResourceProvider/ResourceProviderClientFactory"; import { RouteHandler } from "../RouteHandlers/RouteHandler"; @@ -57,6 +59,7 @@ import { ContextualPaneBase } from "./Panes/ContextualPaneBase"; import { DeleteCollectionConfirmationPane } from "./Panes/DeleteCollectionConfirmationPane/DeleteCollectionConfirmationPane"; import { DeleteDatabaseConfirmationPanel } from "./Panes/DeleteDatabaseConfirmationPanel"; import { ExecuteSprocParamsPane } from "./Panes/ExecuteSprocParamsPane/ExecuteSprocParamsPane"; +import { GitHubReposPanel } from "./Panes/GitHubReposPanel/GitHubReposPanel"; import GraphStylingPane from "./Panes/GraphStylingPane"; import { LoadQueryPane } from "./Panes/LoadQueryPane/LoadQueryPane"; import { SaveQueryPane } from "./Panes/SaveQueryPane/SaveQueryPane"; @@ -166,10 +169,11 @@ export default class Explorer { public addCollectionPane: AddCollectionPane; public graphStylingPane: GraphStylingPane; public cassandraAddCollectionPane: CassandraAddCollectionPane; - public gitHubReposPane: ContextualPaneBase; + private gitHubClient: GitHubClient; + public gitHubOAuthService: GitHubOAuthService; + public junoClient: JunoClient; // features - public isGitHubPaneEnabled: ko.Observable; public isPublishNotebookPaneEnabled: ko.Observable; public isHostedDataExplorerEnabled: ko.Computed; public isRightPanelV2Enabled: ko.Computed; @@ -211,6 +215,8 @@ export default class Explorer { private static readonly MaxNbDatabasesToAutoExpand = 5; constructor(params?: ExplorerParams) { + this.gitHubClient = new GitHubClient(this.onGitHubClientError); + this.junoClient = new JunoClient(); this.setIsNotificationConsoleExpanded = params?.setIsNotificationConsoleExpanded; this.setNotificationConsoleData = params?.setNotificationConsoleData; this.setInProgressConsoleDataIdToBeDeleted = params?.setInProgressConsoleDataIdToBeDeleted; @@ -317,7 +323,6 @@ export default class Explorer { this.resourceTokenCollectionId = ko.observable(); this.resourceTokenCollection = ko.observable(); this.resourceTokenPartitionKey = ko.observable(); - this.isGitHubPaneEnabled = ko.observable(false); this.isMongoIndexingEnabled = ko.observable(false); this.isPublishNotebookPaneEnabled = ko.observable(false); @@ -597,9 +602,6 @@ export default class Explorer { refreshCommandBarButtons: () => this.refreshCommandBarButtons(), refreshNotebookList: () => this.refreshNotebookList(), }); - - this.gitHubReposPane = this.notebookManager.gitHubReposPane; - this.isGitHubPaneEnabled(true); } this.refreshCommandBarButtons(); @@ -647,6 +649,23 @@ export default class Explorer { } } + private onGitHubClientError = (error: any): void => { + Logger.logError(getErrorMessage(error), "NotebookManager/onGitHubClientError"); + + if (error.status === HttpStatusCodes.Unauthorized) { + this.gitHubOAuthService.resetToken(); + + this.showOkCancelModalDialog( + undefined, + "Cosmos DB cannot access your Github account anymore. Please connect to GitHub again.", + "Connect to GitHub", + () => this.openGitHubReposPanel("Connect to GitHub"), + "Cancel", + undefined + ); + } + }; + public openEnableSynapseLinkDialog(): void { const addSynapseLinkDialogProps: DialogProps = { linkProps: { @@ -2138,6 +2157,19 @@ export default class Explorer { ); } + public openGitHubReposPanel(header: string, junoClient?: JunoClient): void { + this.openSidePanel( + header, + this.expandConsole()} + /> + ); + } + public openAddTableEntityPanel(queryTablesTab: QueryTablesTab, tableEntityListViewModel: TableListViewModal): void { this.openSidePanel( "Add Table Entity", diff --git a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx index 151620d4a..1fb77956e 100644 --- a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx +++ b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx @@ -19,11 +19,8 @@ import SettingsIcon from "../../../../images/settings_15x15.svg"; import SynapseIcon from "../../../../images/synapse-link.svg"; import { AuthType } from "../../../AuthType"; import * as Constants from "../../../Common/Constants"; -import { Areas } from "../../../Common/Constants"; import { configContext, Platform } from "../../../ConfigContext"; import * as ViewModels from "../../../Contracts/ViewModels"; -import { Action, ActionModifiers } from "../../../Shared/Telemetry/TelemetryConstants"; -import * as TelemetryProcessor from "../../../Shared/Telemetry/TelemetryProcessor"; import { userContext } from "../../../UserContext"; import { CommandButtonComponentProps } from "../../Controls/CommandButton/CommandButtonComponent"; import Explorer from "../../Explorer"; @@ -538,14 +535,7 @@ function createManageGitHubAccountButton(container: Explorer): CommandButtonComp return { iconSrc: GitHubIcon, iconAlt: label, - onCommandClick: () => { - if (!connectedToGitHub) { - TelemetryProcessor.trace(Action.NotebooksGitHubConnect, ActionModifiers.Mark, { - dataExplorerArea: Areas.Notebook, - }); - } - container.gitHubReposPane.open(); - }, + onCommandClick: () => container.openGitHubReposPanel(label), commandButtonLabel: label, hasPopup: false, disabled: false, diff --git a/src/Explorer/Notebook/NotebookManager.tsx b/src/Explorer/Notebook/NotebookManager.tsx index cba1b0ccd..53b3220c0 100644 --- a/src/Explorer/Notebook/NotebookManager.tsx +++ b/src/Explorer/Notebook/NotebookManager.tsx @@ -21,7 +21,7 @@ import { getFullName } from "../../Utils/UserUtils"; import Explorer from "../Explorer"; import { ContextualPaneBase } from "../Panes/ContextualPaneBase"; import { CopyNotebookPane } from "../Panes/CopyNotebookPane/CopyNotebookPane"; -import { GitHubReposPane } from "../Panes/GitHubReposPane"; +// import { GitHubReposPane } from "../Panes/GitHubReposPane"; import { PublishNotebookPane } from "../Panes/PublishNotebookPane/PublishNotebookPane"; import { ResourceTreeAdapter } from "../Tree/ResourceTreeAdapter"; import { NotebookContentProvider } from "./NotebookComponent/NotebookContentProvider"; @@ -50,7 +50,7 @@ export default class NotebookManager { private gitHubContentProvider: GitHubContentProvider; public gitHubOAuthService: GitHubOAuthService; - private gitHubClient: GitHubClient; + public gitHubClient: GitHubClient; public gitHubReposPane: ContextualPaneBase; @@ -60,13 +60,6 @@ export default class NotebookManager { this.gitHubOAuthService = new GitHubOAuthService(this.junoClient); this.gitHubClient = new GitHubClient(this.onGitHubClientError); - this.gitHubReposPane = new GitHubReposPane({ - id: "gitHubReposPane", - visible: ko.observable(false), - container: this.params.container, - junoClient: this.junoClient, - gitHubClient: this.gitHubClient, - }); this.gitHubContentProvider = new GitHubContentProvider({ gitHubClient: this.gitHubClient, @@ -92,9 +85,9 @@ export default class NotebookManager { this.gitHubOAuthService.getTokenObservable().subscribe((token) => { this.gitHubClient.setToken(token?.access_token); - - if (this.gitHubReposPane.visible()) { - this.gitHubReposPane.open(); + if (this?.gitHubOAuthService.isLoggedIn()) { + this.params.container.closeSidePanel(); + this.params.container.openGitHubReposPanel("Manager GitHub settings", this.junoClient); } this.params.refreshCommandBarButtons(); @@ -163,7 +156,7 @@ export default class NotebookManager { undefined, "Cosmos DB cannot access your Github account anymore. Please connect to GitHub again.", "Connect to GitHub", - () => this.gitHubReposPane.open(), + () => this.params.container.openGitHubReposPanel("Connect to GitHub"), "Cancel", undefined ); diff --git a/src/Explorer/Panes/GitHubReposPane.html b/src/Explorer/Panes/GitHubReposPane.html deleted file mode 100644 index 398acaeaf..000000000 --- a/src/Explorer/Panes/GitHubReposPane.html +++ /dev/null @@ -1,14 +0,0 @@ -
-
-
-
-
-
- - -
- loading indicator image -
- -
-
diff --git a/src/Explorer/Panes/GitHubReposPanel/GitHubReposPanel.test.tsx b/src/Explorer/Panes/GitHubReposPanel/GitHubReposPanel.test.tsx new file mode 100644 index 000000000..3d12139f5 --- /dev/null +++ b/src/Explorer/Panes/GitHubReposPanel/GitHubReposPanel.test.tsx @@ -0,0 +1,19 @@ +import { shallow } from "enzyme"; +import React from "react"; +import { GitHubClient } from "../../../GitHub/GitHubClient"; +import { JunoClient } from "../../../Juno/JunoClient"; +import Explorer from "../../Explorer"; +import { GitHubReposPanel } from "./GitHubReposPanel"; +const props = { + explorer: new Explorer(), + closePanel: (): void => undefined, + gitHubClientProp: new GitHubClient((): void => undefined), + junoClientProp: new JunoClient(), + openNotificationConsole: (): void => undefined, +}; +describe("GitHub Repos Panel", () => { + it("should render Default properly", () => { + const wrapper = shallow(); + expect(wrapper).toMatchSnapshot(); + }); +}); diff --git a/src/Explorer/Panes/GitHubReposPane.ts b/src/Explorer/Panes/GitHubReposPanel/GitHubReposPanel.tsx similarity index 52% rename from src/Explorer/Panes/GitHubReposPane.ts rename to src/Explorer/Panes/GitHubReposPanel/GitHubReposPanel.tsx index b360b1865..b7fd4aa82 100644 --- a/src/Explorer/Panes/GitHubReposPane.ts +++ b/src/Explorer/Panes/GitHubReposPanel/GitHubReposPanel.tsx @@ -1,27 +1,42 @@ -import _ from "underscore"; -import { Areas, HttpStatusCodes } from "../../Common/Constants"; -import * as ViewModels from "../../Contracts/ViewModels"; -import { GitHubClient, IGitHubPageInfo, IGitHubRepo } from "../../GitHub/GitHubClient"; -import { IPinnedRepo, JunoClient } from "../../Juno/JunoClient"; -import { Action, ActionModifiers } from "../../Shared/Telemetry/TelemetryConstants"; -import * as TelemetryProcessor from "../../Shared/Telemetry/TelemetryProcessor"; -import * as GitHubUtils from "../../Utils/GitHubUtils"; -import * as JunoUtils from "../../Utils/JunoUtils"; -import { AuthorizeAccessComponent } from "../Controls/GitHub/AuthorizeAccessComponent"; -import { GitHubReposComponent, GitHubReposComponentProps, RepoListItem } from "../Controls/GitHub/GitHubReposComponent"; -import { GitHubReposComponentAdapter } from "../Controls/GitHub/GitHubReposComponentAdapter"; -import { BranchesProps, PinnedReposProps, UnpinnedReposProps } from "../Controls/GitHub/ReposListComponent"; -import { ContextualPaneBase } from "./ContextualPaneBase"; -import { handleError } from "../../Common/ErrorHandlingUtils"; +import React from "react"; +import { Areas, HttpStatusCodes } from "../../../Common/Constants"; +import { handleError } from "../../../Common/ErrorHandlingUtils"; +import { GitHubClient, IGitHubPageInfo, IGitHubRepo } from "../../../GitHub/GitHubClient"; +import { IPinnedRepo, JunoClient } from "../../../Juno/JunoClient"; +import { Action, ActionModifiers } from "../../../Shared/Telemetry/TelemetryConstants"; +import * as TelemetryProcessor from "../../../Shared/Telemetry/TelemetryProcessor"; +import * as GitHubUtils from "../../../Utils/GitHubUtils"; +import * as JunoUtils from "../../../Utils/JunoUtils"; +import { AuthorizeAccessComponent } from "../../Controls/GitHub/AuthorizeAccessComponent"; +import { + GitHubReposComponent, + GitHubReposComponentProps, + RepoListItem, +} from "../../Controls/GitHub/GitHubReposComponent"; +import { ContentMainStyle } from "../../Controls/GitHub/GitHubStyleConstants"; +import { BranchesProps, PinnedReposProps, UnpinnedReposProps } from "../../Controls/GitHub/ReposListComponent"; +import Explorer from "../../Explorer"; +import { PanelInfoErrorComponent } from "../PanelInfoErrorComponent"; +import { PanelLoadingScreen } from "../PanelLoadingScreen"; -interface GitHubReposPaneOptions extends ViewModels.PaneOptions { - gitHubClient: GitHubClient; - junoClient: JunoClient; +interface IGitHubReposPanelProps { + explorer: Explorer; + closePanel: () => void; + gitHubClientProp: GitHubClient; + junoClientProp: JunoClient; + openNotificationConsole: () => void; } -export class GitHubReposPane extends ContextualPaneBase { +interface IGitHubReposPanelState { + showAuthorizationAcessState: boolean; + isExecuting: boolean; + errorMessage: string; + showErrorDetails: boolean; + gitHubReposState: GitHubReposComponentProps; +} +export class GitHubReposPanel extends React.Component { private static readonly PageSize = 30; - + private isAddedRepo = false; private gitHubClient: GitHubClient; private junoClient: JunoClient; @@ -29,73 +44,73 @@ export class GitHubReposPane extends ContextualPaneBase { private pinnedReposProps: PinnedReposProps; private unpinnedReposProps: UnpinnedReposProps; - private gitHubReposProps: GitHubReposComponentProps; - private gitHubReposAdapter: GitHubReposComponentAdapter; - private allGitHubRepos: IGitHubRepo[]; private allGitHubReposLastPageInfo?: IGitHubPageInfo; private pinnedReposUpdated: boolean; - constructor(options: GitHubReposPaneOptions) { - super(options); + constructor(props: IGitHubReposPanelProps) { + super(props); - this.gitHubClient = options.gitHubClient; - this.junoClient = options.junoClient; - - this.branchesProps = {}; - this.pinnedReposProps = { - repos: [], - }; this.unpinnedReposProps = { repos: [], hasMore: true, isLoading: true, loadMore: (): Promise => this.loadMoreUnpinnedRepos(), }; - - this.gitHubReposProps = { - showAuthorizeAccess: true, - authorizeAccessProps: { - scope: this.getOAuthScope(), - authorizeAccess: (scope): void => this.connectToGitHub(scope), - }, - reposListProps: { - branchesProps: this.branchesProps, - pinnedReposProps: this.pinnedReposProps, - unpinnedReposProps: this.unpinnedReposProps, - pinRepo: (item): Promise => this.pinRepo(item), - unpinRepo: (item): Promise => this.unpinRepo(item), - }, - addRepoProps: { - container: this.container, - getRepo: (owner, repo): Promise => this.getRepo(owner, repo), - pinRepo: (item): Promise => this.pinRepo(item), - }, - resetConnection: (): void => this.setup(true), - onOkClick: (): Promise => this.submit(), - onCancelClick: (): void => this.cancel(), + this.branchesProps = {}; + this.pinnedReposProps = { + repos: [], }; - this.gitHubReposAdapter = new GitHubReposComponentAdapter(this.gitHubReposProps); this.allGitHubRepos = []; this.allGitHubReposLastPageInfo = undefined; this.pinnedReposUpdated = false; + + this.state = { + showAuthorizationAcessState: true, + isExecuting: false, + errorMessage: "", + showErrorDetails: false, + gitHubReposState: { + showAuthorizeAccess: !this.props.explorer.notebookManager?.gitHubOAuthService.isLoggedIn(), + authorizeAccessProps: { + scope: this.getOAuthScope(), + authorizeAccess: (scope): void => this.connectToGitHub(scope), + }, + reposListProps: { + branchesProps: this.branchesProps, + pinnedReposProps: this.pinnedReposProps, + unpinnedReposProps: this.unpinnedReposProps, + pinRepo: (item): Promise => this.pinRepo(item), + unpinRepo: (item): Promise => this.unpinRepo(item), + }, + addRepoProps: { + container: this.props.explorer, + getRepo: (owner, repo): Promise => this.getRepo(owner, repo), + pinRepo: (item): Promise => this.pinRepo(item), + }, + resetConnection: (): void => this.setup(true), + onOkClick: (): Promise => this.submit(), + onCancelClick: (): void => this.props.closePanel(), + }, + }; + this.gitHubClient = this.props.gitHubClientProp; + this.junoClient = this.props.junoClientProp; + } + + componentDidMount(): void { + this.open(); } public open(): void { this.resetData(); this.setup(); - - super.open(); } public async submit(): Promise { const pinnedReposUpdated = this.pinnedReposUpdated; const reposToPin: IPinnedRepo[] = this.pinnedReposProps.repos.map((repo) => JunoUtils.toPinnedRepo(repo)); - // Submit resets data too - super.submit(); - if (pinnedReposUpdated) { try { const response = await this.junoClient.updatePinnedRepos(reposToPin); @@ -109,57 +124,44 @@ export class GitHubReposPane extends ContextualPaneBase { } public resetData(): void { - // Reset cached branches this.branchesProps = {}; - this.gitHubReposProps.reposListProps.branchesProps = this.branchesProps; - // Reset cached pinned and unpinned repos this.pinnedReposProps.repos = []; this.unpinnedReposProps.repos = []; - - // Reset cached repos this.allGitHubRepos = []; this.allGitHubReposLastPageInfo = undefined; - // Reset flags this.pinnedReposUpdated = false; this.unpinnedReposProps.hasMore = true; this.unpinnedReposProps.isLoading = true; - - this.triggerRender(); - - super.resetData(); } private getOAuthScope(): string { return ( - this.container.notebookManager?.gitHubOAuthService.getTokenObservable()()?.scope || + this.props.explorer.notebookManager?.gitHubOAuthService.getTokenObservable()()?.scope || AuthorizeAccessComponent.Scopes.Public.key ); } private setup(forceShowConnectToGitHub = false): void { - forceShowConnectToGitHub || !this.container.notebookManager?.gitHubOAuthService.isLoggedIn() + forceShowConnectToGitHub || !this.props.explorer.notebookManager?.gitHubOAuthService.isLoggedIn() ? this.setupForConnectToGitHub() : this.setupForManageRepos(); } private setupForConnectToGitHub(): void { - this.gitHubReposProps.showAuthorizeAccess = true; - this.gitHubReposProps.authorizeAccessProps.scope = this.getOAuthScope(); - this.isExecuting(false); - this.title(GitHubReposComponent.ConnectToGitHubTitle); // Used for telemetry - this.triggerRender(); + this.setState({ + isExecuting: false, + }); } private async setupForManageRepos(): Promise { - this.gitHubReposProps.showAuthorizeAccess = false; - this.isExecuting(false); - this.title(GitHubReposComponent.ManageGitHubRepoTitle); // Used for telemetry + this.setState({ + isExecuting: false, + }); TelemetryProcessor.trace(Action.NotebooksGitHubManageRepo, ActionModifiers.Mark, { dataExplorerArea: Areas.Notebook, }); - this.triggerRender(); this.refreshManageReposComponent(); } @@ -182,15 +184,15 @@ export class GitHubReposPane extends ContextualPaneBase { const branchesProps = this.branchesProps[GitHubUtils.toRepoFullName(repo.owner, repo.name)]; branchesProps.hasMore = true; branchesProps.isLoading = true; - this.triggerRender(); try { const response = await this.gitHubClient.getBranchesAsync( repo.owner, repo.name, - GitHubReposPane.PageSize, + GitHubReposPanel.PageSize, branchesProps.lastPageInfo?.endCursor ); + if (response.status !== HttpStatusCodes.OK) { throw new Error(`Received HTTP ${response.status} when fetching branches`); } @@ -205,19 +207,37 @@ export class GitHubReposPane extends ContextualPaneBase { branchesProps.isLoading = false; branchesProps.hasMore = branchesProps.lastPageInfo?.hasNextPage; - this.triggerRender(); + this.setState({ + gitHubReposState: { + ...this.state.gitHubReposState, + reposListProps: { + ...this.state.gitHubReposState.reposListProps, + branchesProps: { + ...this.state.gitHubReposState.reposListProps.branchesProps, + [GitHubUtils.toRepoFullName(repo.owner, repo.name)]: branchesProps, + }, + pinnedReposProps: { + repos: this.pinnedReposProps.repos, + }, + unpinnedReposProps: { + ...this.state.gitHubReposState.reposListProps.unpinnedReposProps, + repos: this.unpinnedReposProps.repos, + }, + }, + }, + }); } private async loadMoreUnpinnedRepos(): Promise { this.unpinnedReposProps.isLoading = true; this.unpinnedReposProps.hasMore = true; - this.triggerRender(); try { const response = await this.gitHubClient.getReposAsync( - GitHubReposPane.PageSize, + GitHubReposPanel.PageSize, this.allGitHubReposLastPageInfo?.endCursor ); + if (response.status !== HttpStatusCodes.OK) { throw new Error(`Received HTTP ${response.status} when fetching unpinned repos`); } @@ -233,7 +253,21 @@ export class GitHubReposPane extends ContextualPaneBase { this.unpinnedReposProps.isLoading = false; this.unpinnedReposProps.hasMore = this.allGitHubReposLastPageInfo?.hasNextPage; - this.triggerRender(); + + this.setState({ + gitHubReposState: { + ...this.state.gitHubReposState, + reposListProps: { + ...this.state.gitHubReposState.reposListProps, + unpinnedReposProps: { + ...this.state.gitHubReposState.reposListProps.unpinnedReposProps, + isLoading: this.unpinnedReposProps.isLoading, + hasMore: this.unpinnedReposProps.hasMore, + repos: this.unpinnedReposProps.repos, + }, + }, + }, + }); } private async getRepo(owner: string, repo: string): Promise { @@ -242,7 +276,7 @@ export class GitHubReposPane extends ContextualPaneBase { if (response.status !== HttpStatusCodes.OK) { throw new Error(`Received HTTP ${response.status} when fetching repo`); } - + this.isAddedRepo = true; return response.data; } catch (error) { handleError(error, "GitHubReposPane/getRepo", "Failed to fetch repo"); @@ -254,7 +288,7 @@ export class GitHubReposPane extends ContextualPaneBase { this.pinnedReposUpdated = true; const initialReposLength = this.pinnedReposProps.repos.length; - const existingRepo = _.find(this.pinnedReposProps.repos, (repo) => repo.key === item.key); + const existingRepo = this.pinnedReposProps.repos.find((repo) => repo.key === item.key); if (existingRepo) { existingRepo.branches = item.branches; } else { @@ -262,7 +296,6 @@ export class GitHubReposPane extends ContextualPaneBase { } this.unpinnedReposProps.repos = this.calculateUnpinnedRepos(); - this.triggerRender(); if (this.pinnedReposProps.repos.length > initialReposLength) { this.refreshBranchesForPinnedRepos(); @@ -273,7 +306,22 @@ export class GitHubReposPane extends ContextualPaneBase { this.pinnedReposUpdated = true; this.pinnedReposProps.repos = this.pinnedReposProps.repos.filter((pinnedRepo) => pinnedRepo.key !== item.key); this.unpinnedReposProps.repos = this.calculateUnpinnedRepos(); - this.triggerRender(); + + this.setState({ + gitHubReposState: { + ...this.state.gitHubReposState, + reposListProps: { + ...this.state.gitHubReposState.reposListProps, + pinnedReposProps: { + repos: this.pinnedReposProps.repos, + }, + unpinnedReposProps: { + ...this.state.gitHubReposState.reposListProps.unpinnedReposProps, + repos: this.unpinnedReposProps.repos, + }, + }, + }, + }); } private async refreshManageReposComponent(): Promise { @@ -284,12 +332,12 @@ export class GitHubReposPane extends ContextualPaneBase { private async refreshPinnedRepoListItems(): Promise { this.pinnedReposProps.repos = []; - this.triggerRender(); try { const response = await this.junoClient.getPinnedRepos( - this.container.notebookManager?.gitHubOAuthService.getTokenObservable()()?.scope + this.props.explorer.notebookManager?.gitHubOAuthService.getTokenObservable()()?.scope ); + if (response.status !== HttpStatusCodes.OK && response.status !== HttpStatusCodes.NoContent) { throw new Error(`Received HTTP ${response.status} when fetching pinned repos`); } @@ -305,7 +353,6 @@ export class GitHubReposPane extends ContextualPaneBase { ); this.pinnedReposProps.repos = pinnedRepos; - this.triggerRender(); } } catch (error) { handleError(error, "GitHubReposPane/refreshPinnedReposListItems", "Failed to fetch pinned repos"); @@ -322,28 +369,85 @@ export class GitHubReposPane extends ContextualPaneBase { isLoading: true, loadMore: (): Promise => this.loadMoreBranches(item.repo), }; + this.setState({ + gitHubReposState: { + ...this.state.gitHubReposState, + reposListProps: { + ...this.state.gitHubReposState.reposListProps, + branchesProps: { + ...this.state.gitHubReposState.reposListProps.branchesProps, + [GitHubUtils.toRepoFullName(item.repo.owner, item.repo.name)]: this.branchesProps[item.key], + }, + pinnedReposProps: { + repos: this.pinnedReposProps.repos, + }, + unpinnedReposProps: { + ...this.state.gitHubReposState.reposListProps.unpinnedReposProps, + repos: this.unpinnedReposProps.repos, + }, + }, + }, + }); this.loadMoreBranches(item.repo); + } else { + if (this.isAddedRepo === false) { + this.setState({ + gitHubReposState: { + ...this.state.gitHubReposState, + reposListProps: { + ...this.state.gitHubReposState.reposListProps, + pinnedReposProps: { + repos: this.pinnedReposProps.repos, + }, + unpinnedReposProps: { + ...this.state.gitHubReposState.reposListProps.unpinnedReposProps, + repos: this.unpinnedReposProps.repos, + }, + }, + }, + }); + } } }); + this.isAddedRepo = false; } private async refreshUnpinnedRepoListItems(): Promise { this.allGitHubRepos = []; this.allGitHubReposLastPageInfo = undefined; this.unpinnedReposProps.repos = []; + this.loadMoreUnpinnedRepos(); } private connectToGitHub(scope: string): void { - this.isExecuting(true); + this.setState({ + isExecuting: true, + }); TelemetryProcessor.trace(Action.NotebooksGitHubAuthorize, ActionModifiers.Mark, { dataExplorerArea: Areas.Notebook, scopesSelected: scope, }); - this.container.notebookManager?.gitHubOAuthService.startOAuth(scope); + this.props.explorer.notebookManager?.gitHubOAuthService.startOAuth(scope); } - private triggerRender(): void { - this.gitHubReposAdapter.triggerRender(); + render(): JSX.Element { + return ( +
+ {this.state.errorMessage && ( + + )} +
+ +
+ + {this.state.isExecuting && } + + ); } } diff --git a/src/Explorer/Panes/GitHubReposPanel/__snapshots__/GitHubReposPanel.test.tsx.snap b/src/Explorer/Panes/GitHubReposPanel/__snapshots__/GitHubReposPanel.test.tsx.snap new file mode 100644 index 000000000..6b308f110 --- /dev/null +++ b/src/Explorer/Panes/GitHubReposPanel/__snapshots__/GitHubReposPanel.test.tsx.snap @@ -0,0 +1,1319 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`GitHub Repos Panel should render Default properly 1`] = ` +
+
+ +
+
+`; diff --git a/src/Explorer/Panes/PaneComponents.ts b/src/Explorer/Panes/PaneComponents.ts index b1be4dfa4..d0a9704b6 100644 --- a/src/Explorer/Panes/PaneComponents.ts +++ b/src/Explorer/Panes/PaneComponents.ts @@ -1,7 +1,6 @@ import AddCollectionPaneTemplate from "./AddCollectionPane.html"; import AddDatabasePaneTemplate from "./AddDatabasePane.html"; import CassandraAddCollectionPaneTemplate from "./CassandraAddCollectionPane.html"; -import GitHubReposPaneTemplate from "./GitHubReposPane.html"; import GraphStylingPaneTemplate from "./GraphStylingPane.html"; import TableAddEntityPaneTemplate from "./Tables/TableAddEntityPane.html"; import TableEditEntityPaneTemplate from "./Tables/TableEditEntityPane.html"; @@ -64,12 +63,3 @@ export class CassandraAddCollectionPaneComponent { }; } } - -export class GitHubReposPaneComponent { - constructor() { - return { - viewModel: PaneComponent, - template: GitHubReposPaneTemplate, - }; - } -} diff --git a/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap b/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap index 7fd573d15..0e664fad9 100644 --- a/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap +++ b/src/Explorer/Panes/StringInputPane/__snapshots__/StringInputPane.test.tsx.snap @@ -406,6 +406,773 @@ exports[`StringInput Pane should render Create new directory properly 1`] = ` "defaultExperience": [Function], "deleteCollectionText": [Function], "deleteDatabaseText": [Function], + "gitHubClient": GitHubClient { + "errorCallback": [Function], + "ocktokit": OctokitWithDefaults { + "actions": Object { + "addSelectedRepoToOrgSecret": [Function], + "cancelWorkflowRun": [Function], + "createOrUpdateOrgSecret": [Function], + "createOrUpdateRepoSecret": [Function], + "createOrUpdateSecretForRepo": [Function], + "createRegistrationToken": [Function], + "createRegistrationTokenForOrg": [Function], + "createRegistrationTokenForRepo": [Function], + "createRemoveToken": [Function], + "createRemoveTokenForOrg": [Function], + "createRemoveTokenForRepo": [Function], + "deleteArtifact": [Function], + "deleteOrgSecret": [Function], + "deleteRepoSecret": [Function], + "deleteSecretFromRepo": [Function], + "deleteSelfHostedRunnerFromOrg": [Function], + "deleteSelfHostedRunnerFromRepo": [Function], + "deleteWorkflowRunLogs": [Function], + "downloadArtifact": [Function], + "downloadJobLogsForWorkflowRun": [Function], + "downloadWorkflowJobLogs": [Function], + "downloadWorkflowRunLogs": [Function], + "getArtifact": [Function], + "getJobForWorkflowRun": [Function], + "getOrgPublicKey": [Function], + "getOrgSecret": [Function], + "getPublicKey": [Function], + "getRepoPublicKey": [Function], + "getRepoSecret": [Function], + "getSecret": [Function], + "getSelfHostedRunner": [Function], + "getSelfHostedRunnerForOrg": [Function], + "getSelfHostedRunnerForRepo": [Function], + "getWorkflow": [Function], + "getWorkflowJob": [Function], + "getWorkflowRun": [Function], + "getWorkflowRunUsage": [Function], + "getWorkflowUsage": [Function], + "listArtifactsForRepo": [Function], + "listDownloadsForSelfHostedRunnerApplication": [Function], + "listJobsForWorkflowRun": [Function], + "listOrgSecrets": [Function], + "listRepoSecrets": [Function], + "listRepoWorkflowRuns": [Function], + "listRepoWorkflows": [Function], + "listRunnerApplicationsForOrg": [Function], + "listRunnerApplicationsForRepo": [Function], + "listSecretsForRepo": [Function], + "listSelectedReposForOrgSecret": [Function], + "listSelfHostedRunnersForOrg": [Function], + "listSelfHostedRunnersForRepo": [Function], + "listWorkflowJobLogs": [Function], + "listWorkflowRunArtifacts": [Function], + "listWorkflowRunLogs": [Function], + "listWorkflowRuns": [Function], + "listWorkflowRunsForRepo": [Function], + "reRunWorkflow": [Function], + "removeSelectedRepoFromOrgSecret": [Function], + "removeSelfHostedRunner": [Function], + "setSelectedReposForOrgSecret": [Function], + }, + "activity": Object { + "checkRepoIsStarredByAuthenticatedUser": [Function], + "checkStarringRepo": [Function], + "deleteRepoSubscription": [Function], + "deleteThreadSubscription": [Function], + "getFeeds": [Function], + "getRepoSubscription": [Function], + "getThread": [Function], + "getThreadSubscription": [Function], + "getThreadSubscriptionForAuthenticatedUser": [Function], + "listEventsForAuthenticatedUser": [Function], + "listEventsForOrg": [Function], + "listEventsForUser": [Function], + "listFeeds": [Function], + "listNotifications": [Function], + "listNotificationsForAuthenticatedUser": [Function], + "listNotificationsForRepo": [Function], + "listOrgEventsForAuthenticatedUser": [Function], + "listPublicEvents": [Function], + "listPublicEventsForOrg": [Function], + "listPublicEventsForRepoNetwork": [Function], + "listPublicEventsForUser": [Function], + "listPublicOrgEvents": [Function], + "listReceivedEventsForUser": [Function], + "listReceivedPublicEventsForUser": [Function], + "listRepoEvents": [Function], + "listRepoNotificationsForAuthenticatedUser": [Function], + "listReposStarredByAuthenticatedUser": [Function], + "listReposStarredByUser": [Function], + "listReposWatchedByUser": [Function], + "listStargazersForRepo": [Function], + "listWatchedReposForAuthenticatedUser": [Function], + "listWatchersForRepo": [Function], + "markAsRead": [Function], + "markNotificationsAsRead": [Function], + "markNotificationsAsReadForRepo": [Function], + "markRepoNotificationsAsRead": [Function], + "markThreadAsRead": [Function], + "setRepoSubscription": [Function], + "setThreadSubscription": [Function], + "starRepo": [Function], + "starRepoForAuthenticatedUser": [Function], + "unstarRepo": [Function], + "unstarRepoForAuthenticatedUser": [Function], + }, + "apps": Object { + "addRepoToInstallation": [Function], + "checkAccountIsAssociatedWithAny": [Function], + "checkAccountIsAssociatedWithAnyStubbed": [Function], + "checkToken": [Function], + "createContentAttachment": [Function], + "createFromManifest": [Function], + "createInstallationAccessToken": [Function], + "createInstallationToken": [Function], + "deleteAuthorization": [Function], + "deleteInstallation": [Function], + "deleteToken": [Function], + "getAuthenticated": [Function], + "getBySlug": [Function], + "getInstallation": [Function], + "getOrgInstallation": [Function], + "getRepoInstallation": [Function], + "getSubscriptionPlanForAccount": [Function], + "getSubscriptionPlanForAccountStubbed": [Function], + "getUserInstallation": [Function], + "listAccountsForPlan": [Function], + "listAccountsForPlanStubbed": [Function], + "listAccountsUserOrOrgOnPlan": [Function], + "listAccountsUserOrOrgOnPlanStubbed": [Function], + "listInstallationReposForAuthenticatedUser": [Function], + "listInstallations": [Function], + "listInstallationsForAuthenticatedUser": [Function], + "listMarketplacePurchasesForAuthenticatedUser": [Function], + "listMarketplacePurchasesForAuthenticatedUserStubbed": [Function], + "listPlans": [Function], + "listPlansStubbed": [Function], + "listRepos": [Function], + "listReposAccessibleToInstallation": [Function], + "listSubscriptionsForAuthenticatedUser": [Function], + "listSubscriptionsForAuthenticatedUserStubbed": [Function], + "removeRepoFromInstallation": [Function], + "resetToken": [Function], + "revokeInstallationAccessToken": [Function], + "revokeInstallationToken": [Function], + "suspendInstallation": [Function], + "unsuspendInstallation": [Function], + }, + "auth": [Function], + "checks": Object { + "create": [Function], + "createSuite": [Function], + "get": [Function], + "getSuite": [Function], + "listAnnotations": [Function], + "listForRef": [Function], + "listForSuite": [Function], + "listSuitesForRef": [Function], + "rerequestSuite": [Function], + "setSuitesPreferences": [Function], + "update": [Function], + }, + "codeScanning": Object { + "getAlert": [Function], + "listAlertsForRepo": [Function], + }, + "codesOfConduct": Object { + "getAllCodesOfConduct": [Function], + "getConductCode": [Function], + "getForRepo": [Function], + "listConductCodes": [Function], + }, + "emojis": Object { + "get": [Function], + }, + "gists": Object { + "checkIsStarred": [Function], + "create": [Function], + "createComment": [Function], + "delete": [Function], + "deleteComment": [Function], + "fork": [Function], + "get": [Function], + "getComment": [Function], + "getRevision": [Function], + "list": [Function], + "listComments": [Function], + "listCommits": [Function], + "listForUser": [Function], + "listForks": [Function], + "listPublic": [Function], + "listPublicForUser": [Function], + "listStarred": [Function], + "star": [Function], + "unstar": [Function], + "update": [Function], + "updateComment": [Function], + }, + "git": Object { + "createBlob": [Function], + "createCommit": [Function], + "createRef": [Function], + "createTag": [Function], + "createTree": [Function], + "deleteRef": [Function], + "getBlob": [Function], + "getCommit": [Function], + "getRef": [Function], + "getTag": [Function], + "getTree": [Function], + "listMatchingRefs": [Function], + "updateRef": [Function], + }, + "gitignore": Object { + "getAllTemplates": [Function], + "getTemplate": [Function], + "listTemplates": [Function], + }, + "graphql": [Function], + "hook": [Function], + "interactions": Object { + "addOrUpdateRestrictionsForOrg": [Function], + "addOrUpdateRestrictionsForRepo": [Function], + "getRestrictionsForOrg": [Function], + "getRestrictionsForRepo": [Function], + "removeRestrictionsForOrg": [Function], + "removeRestrictionsForRepo": [Function], + "setRestrictionsForOrg": [Function], + "setRestrictionsForRepo": [Function], + }, + "issues": Object { + "addAssignees": [Function], + "addLabels": [Function], + "checkAssignee": [Function], + "checkUserCanBeAssigned": [Function], + "create": [Function], + "createComment": [Function], + "createLabel": [Function], + "createMilestone": [Function], + "deleteComment": [Function], + "deleteLabel": [Function], + "deleteMilestone": [Function], + "get": [Function], + "getComment": [Function], + "getEvent": [Function], + "getLabel": [Function], + "getMilestone": [Function], + "list": [Function], + "listAssignees": [Function], + "listComments": [Function], + "listCommentsForRepo": [Function], + "listEvents": [Function], + "listEventsForRepo": [Function], + "listEventsForTimeline": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listForRepo": [Function], + "listLabelsForMilestone": [Function], + "listLabelsForRepo": [Function], + "listLabelsOnIssue": [Function], + "listMilestones": [Function], + "listMilestonesForRepo": [Function], + "lock": [Function], + "removeAllLabels": [Function], + "removeAssignees": [Function], + "removeLabel": [Function], + "removeLabels": [Function], + "replaceAllLabels": [Function], + "replaceLabels": [Function], + "setLabels": [Function], + "unlock": [Function], + "update": [Function], + "updateComment": [Function], + "updateLabel": [Function], + "updateMilestone": [Function], + }, + "licenses": Object { + "get": [Function], + "getAllCommonlyUsed": [Function], + "getForRepo": [Function], + "listCommonlyUsed": [Function], + }, + "log": Object { + "debug": [Function], + "error": [Function], + "info": [Function], + "warn": [Function], + }, + "markdown": Object { + "render": [Function], + "renderRaw": [Function], + }, + "meta": Object { + "get": [Function], + }, + "migrations": Object { + "cancelImport": [Function], + "deleteArchiveForAuthenticatedUser": [Function], + "deleteArchiveForOrg": [Function], + "downloadArchiveForOrg": [Function], + "getArchiveForAuthenticatedUser": [Function], + "getCommitAuthors": [Function], + "getImportProgress": [Function], + "getImportStatus": [Function], + "getLargeFiles": [Function], + "getStatusForAuthenticatedUser": [Function], + "getStatusForOrg": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listReposForOrg": [Function], + "listReposForUser": [Function], + "mapCommitAuthor": [Function], + "setLfsPreference": [Function], + "startForAuthenticatedUser": [Function], + "startForOrg": [Function], + "startImport": [Function], + "unlockRepoForAuthenticatedUser": [Function], + "unlockRepoForOrg": [Function], + "updateImport": [Function], + }, + "orgs": Object { + "addOrUpdateMembership": [Function], + "blockUser": [Function], + "checkBlockedUser": [Function], + "checkMembership": [Function], + "checkMembershipForUser": [Function], + "checkPublicMembership": [Function], + "checkPublicMembershipForUser": [Function], + "concealMembership": [Function], + "convertMemberToOutsideCollaborator": [Function], + "createHook": [Function], + "createInvitation": [Function], + "createWebhook": [Function], + "deleteHook": [Function], + "deleteWebhook": [Function], + "get": [Function], + "getHook": [Function], + "getMembership": [Function], + "getMembershipForAuthenticatedUser": [Function], + "getMembershipForUser": [Function], + "getWebhook": [Function], + "list": [Function], + "listAppInstallations": [Function], + "listBlockedUsers": [Function], + "listForAuthenticatedUser": [Function], + "listForUser": [Function], + "listHooks": [Function], + "listInstallations": [Function], + "listInvitationTeams": [Function], + "listMembers": [Function], + "listMemberships": [Function], + "listMembershipsForAuthenticatedUser": [Function], + "listOutsideCollaborators": [Function], + "listPendingInvitations": [Function], + "listPublicMembers": [Function], + "listWebhooks": [Function], + "pingHook": [Function], + "pingWebhook": [Function], + "publicizeMembership": [Function], + "removeMember": [Function], + "removeMembership": [Function], + "removeMembershipForUser": [Function], + "removeOutsideCollaborator": [Function], + "removePublicMembershipForAuthenticatedUser": [Function], + "setMembershipForUser": [Function], + "setPublicMembershipForAuthenticatedUser": [Function], + "unblockUser": [Function], + "update": [Function], + "updateHook": [Function], + "updateMembership": [Function], + "updateMembershipForAuthenticatedUser": [Function], + "updateWebhook": [Function], + }, + "paginate": [Function], + "projects": Object { + "addCollaborator": [Function], + "createCard": [Function], + "createColumn": [Function], + "createForAuthenticatedUser": [Function], + "createForOrg": [Function], + "createForRepo": [Function], + "delete": [Function], + "deleteCard": [Function], + "deleteColumn": [Function], + "get": [Function], + "getCard": [Function], + "getColumn": [Function], + "getPermissionForUser": [Function], + "listCards": [Function], + "listCollaborators": [Function], + "listColumns": [Function], + "listForOrg": [Function], + "listForRepo": [Function], + "listForUser": [Function], + "moveCard": [Function], + "moveColumn": [Function], + "removeCollaborator": [Function], + "reviewUserPermissionLevel": [Function], + "update": [Function], + "updateCard": [Function], + "updateColumn": [Function], + }, + "pulls": Object { + "checkIfMerged": [Function], + "create": [Function], + "createComment": [Function], + "createReplyForReviewComment": [Function], + "createReview": [Function], + "createReviewComment": [Function], + "createReviewCommentReply": [Function], + "createReviewRequest": [Function], + "deleteComment": [Function], + "deletePendingReview": [Function], + "deleteReviewComment": [Function], + "deleteReviewRequest": [Function], + "dismissReview": [Function], + "get": [Function], + "getComment": [Function], + "getCommentsForReview": [Function], + "getReview": [Function], + "getReviewComment": [Function], + "list": [Function], + "listComments": [Function], + "listCommentsForRepo": [Function], + "listCommentsForReview": [Function], + "listCommits": [Function], + "listFiles": [Function], + "listRequestedReviewers": [Function], + "listReviewComments": [Function], + "listReviewCommentsForRepo": [Function], + "listReviewRequests": [Function], + "listReviews": [Function], + "merge": [Function], + "removeRequestedReviewers": [Function], + "requestReviewers": [Function], + "submitReview": [Function], + "update": [Function], + "updateBranch": [Function], + "updateComment": [Function], + "updateReview": [Function], + "updateReviewComment": [Function], + }, + "rateLimit": Object { + "get": [Function], + }, + "reactions": Object { + "createForCommitComment": [Function], + "createForIssue": [Function], + "createForIssueComment": [Function], + "createForPullRequestReviewComment": [Function], + "createForTeamDiscussionCommentInOrg": [Function], + "createForTeamDiscussionInOrg": [Function], + "delete": [Function], + "deleteForCommitComment": [Function], + "deleteForIssue": [Function], + "deleteForIssueComment": [Function], + "deleteForPullRequestComment": [Function], + "deleteForTeamDiscussion": [Function], + "deleteForTeamDiscussionComment": [Function], + "deleteLegacy": [Function], + "listForCommitComment": [Function], + "listForIssue": [Function], + "listForIssueComment": [Function], + "listForPullRequestReviewComment": [Function], + "listForTeamDiscussionCommentInOrg": [Function], + "listForTeamDiscussionInOrg": [Function], + }, + "repos": Object { + "acceptInvitation": [Function], + "addAppAccessRestrictions": [Function], + "addCollaborator": [Function], + "addDeployKey": [Function], + "addProtectedBranchAdminEnforcement": [Function], + "addProtectedBranchAppRestrictions": [Function], + "addProtectedBranchRequiredSignatures": [Function], + "addProtectedBranchRequiredStatusChecksContexts": [Function], + "addProtectedBranchTeamRestrictions": [Function], + "addProtectedBranchUserRestrictions": [Function], + "addStatusCheckContexts": [Function], + "addTeamAccessRestrictions": [Function], + "addUserAccessRestrictions": [Function], + "checkCollaborator": [Function], + "checkVulnerabilityAlerts": [Function], + "compareCommits": [Function], + "createCommitComment": [Function], + "createCommitSignatureProtection": [Function], + "createCommitStatus": [Function], + "createDeployKey": [Function], + "createDeployment": [Function], + "createDeploymentStatus": [Function], + "createDispatchEvent": [Function], + "createForAuthenticatedUser": [Function], + "createFork": [Function], + "createHook": [Function], + "createInOrg": [Function], + "createOrUpdateFile": [Function], + "createOrUpdateFileContents": [Function], + "createPagesSite": [Function], + "createRelease": [Function], + "createStatus": [Function], + "createUsingTemplate": [Function], + "createWebhook": [Function], + "declineInvitation": [Function], + "delete": [Function], + "deleteAccessRestrictions": [Function], + "deleteAdminBranchProtection": [Function], + "deleteBranchProtection": [Function], + "deleteCommitComment": [Function], + "deleteCommitSignatureProtection": [Function], + "deleteDeployKey": [Function], + "deleteDeployment": [Function], + "deleteDownload": [Function], + "deleteFile": [Function], + "deleteHook": [Function], + "deleteInvitation": [Function], + "deletePagesSite": [Function], + "deletePullRequestReviewProtection": [Function], + "deleteRelease": [Function], + "deleteReleaseAsset": [Function], + "deleteWebhook": [Function], + "disableAutomatedSecurityFixes": [Function], + "disablePagesSite": [Function], + "disableVulnerabilityAlerts": [Function], + "downloadArchive": [Function], + "enableAutomatedSecurityFixes": [Function], + "enablePagesSite": [Function], + "enableVulnerabilityAlerts": [Function], + "get": [Function], + "getAccessRestrictions": [Function], + "getAdminBranchProtection": [Function], + "getAllStatusCheckContexts": [Function], + "getAllTopics": [Function], + "getAppsWithAccessToProtectedBranch": [Function], + "getArchiveLink": [Function], + "getBranch": [Function], + "getBranchProtection": [Function], + "getClones": [Function], + "getCodeFrequencyStats": [Function], + "getCollaboratorPermissionLevel": [Function], + "getCombinedStatusForRef": [Function], + "getCommit": [Function], + "getCommitActivityStats": [Function], + "getCommitComment": [Function], + "getCommitSignatureProtection": [Function], + "getCommunityProfileMetrics": [Function], + "getContent": [Function], + "getContents": [Function], + "getContributorsStats": [Function], + "getDeployKey": [Function], + "getDeployment": [Function], + "getDeploymentStatus": [Function], + "getDownload": [Function], + "getHook": [Function], + "getLatestPagesBuild": [Function], + "getLatestRelease": [Function], + "getPages": [Function], + "getPagesBuild": [Function], + "getParticipationStats": [Function], + "getProtectedBranchAdminEnforcement": [Function], + "getProtectedBranchPullRequestReviewEnforcement": [Function], + "getProtectedBranchRequiredSignatures": [Function], + "getProtectedBranchRequiredStatusChecks": [Function], + "getProtectedBranchRestrictions": [Function], + "getPullRequestReviewProtection": [Function], + "getPunchCardStats": [Function], + "getReadme": [Function], + "getRelease": [Function], + "getReleaseAsset": [Function], + "getReleaseByTag": [Function], + "getStatusChecksProtection": [Function], + "getTeamsWithAccessToProtectedBranch": [Function], + "getTopPaths": [Function], + "getTopReferrers": [Function], + "getUsersWithAccessToProtectedBranch": [Function], + "getViews": [Function], + "getWebhook": [Function], + "list": [Function], + "listAssetsForRelease": [Function], + "listBranches": [Function], + "listBranchesForHeadCommit": [Function], + "listCollaborators": [Function], + "listCommentsForCommit": [Function], + "listCommitComments": [Function], + "listCommitCommentsForRepo": [Function], + "listCommitStatusesForRef": [Function], + "listCommits": [Function], + "listContributors": [Function], + "listDeployKeys": [Function], + "listDeploymentStatuses": [Function], + "listDeployments": [Function], + "listDownloads": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listForUser": [Function], + "listForks": [Function], + "listHooks": [Function], + "listInvitations": [Function], + "listInvitationsForAuthenticatedUser": [Function], + "listLanguages": [Function], + "listPagesBuilds": [Function], + "listProtectedBranchRequiredStatusChecksContexts": [Function], + "listPublic": [Function], + "listPullRequestsAssociatedWithCommit": [Function], + "listReleaseAssets": [Function], + "listReleases": [Function], + "listStatusesForRef": [Function], + "listTags": [Function], + "listTeams": [Function], + "listTopics": [Function], + "listWebhooks": [Function], + "merge": [Function], + "pingHook": [Function], + "pingWebhook": [Function], + "removeAppAccessRestrictions": [Function], + "removeBranchProtection": [Function], + "removeCollaborator": [Function], + "removeDeployKey": [Function], + "removeProtectedBranchAdminEnforcement": [Function], + "removeProtectedBranchAppRestrictions": [Function], + "removeProtectedBranchPullRequestReviewEnforcement": [Function], + "removeProtectedBranchRequiredSignatures": [Function], + "removeProtectedBranchRequiredStatusChecks": [Function], + "removeProtectedBranchRequiredStatusChecksContexts": [Function], + "removeProtectedBranchRestrictions": [Function], + "removeProtectedBranchTeamRestrictions": [Function], + "removeProtectedBranchUserRestrictions": [Function], + "removeStatusCheckContexts": [Function], + "removeStatusCheckProtection": [Function], + "removeTeamAccessRestrictions": [Function], + "removeUserAccessRestrictions": [Function], + "replaceAllTopics": [Function], + "replaceProtectedBranchAppRestrictions": [Function], + "replaceProtectedBranchRequiredStatusChecksContexts": [Function], + "replaceProtectedBranchTeamRestrictions": [Function], + "replaceProtectedBranchUserRestrictions": [Function], + "replaceTopics": [Function], + "requestPageBuild": [Function], + "requestPagesBuild": [Function], + "retrieveCommunityProfileMetrics": [Function], + "setAdminBranchProtection": [Function], + "setAppAccessRestrictions": [Function], + "setStatusCheckContexts": [Function], + "setTeamAccessRestrictions": [Function], + "setUserAccessRestrictions": [Function], + "testPushHook": [Function], + "testPushWebhook": [Function], + "transfer": [Function], + "update": [Function], + "updateBranchProtection": [Function], + "updateCommitComment": [Function], + "updateHook": [Function], + "updateInformationAboutPagesSite": [Function], + "updateInvitation": [Function], + "updateProtectedBranchPullRequestReviewEnforcement": [Function], + "updateProtectedBranchRequiredStatusChecks": [Function], + "updatePullRequestReviewProtection": [Function], + "updateRelease": [Function], + "updateReleaseAsset": [Function], + "updateStatusCheckPotection": [Function], + "updateWebhook": [Function], + "uploadReleaseAsset": [Function], + }, + "request": [Function], + "search": Object { + "code": [Function], + "commits": [Function], + "issuesAndPullRequests": [Function], + "labels": [Function], + "repos": [Function], + "topics": [Function], + "users": [Function], + }, + "teams": Object { + "addOrUpdateMembershipForUserInOrg": [Function], + "addOrUpdateMembershipInOrg": [Function], + "addOrUpdateProjectInOrg": [Function], + "addOrUpdateProjectPermissionsInOrg": [Function], + "addOrUpdateRepoInOrg": [Function], + "addOrUpdateRepoPermissionsInOrg": [Function], + "checkManagesRepoInOrg": [Function], + "checkPermissionsForProjectInOrg": [Function], + "checkPermissionsForRepoInOrg": [Function], + "create": [Function], + "createDiscussionCommentInOrg": [Function], + "createDiscussionInOrg": [Function], + "deleteDiscussionCommentInOrg": [Function], + "deleteDiscussionInOrg": [Function], + "deleteInOrg": [Function], + "getByName": [Function], + "getDiscussionCommentInOrg": [Function], + "getDiscussionInOrg": [Function], + "getMembershipForUserInOrg": [Function], + "getMembershipInOrg": [Function], + "list": [Function], + "listChildInOrg": [Function], + "listDiscussionCommentsInOrg": [Function], + "listDiscussionsInOrg": [Function], + "listForAuthenticatedUser": [Function], + "listMembersInOrg": [Function], + "listPendingInvitationsInOrg": [Function], + "listProjectsInOrg": [Function], + "listReposInOrg": [Function], + "removeMembershipForUserInOrg": [Function], + "removeMembershipInOrg": [Function], + "removeProjectInOrg": [Function], + "removeRepoInOrg": [Function], + "reviewProjectInOrg": [Function], + "updateDiscussionCommentInOrg": [Function], + "updateDiscussionInOrg": [Function], + "updateInOrg": [Function], + }, + "users": Object { + "addEmailForAuthenticated": [Function], + "addEmails": [Function], + "block": [Function], + "checkBlocked": [Function], + "checkFollowing": [Function], + "checkFollowingForUser": [Function], + "checkPersonIsFollowedByAuthenticated": [Function], + "createGpgKey": [Function], + "createGpgKeyForAuthenticated": [Function], + "createPublicKey": [Function], + "createPublicSshKeyForAuthenticated": [Function], + "deleteEmailForAuthenticated": [Function], + "deleteEmails": [Function], + "deleteGpgKey": [Function], + "deleteGpgKeyForAuthenticated": [Function], + "deletePublicKey": [Function], + "deletePublicSshKeyForAuthenticated": [Function], + "follow": [Function], + "getAuthenticated": [Function], + "getByUsername": [Function], + "getContextForUser": [Function], + "getGpgKey": [Function], + "getGpgKeyForAuthenticated": [Function], + "getPublicKey": [Function], + "getPublicSshKeyForAuthenticated": [Function], + "list": [Function], + "listBlocked": [Function], + "listBlockedByAuthenticated": [Function], + "listEmails": [Function], + "listEmailsForAuthenticated": [Function], + "listFollowedByAuthenticated": [Function], + "listFollowersForAuthenticatedUser": [Function], + "listFollowersForUser": [Function], + "listFollowingForAuthenticatedUser": [Function], + "listFollowingForUser": [Function], + "listGpgKeys": [Function], + "listGpgKeysForAuthenticated": [Function], + "listGpgKeysForUser": [Function], + "listPublicEmails": [Function], + "listPublicEmailsForAuthenticated": [Function], + "listPublicKeys": [Function], + "listPublicKeysForUser": [Function], + "listPublicSshKeysForAuthenticated": [Function], + "setPrimaryEmailVisibilityForAuthenticated": [Function], + "togglePrimaryEmailVisibility": [Function], + "unblock": [Function], + "unfollow": [Function], + "updateAuthenticated": [Function], + }, + }, + }, "graphStylingPane": GraphStylingPane { "container": [Circular], "firstFieldHasFocus": [Function], @@ -431,7 +1198,6 @@ exports[`StringInput Pane should render Create new directory properly 1`] = ` "isAutoscaleDefaultEnabled": [Function], "isEnableMongoCapabilityPresent": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function], - "isGitHubPaneEnabled": [Function], "isHostedDataExplorerEnabled": [Function], "isLeftPaneExpanded": [Function], "isMongoIndexingEnabled": [Function], @@ -446,9 +1212,14 @@ exports[`StringInput Pane should render Create new directory properly 1`] = ` "isSparkEnabledForAccount": [Function], "isSynapseLinkUpdating": [Function], "isTabsContentExpanded": [Function], + "junoClient": JunoClient { + "cachedPinnedRepos": [Function], + "databaseAccount": undefined, + }, "memoryUsageInfo": [Function], "notebookBasePath": [Function], "notebookServerInfo": [Function], + "onGitHubClientError": [Function], "onRefreshDatabasesKeyPress": [Function], "onRefreshResourcesClick": [Function], "onSwitchToConnectionString": [Function], diff --git a/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap b/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap index 022b8e7c4..46710be04 100644 --- a/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap +++ b/src/Explorer/Panes/__snapshots__/DeleteDatabaseConfirmationPanel.test.tsx.snap @@ -404,6 +404,773 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database "defaultExperience": [Function], "deleteCollectionText": [Function], "deleteDatabaseText": [Function], + "gitHubClient": GitHubClient { + "errorCallback": [Function], + "ocktokit": OctokitWithDefaults { + "actions": Object { + "addSelectedRepoToOrgSecret": [Function], + "cancelWorkflowRun": [Function], + "createOrUpdateOrgSecret": [Function], + "createOrUpdateRepoSecret": [Function], + "createOrUpdateSecretForRepo": [Function], + "createRegistrationToken": [Function], + "createRegistrationTokenForOrg": [Function], + "createRegistrationTokenForRepo": [Function], + "createRemoveToken": [Function], + "createRemoveTokenForOrg": [Function], + "createRemoveTokenForRepo": [Function], + "deleteArtifact": [Function], + "deleteOrgSecret": [Function], + "deleteRepoSecret": [Function], + "deleteSecretFromRepo": [Function], + "deleteSelfHostedRunnerFromOrg": [Function], + "deleteSelfHostedRunnerFromRepo": [Function], + "deleteWorkflowRunLogs": [Function], + "downloadArtifact": [Function], + "downloadJobLogsForWorkflowRun": [Function], + "downloadWorkflowJobLogs": [Function], + "downloadWorkflowRunLogs": [Function], + "getArtifact": [Function], + "getJobForWorkflowRun": [Function], + "getOrgPublicKey": [Function], + "getOrgSecret": [Function], + "getPublicKey": [Function], + "getRepoPublicKey": [Function], + "getRepoSecret": [Function], + "getSecret": [Function], + "getSelfHostedRunner": [Function], + "getSelfHostedRunnerForOrg": [Function], + "getSelfHostedRunnerForRepo": [Function], + "getWorkflow": [Function], + "getWorkflowJob": [Function], + "getWorkflowRun": [Function], + "getWorkflowRunUsage": [Function], + "getWorkflowUsage": [Function], + "listArtifactsForRepo": [Function], + "listDownloadsForSelfHostedRunnerApplication": [Function], + "listJobsForWorkflowRun": [Function], + "listOrgSecrets": [Function], + "listRepoSecrets": [Function], + "listRepoWorkflowRuns": [Function], + "listRepoWorkflows": [Function], + "listRunnerApplicationsForOrg": [Function], + "listRunnerApplicationsForRepo": [Function], + "listSecretsForRepo": [Function], + "listSelectedReposForOrgSecret": [Function], + "listSelfHostedRunnersForOrg": [Function], + "listSelfHostedRunnersForRepo": [Function], + "listWorkflowJobLogs": [Function], + "listWorkflowRunArtifacts": [Function], + "listWorkflowRunLogs": [Function], + "listWorkflowRuns": [Function], + "listWorkflowRunsForRepo": [Function], + "reRunWorkflow": [Function], + "removeSelectedRepoFromOrgSecret": [Function], + "removeSelfHostedRunner": [Function], + "setSelectedReposForOrgSecret": [Function], + }, + "activity": Object { + "checkRepoIsStarredByAuthenticatedUser": [Function], + "checkStarringRepo": [Function], + "deleteRepoSubscription": [Function], + "deleteThreadSubscription": [Function], + "getFeeds": [Function], + "getRepoSubscription": [Function], + "getThread": [Function], + "getThreadSubscription": [Function], + "getThreadSubscriptionForAuthenticatedUser": [Function], + "listEventsForAuthenticatedUser": [Function], + "listEventsForOrg": [Function], + "listEventsForUser": [Function], + "listFeeds": [Function], + "listNotifications": [Function], + "listNotificationsForAuthenticatedUser": [Function], + "listNotificationsForRepo": [Function], + "listOrgEventsForAuthenticatedUser": [Function], + "listPublicEvents": [Function], + "listPublicEventsForOrg": [Function], + "listPublicEventsForRepoNetwork": [Function], + "listPublicEventsForUser": [Function], + "listPublicOrgEvents": [Function], + "listReceivedEventsForUser": [Function], + "listReceivedPublicEventsForUser": [Function], + "listRepoEvents": [Function], + "listRepoNotificationsForAuthenticatedUser": [Function], + "listReposStarredByAuthenticatedUser": [Function], + "listReposStarredByUser": [Function], + "listReposWatchedByUser": [Function], + "listStargazersForRepo": [Function], + "listWatchedReposForAuthenticatedUser": [Function], + "listWatchersForRepo": [Function], + "markAsRead": [Function], + "markNotificationsAsRead": [Function], + "markNotificationsAsReadForRepo": [Function], + "markRepoNotificationsAsRead": [Function], + "markThreadAsRead": [Function], + "setRepoSubscription": [Function], + "setThreadSubscription": [Function], + "starRepo": [Function], + "starRepoForAuthenticatedUser": [Function], + "unstarRepo": [Function], + "unstarRepoForAuthenticatedUser": [Function], + }, + "apps": Object { + "addRepoToInstallation": [Function], + "checkAccountIsAssociatedWithAny": [Function], + "checkAccountIsAssociatedWithAnyStubbed": [Function], + "checkToken": [Function], + "createContentAttachment": [Function], + "createFromManifest": [Function], + "createInstallationAccessToken": [Function], + "createInstallationToken": [Function], + "deleteAuthorization": [Function], + "deleteInstallation": [Function], + "deleteToken": [Function], + "getAuthenticated": [Function], + "getBySlug": [Function], + "getInstallation": [Function], + "getOrgInstallation": [Function], + "getRepoInstallation": [Function], + "getSubscriptionPlanForAccount": [Function], + "getSubscriptionPlanForAccountStubbed": [Function], + "getUserInstallation": [Function], + "listAccountsForPlan": [Function], + "listAccountsForPlanStubbed": [Function], + "listAccountsUserOrOrgOnPlan": [Function], + "listAccountsUserOrOrgOnPlanStubbed": [Function], + "listInstallationReposForAuthenticatedUser": [Function], + "listInstallations": [Function], + "listInstallationsForAuthenticatedUser": [Function], + "listMarketplacePurchasesForAuthenticatedUser": [Function], + "listMarketplacePurchasesForAuthenticatedUserStubbed": [Function], + "listPlans": [Function], + "listPlansStubbed": [Function], + "listRepos": [Function], + "listReposAccessibleToInstallation": [Function], + "listSubscriptionsForAuthenticatedUser": [Function], + "listSubscriptionsForAuthenticatedUserStubbed": [Function], + "removeRepoFromInstallation": [Function], + "resetToken": [Function], + "revokeInstallationAccessToken": [Function], + "revokeInstallationToken": [Function], + "suspendInstallation": [Function], + "unsuspendInstallation": [Function], + }, + "auth": [Function], + "checks": Object { + "create": [Function], + "createSuite": [Function], + "get": [Function], + "getSuite": [Function], + "listAnnotations": [Function], + "listForRef": [Function], + "listForSuite": [Function], + "listSuitesForRef": [Function], + "rerequestSuite": [Function], + "setSuitesPreferences": [Function], + "update": [Function], + }, + "codeScanning": Object { + "getAlert": [Function], + "listAlertsForRepo": [Function], + }, + "codesOfConduct": Object { + "getAllCodesOfConduct": [Function], + "getConductCode": [Function], + "getForRepo": [Function], + "listConductCodes": [Function], + }, + "emojis": Object { + "get": [Function], + }, + "gists": Object { + "checkIsStarred": [Function], + "create": [Function], + "createComment": [Function], + "delete": [Function], + "deleteComment": [Function], + "fork": [Function], + "get": [Function], + "getComment": [Function], + "getRevision": [Function], + "list": [Function], + "listComments": [Function], + "listCommits": [Function], + "listForUser": [Function], + "listForks": [Function], + "listPublic": [Function], + "listPublicForUser": [Function], + "listStarred": [Function], + "star": [Function], + "unstar": [Function], + "update": [Function], + "updateComment": [Function], + }, + "git": Object { + "createBlob": [Function], + "createCommit": [Function], + "createRef": [Function], + "createTag": [Function], + "createTree": [Function], + "deleteRef": [Function], + "getBlob": [Function], + "getCommit": [Function], + "getRef": [Function], + "getTag": [Function], + "getTree": [Function], + "listMatchingRefs": [Function], + "updateRef": [Function], + }, + "gitignore": Object { + "getAllTemplates": [Function], + "getTemplate": [Function], + "listTemplates": [Function], + }, + "graphql": [Function], + "hook": [Function], + "interactions": Object { + "addOrUpdateRestrictionsForOrg": [Function], + "addOrUpdateRestrictionsForRepo": [Function], + "getRestrictionsForOrg": [Function], + "getRestrictionsForRepo": [Function], + "removeRestrictionsForOrg": [Function], + "removeRestrictionsForRepo": [Function], + "setRestrictionsForOrg": [Function], + "setRestrictionsForRepo": [Function], + }, + "issues": Object { + "addAssignees": [Function], + "addLabels": [Function], + "checkAssignee": [Function], + "checkUserCanBeAssigned": [Function], + "create": [Function], + "createComment": [Function], + "createLabel": [Function], + "createMilestone": [Function], + "deleteComment": [Function], + "deleteLabel": [Function], + "deleteMilestone": [Function], + "get": [Function], + "getComment": [Function], + "getEvent": [Function], + "getLabel": [Function], + "getMilestone": [Function], + "list": [Function], + "listAssignees": [Function], + "listComments": [Function], + "listCommentsForRepo": [Function], + "listEvents": [Function], + "listEventsForRepo": [Function], + "listEventsForTimeline": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listForRepo": [Function], + "listLabelsForMilestone": [Function], + "listLabelsForRepo": [Function], + "listLabelsOnIssue": [Function], + "listMilestones": [Function], + "listMilestonesForRepo": [Function], + "lock": [Function], + "removeAllLabels": [Function], + "removeAssignees": [Function], + "removeLabel": [Function], + "removeLabels": [Function], + "replaceAllLabels": [Function], + "replaceLabels": [Function], + "setLabels": [Function], + "unlock": [Function], + "update": [Function], + "updateComment": [Function], + "updateLabel": [Function], + "updateMilestone": [Function], + }, + "licenses": Object { + "get": [Function], + "getAllCommonlyUsed": [Function], + "getForRepo": [Function], + "listCommonlyUsed": [Function], + }, + "log": Object { + "debug": [Function], + "error": [Function], + "info": [Function], + "warn": [Function], + }, + "markdown": Object { + "render": [Function], + "renderRaw": [Function], + }, + "meta": Object { + "get": [Function], + }, + "migrations": Object { + "cancelImport": [Function], + "deleteArchiveForAuthenticatedUser": [Function], + "deleteArchiveForOrg": [Function], + "downloadArchiveForOrg": [Function], + "getArchiveForAuthenticatedUser": [Function], + "getCommitAuthors": [Function], + "getImportProgress": [Function], + "getImportStatus": [Function], + "getLargeFiles": [Function], + "getStatusForAuthenticatedUser": [Function], + "getStatusForOrg": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listReposForOrg": [Function], + "listReposForUser": [Function], + "mapCommitAuthor": [Function], + "setLfsPreference": [Function], + "startForAuthenticatedUser": [Function], + "startForOrg": [Function], + "startImport": [Function], + "unlockRepoForAuthenticatedUser": [Function], + "unlockRepoForOrg": [Function], + "updateImport": [Function], + }, + "orgs": Object { + "addOrUpdateMembership": [Function], + "blockUser": [Function], + "checkBlockedUser": [Function], + "checkMembership": [Function], + "checkMembershipForUser": [Function], + "checkPublicMembership": [Function], + "checkPublicMembershipForUser": [Function], + "concealMembership": [Function], + "convertMemberToOutsideCollaborator": [Function], + "createHook": [Function], + "createInvitation": [Function], + "createWebhook": [Function], + "deleteHook": [Function], + "deleteWebhook": [Function], + "get": [Function], + "getHook": [Function], + "getMembership": [Function], + "getMembershipForAuthenticatedUser": [Function], + "getMembershipForUser": [Function], + "getWebhook": [Function], + "list": [Function], + "listAppInstallations": [Function], + "listBlockedUsers": [Function], + "listForAuthenticatedUser": [Function], + "listForUser": [Function], + "listHooks": [Function], + "listInstallations": [Function], + "listInvitationTeams": [Function], + "listMembers": [Function], + "listMemberships": [Function], + "listMembershipsForAuthenticatedUser": [Function], + "listOutsideCollaborators": [Function], + "listPendingInvitations": [Function], + "listPublicMembers": [Function], + "listWebhooks": [Function], + "pingHook": [Function], + "pingWebhook": [Function], + "publicizeMembership": [Function], + "removeMember": [Function], + "removeMembership": [Function], + "removeMembershipForUser": [Function], + "removeOutsideCollaborator": [Function], + "removePublicMembershipForAuthenticatedUser": [Function], + "setMembershipForUser": [Function], + "setPublicMembershipForAuthenticatedUser": [Function], + "unblockUser": [Function], + "update": [Function], + "updateHook": [Function], + "updateMembership": [Function], + "updateMembershipForAuthenticatedUser": [Function], + "updateWebhook": [Function], + }, + "paginate": [Function], + "projects": Object { + "addCollaborator": [Function], + "createCard": [Function], + "createColumn": [Function], + "createForAuthenticatedUser": [Function], + "createForOrg": [Function], + "createForRepo": [Function], + "delete": [Function], + "deleteCard": [Function], + "deleteColumn": [Function], + "get": [Function], + "getCard": [Function], + "getColumn": [Function], + "getPermissionForUser": [Function], + "listCards": [Function], + "listCollaborators": [Function], + "listColumns": [Function], + "listForOrg": [Function], + "listForRepo": [Function], + "listForUser": [Function], + "moveCard": [Function], + "moveColumn": [Function], + "removeCollaborator": [Function], + "reviewUserPermissionLevel": [Function], + "update": [Function], + "updateCard": [Function], + "updateColumn": [Function], + }, + "pulls": Object { + "checkIfMerged": [Function], + "create": [Function], + "createComment": [Function], + "createReplyForReviewComment": [Function], + "createReview": [Function], + "createReviewComment": [Function], + "createReviewCommentReply": [Function], + "createReviewRequest": [Function], + "deleteComment": [Function], + "deletePendingReview": [Function], + "deleteReviewComment": [Function], + "deleteReviewRequest": [Function], + "dismissReview": [Function], + "get": [Function], + "getComment": [Function], + "getCommentsForReview": [Function], + "getReview": [Function], + "getReviewComment": [Function], + "list": [Function], + "listComments": [Function], + "listCommentsForRepo": [Function], + "listCommentsForReview": [Function], + "listCommits": [Function], + "listFiles": [Function], + "listRequestedReviewers": [Function], + "listReviewComments": [Function], + "listReviewCommentsForRepo": [Function], + "listReviewRequests": [Function], + "listReviews": [Function], + "merge": [Function], + "removeRequestedReviewers": [Function], + "requestReviewers": [Function], + "submitReview": [Function], + "update": [Function], + "updateBranch": [Function], + "updateComment": [Function], + "updateReview": [Function], + "updateReviewComment": [Function], + }, + "rateLimit": Object { + "get": [Function], + }, + "reactions": Object { + "createForCommitComment": [Function], + "createForIssue": [Function], + "createForIssueComment": [Function], + "createForPullRequestReviewComment": [Function], + "createForTeamDiscussionCommentInOrg": [Function], + "createForTeamDiscussionInOrg": [Function], + "delete": [Function], + "deleteForCommitComment": [Function], + "deleteForIssue": [Function], + "deleteForIssueComment": [Function], + "deleteForPullRequestComment": [Function], + "deleteForTeamDiscussion": [Function], + "deleteForTeamDiscussionComment": [Function], + "deleteLegacy": [Function], + "listForCommitComment": [Function], + "listForIssue": [Function], + "listForIssueComment": [Function], + "listForPullRequestReviewComment": [Function], + "listForTeamDiscussionCommentInOrg": [Function], + "listForTeamDiscussionInOrg": [Function], + }, + "repos": Object { + "acceptInvitation": [Function], + "addAppAccessRestrictions": [Function], + "addCollaborator": [Function], + "addDeployKey": [Function], + "addProtectedBranchAdminEnforcement": [Function], + "addProtectedBranchAppRestrictions": [Function], + "addProtectedBranchRequiredSignatures": [Function], + "addProtectedBranchRequiredStatusChecksContexts": [Function], + "addProtectedBranchTeamRestrictions": [Function], + "addProtectedBranchUserRestrictions": [Function], + "addStatusCheckContexts": [Function], + "addTeamAccessRestrictions": [Function], + "addUserAccessRestrictions": [Function], + "checkCollaborator": [Function], + "checkVulnerabilityAlerts": [Function], + "compareCommits": [Function], + "createCommitComment": [Function], + "createCommitSignatureProtection": [Function], + "createCommitStatus": [Function], + "createDeployKey": [Function], + "createDeployment": [Function], + "createDeploymentStatus": [Function], + "createDispatchEvent": [Function], + "createForAuthenticatedUser": [Function], + "createFork": [Function], + "createHook": [Function], + "createInOrg": [Function], + "createOrUpdateFile": [Function], + "createOrUpdateFileContents": [Function], + "createPagesSite": [Function], + "createRelease": [Function], + "createStatus": [Function], + "createUsingTemplate": [Function], + "createWebhook": [Function], + "declineInvitation": [Function], + "delete": [Function], + "deleteAccessRestrictions": [Function], + "deleteAdminBranchProtection": [Function], + "deleteBranchProtection": [Function], + "deleteCommitComment": [Function], + "deleteCommitSignatureProtection": [Function], + "deleteDeployKey": [Function], + "deleteDeployment": [Function], + "deleteDownload": [Function], + "deleteFile": [Function], + "deleteHook": [Function], + "deleteInvitation": [Function], + "deletePagesSite": [Function], + "deletePullRequestReviewProtection": [Function], + "deleteRelease": [Function], + "deleteReleaseAsset": [Function], + "deleteWebhook": [Function], + "disableAutomatedSecurityFixes": [Function], + "disablePagesSite": [Function], + "disableVulnerabilityAlerts": [Function], + "downloadArchive": [Function], + "enableAutomatedSecurityFixes": [Function], + "enablePagesSite": [Function], + "enableVulnerabilityAlerts": [Function], + "get": [Function], + "getAccessRestrictions": [Function], + "getAdminBranchProtection": [Function], + "getAllStatusCheckContexts": [Function], + "getAllTopics": [Function], + "getAppsWithAccessToProtectedBranch": [Function], + "getArchiveLink": [Function], + "getBranch": [Function], + "getBranchProtection": [Function], + "getClones": [Function], + "getCodeFrequencyStats": [Function], + "getCollaboratorPermissionLevel": [Function], + "getCombinedStatusForRef": [Function], + "getCommit": [Function], + "getCommitActivityStats": [Function], + "getCommitComment": [Function], + "getCommitSignatureProtection": [Function], + "getCommunityProfileMetrics": [Function], + "getContent": [Function], + "getContents": [Function], + "getContributorsStats": [Function], + "getDeployKey": [Function], + "getDeployment": [Function], + "getDeploymentStatus": [Function], + "getDownload": [Function], + "getHook": [Function], + "getLatestPagesBuild": [Function], + "getLatestRelease": [Function], + "getPages": [Function], + "getPagesBuild": [Function], + "getParticipationStats": [Function], + "getProtectedBranchAdminEnforcement": [Function], + "getProtectedBranchPullRequestReviewEnforcement": [Function], + "getProtectedBranchRequiredSignatures": [Function], + "getProtectedBranchRequiredStatusChecks": [Function], + "getProtectedBranchRestrictions": [Function], + "getPullRequestReviewProtection": [Function], + "getPunchCardStats": [Function], + "getReadme": [Function], + "getRelease": [Function], + "getReleaseAsset": [Function], + "getReleaseByTag": [Function], + "getStatusChecksProtection": [Function], + "getTeamsWithAccessToProtectedBranch": [Function], + "getTopPaths": [Function], + "getTopReferrers": [Function], + "getUsersWithAccessToProtectedBranch": [Function], + "getViews": [Function], + "getWebhook": [Function], + "list": [Function], + "listAssetsForRelease": [Function], + "listBranches": [Function], + "listBranchesForHeadCommit": [Function], + "listCollaborators": [Function], + "listCommentsForCommit": [Function], + "listCommitComments": [Function], + "listCommitCommentsForRepo": [Function], + "listCommitStatusesForRef": [Function], + "listCommits": [Function], + "listContributors": [Function], + "listDeployKeys": [Function], + "listDeploymentStatuses": [Function], + "listDeployments": [Function], + "listDownloads": [Function], + "listForAuthenticatedUser": [Function], + "listForOrg": [Function], + "listForUser": [Function], + "listForks": [Function], + "listHooks": [Function], + "listInvitations": [Function], + "listInvitationsForAuthenticatedUser": [Function], + "listLanguages": [Function], + "listPagesBuilds": [Function], + "listProtectedBranchRequiredStatusChecksContexts": [Function], + "listPublic": [Function], + "listPullRequestsAssociatedWithCommit": [Function], + "listReleaseAssets": [Function], + "listReleases": [Function], + "listStatusesForRef": [Function], + "listTags": [Function], + "listTeams": [Function], + "listTopics": [Function], + "listWebhooks": [Function], + "merge": [Function], + "pingHook": [Function], + "pingWebhook": [Function], + "removeAppAccessRestrictions": [Function], + "removeBranchProtection": [Function], + "removeCollaborator": [Function], + "removeDeployKey": [Function], + "removeProtectedBranchAdminEnforcement": [Function], + "removeProtectedBranchAppRestrictions": [Function], + "removeProtectedBranchPullRequestReviewEnforcement": [Function], + "removeProtectedBranchRequiredSignatures": [Function], + "removeProtectedBranchRequiredStatusChecks": [Function], + "removeProtectedBranchRequiredStatusChecksContexts": [Function], + "removeProtectedBranchRestrictions": [Function], + "removeProtectedBranchTeamRestrictions": [Function], + "removeProtectedBranchUserRestrictions": [Function], + "removeStatusCheckContexts": [Function], + "removeStatusCheckProtection": [Function], + "removeTeamAccessRestrictions": [Function], + "removeUserAccessRestrictions": [Function], + "replaceAllTopics": [Function], + "replaceProtectedBranchAppRestrictions": [Function], + "replaceProtectedBranchRequiredStatusChecksContexts": [Function], + "replaceProtectedBranchTeamRestrictions": [Function], + "replaceProtectedBranchUserRestrictions": [Function], + "replaceTopics": [Function], + "requestPageBuild": [Function], + "requestPagesBuild": [Function], + "retrieveCommunityProfileMetrics": [Function], + "setAdminBranchProtection": [Function], + "setAppAccessRestrictions": [Function], + "setStatusCheckContexts": [Function], + "setTeamAccessRestrictions": [Function], + "setUserAccessRestrictions": [Function], + "testPushHook": [Function], + "testPushWebhook": [Function], + "transfer": [Function], + "update": [Function], + "updateBranchProtection": [Function], + "updateCommitComment": [Function], + "updateHook": [Function], + "updateInformationAboutPagesSite": [Function], + "updateInvitation": [Function], + "updateProtectedBranchPullRequestReviewEnforcement": [Function], + "updateProtectedBranchRequiredStatusChecks": [Function], + "updatePullRequestReviewProtection": [Function], + "updateRelease": [Function], + "updateReleaseAsset": [Function], + "updateStatusCheckPotection": [Function], + "updateWebhook": [Function], + "uploadReleaseAsset": [Function], + }, + "request": [Function], + "search": Object { + "code": [Function], + "commits": [Function], + "issuesAndPullRequests": [Function], + "labels": [Function], + "repos": [Function], + "topics": [Function], + "users": [Function], + }, + "teams": Object { + "addOrUpdateMembershipForUserInOrg": [Function], + "addOrUpdateMembershipInOrg": [Function], + "addOrUpdateProjectInOrg": [Function], + "addOrUpdateProjectPermissionsInOrg": [Function], + "addOrUpdateRepoInOrg": [Function], + "addOrUpdateRepoPermissionsInOrg": [Function], + "checkManagesRepoInOrg": [Function], + "checkPermissionsForProjectInOrg": [Function], + "checkPermissionsForRepoInOrg": [Function], + "create": [Function], + "createDiscussionCommentInOrg": [Function], + "createDiscussionInOrg": [Function], + "deleteDiscussionCommentInOrg": [Function], + "deleteDiscussionInOrg": [Function], + "deleteInOrg": [Function], + "getByName": [Function], + "getDiscussionCommentInOrg": [Function], + "getDiscussionInOrg": [Function], + "getMembershipForUserInOrg": [Function], + "getMembershipInOrg": [Function], + "list": [Function], + "listChildInOrg": [Function], + "listDiscussionCommentsInOrg": [Function], + "listDiscussionsInOrg": [Function], + "listForAuthenticatedUser": [Function], + "listMembersInOrg": [Function], + "listPendingInvitationsInOrg": [Function], + "listProjectsInOrg": [Function], + "listReposInOrg": [Function], + "removeMembershipForUserInOrg": [Function], + "removeMembershipInOrg": [Function], + "removeProjectInOrg": [Function], + "removeRepoInOrg": [Function], + "reviewProjectInOrg": [Function], + "updateDiscussionCommentInOrg": [Function], + "updateDiscussionInOrg": [Function], + "updateInOrg": [Function], + }, + "users": Object { + "addEmailForAuthenticated": [Function], + "addEmails": [Function], + "block": [Function], + "checkBlocked": [Function], + "checkFollowing": [Function], + "checkFollowingForUser": [Function], + "checkPersonIsFollowedByAuthenticated": [Function], + "createGpgKey": [Function], + "createGpgKeyForAuthenticated": [Function], + "createPublicKey": [Function], + "createPublicSshKeyForAuthenticated": [Function], + "deleteEmailForAuthenticated": [Function], + "deleteEmails": [Function], + "deleteGpgKey": [Function], + "deleteGpgKeyForAuthenticated": [Function], + "deletePublicKey": [Function], + "deletePublicSshKeyForAuthenticated": [Function], + "follow": [Function], + "getAuthenticated": [Function], + "getByUsername": [Function], + "getContextForUser": [Function], + "getGpgKey": [Function], + "getGpgKeyForAuthenticated": [Function], + "getPublicKey": [Function], + "getPublicSshKeyForAuthenticated": [Function], + "list": [Function], + "listBlocked": [Function], + "listBlockedByAuthenticated": [Function], + "listEmails": [Function], + "listEmailsForAuthenticated": [Function], + "listFollowedByAuthenticated": [Function], + "listFollowersForAuthenticatedUser": [Function], + "listFollowersForUser": [Function], + "listFollowingForAuthenticatedUser": [Function], + "listFollowingForUser": [Function], + "listGpgKeys": [Function], + "listGpgKeysForAuthenticated": [Function], + "listGpgKeysForUser": [Function], + "listPublicEmails": [Function], + "listPublicEmailsForAuthenticated": [Function], + "listPublicKeys": [Function], + "listPublicKeysForUser": [Function], + "listPublicSshKeysForAuthenticated": [Function], + "setPrimaryEmailVisibilityForAuthenticated": [Function], + "togglePrimaryEmailVisibility": [Function], + "unblock": [Function], + "unfollow": [Function], + "updateAuthenticated": [Function], + }, + }, + }, "graphStylingPane": GraphStylingPane { "container": [Circular], "firstFieldHasFocus": [Function], @@ -429,7 +1196,6 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database "isAutoscaleDefaultEnabled": [Function], "isEnableMongoCapabilityPresent": [Function], "isFixedCollectionWithSharedThroughputSupported": [Function], - "isGitHubPaneEnabled": [Function], "isHostedDataExplorerEnabled": [Function], "isLastCollection": [Function], "isLastNonEmptyDatabase": [Function], @@ -447,9 +1213,14 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database "isSparkEnabledForAccount": [Function], "isSynapseLinkUpdating": [Function], "isTabsContentExpanded": [Function], + "junoClient": JunoClient { + "cachedPinnedRepos": [Function], + "databaseAccount": undefined, + }, "memoryUsageInfo": [Function], "notebookBasePath": [Function], "notebookServerInfo": [Function], + "onGitHubClientError": [Function], "onRefreshDatabasesKeyPress": [Function], "onRefreshResourcesClick": [Function], "onSwitchToConnectionString": [Function], diff --git a/src/Explorer/Tree/ResourceTreeAdapter.tsx b/src/Explorer/Tree/ResourceTreeAdapter.tsx index 9fff2bafd..4acfb9576 100644 --- a/src/Explorer/Tree/ResourceTreeAdapter.tsx +++ b/src/Explorer/Tree/ResourceTreeAdapter.tsx @@ -607,7 +607,7 @@ export class ResourceTreeAdapter implements ReactAdapter { gitHubNotebooksTree.contextMenu = [ { label: "Manage GitHub settings", - onClick: () => this.container.gitHubReposPane.open(), + onClick: () => this.container.openGitHubReposPanel("Manage GitHub settings"), }, { label: "Disconnect from GitHub", diff --git a/src/Main.tsx b/src/Main.tsx index 8970ffbc8..ccdde0f57 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -53,7 +53,6 @@ import { useConfig } from "./hooks/useConfig"; import { useKnockoutExplorer } from "./hooks/useKnockoutExplorer"; import { useSidePanel } from "./hooks/useSidePanel"; import { useTabs } from "./hooks/useTabs"; -import { KOCommentEnd, KOCommentIfStart } from "./koComment"; import "./Libs/jquery"; import "./Shared/appInsights"; import { userContext } from "./UserContext"; @@ -232,9 +231,6 @@ const App: React.FunctionComponent = () => {
- -
- {showDialog && }
); diff --git a/src/koComment.tsx b/src/koComment.tsx deleted file mode 100644 index 7b9f8f889..000000000 --- a/src/koComment.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/* eslint-disable react/prop-types */ -import React, { useEffect, useRef } from "react"; - -export const KOCommentIfStart: React.FunctionComponent<{ if: string }> = (props) => { - const el = useRef(); - useEffect(() => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (el.current as any).outerHTML = ``; - }, []); - return
; -}; - -export const KOCommentEnd: React.FunctionComponent = () => { - const el = useRef(); - useEffect(() => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (el.current as any).outerHTML = ``; - }, []); - return
; -};