Skip to content

Commit 116d22f

Browse files
committed
Merge with main
2 parents 2fed691 + d200981 commit 116d22f

28 files changed

+91
-964
lines changed

package-lock.json

Lines changed: 31 additions & 242 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,12 @@
311311
},
312312
{
313313
"command": "containerApps.openGitHubRepo",
314-
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /azureContainerActionsConnected/i",
314+
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /actionsConnected:true(.*)containerAppsActionsItem/i",
315315
"group": "1@1"
316316
},
317317
{
318318
"command": "containerApps.disconnectRepo",
319-
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /azureContainerActionsConnected/i",
319+
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /actionsConnected:true(.*)containerAppsActionsItem/i",
320320
"group": "1@2"
321321
}
322322
],
@@ -376,7 +376,6 @@
376376
"@azure/ms-rest-azure-env": "^2.0.0",
377377
"@microsoft/eslint-config-azuretools": "^0.2.1",
378378
"@microsoft/vscode-azext-dev": "^2.0.1",
379-
"@octokit/types": "^9.1.0",
380379
"@types/deep-eql": "^4.0.0",
381380
"@types/fs-extra": "^8.1.1",
382381
"@types/gulp": "^4.0.6",
@@ -410,9 +409,9 @@
410409
"@azure/core-rest-pipeline": "1.10.3",
411410
"@azure/storage-blob": "^12.4.1",
412411
"@microsoft/vscode-azext-azureutils": "^2.0.0",
412+
"@microsoft/vscode-azext-github": "^1.0.0",
413413
"@microsoft/vscode-azext-utils": "^2.0.0",
414414
"@microsoft/vscode-azureresources-api": "^2.0.2",
415-
"@octokit/rest": "^18.5.2",
416415
"buffer": "^6.0.3",
417416
"dayjs": "^1.11.3",
418417
"deep-eql": "^4.1.3",

src/commands/gitHub/connectToGitHub/IConnectToGitHubContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import type { Registry } from '@azure/arm-containerregistry';
7+
import type { GitHubContext } from '@microsoft/vscode-azext-github';
78
import type { ExecuteActivityContext } from "@microsoft/vscode-azext-utils";
8-
import type { IGitHubContext } from '../../../gitHub/IGitHubContext';
99
import type { ContainerAppModel } from "../../../tree/ContainerAppItem";
1010
import type { IContainerAppContext } from '../../IContainerAppContext';
1111

12-
export interface IConnectToGitHubContext extends IContainerAppContext, IGitHubContext, ExecuteActivityContext {
12+
export interface IConnectToGitHubContext extends IContainerAppContext, GitHubContext, ExecuteActivityContext {
1313
// Make containerApp _required_
1414
containerApp: ContainerAppModel;
1515

src/commands/gitHub/connectToGitHub/connectToGitHub.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
import { GitHubBranchListStep, GitHubOrgListStep, GitHubRepositoryListStep } from "@microsoft/vscode-azext-github";
67
import { AzureWizard, AzureWizardExecuteStep, AzureWizardPromptStep, ITreeItemPickerContext, createSubscriptionContext } from "@microsoft/vscode-azext-utils";
7-
import { GitHubBranchListStep } from "../../../gitHub/GitHubBranchListStep";
8-
import { GitHubOrgListStep } from "../../../gitHub/GitHubOrgListStep";
9-
import { GitHubRepositoryListStep } from "../../../gitHub/GitHubRepositoryListStep";
10-
import { getGitHubAccessToken } from "../../../gitHub/getGitHubAccessToken";
118
import type { ContainerAppItem } from "../../../tree/ContainerAppItem";
129
import { createActivityContext } from "../../../utils/activityUtils";
1310
import { localize } from "../../../utils/localize";
@@ -35,7 +32,6 @@ export async function connectToGitHub(context: ITreeItemPickerContext & Partial<
3532
...await createActivityContext(),
3633
subscription,
3734
containerApp,
38-
gitHubAccessToken: await getGitHubAccessToken()
3935
};
4036

4137
if (await isGitHubConnected(wizardContext)) {

src/commands/gitHub/disconnectRepo/GitHubRepositoryDisconnectStep.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import type { ContainerAppsAPIClient, SourceControl } from "@azure/arm-appcontainers";
7-
import { AzureWizardExecuteStep, nonNullProp } from "@microsoft/vscode-azext-utils";
7+
import { gitHubUrlParse } from "@microsoft/vscode-azext-github";
8+
import { AzureWizardExecuteStep, nonNullProp, nonNullValue } from "@microsoft/vscode-azext-utils";
89
import type { Progress } from "vscode";
910
import { ext } from "../../../extensionVariables";
10-
import { gitHubUrlParse } from "../../../gitHub/gitHubUrlParse";
1111
import { createContainerAppsClient } from "../../../utils/azureClients";
1212
import { localize } from "../../../utils/localize";
1313
import { getContainerAppSourceControl } from "../connectToGitHub/getContainerAppSourceControl";
@@ -20,7 +20,7 @@ export class GitHubRepositoryDisconnectStep extends AzureWizardExecuteStep<IDisc
2020
const client: ContainerAppsAPIClient = await createContainerAppsClient(context, context.subscription);
2121
const sourceControl: SourceControl | undefined = await getContainerAppSourceControl(context, context.subscription, context.containerApp);
2222

23-
const { ownerOrOrganization: owner, repositoryName: repo } = gitHubUrlParse(sourceControl?.repoUrl);
23+
const { ownerOrOrganization: owner, repositoryName: repo } = gitHubUrlParse(nonNullValue(sourceControl?.repoUrl));
2424

2525
const rgName: string = context.containerApp.resourceGroup;
2626
const caName: string = context.containerApp.name;

src/commands/gitHub/disconnectRepo/IDisconnectRepoContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
import type { GitHubContext } from "@microsoft/vscode-azext-github";
67
import type { ExecuteActivityContext } from "@microsoft/vscode-azext-utils";
7-
import type { IGitHubContext } from "../../../gitHub/IGitHubContext";
88
import type { ContainerAppModel } from "../../../tree/ContainerAppItem";
99
import type { IContainerAppContext } from "../../IContainerAppContext";
1010

11-
export interface IDisconnectRepoContext extends IContainerAppContext, IGitHubContext, ExecuteActivityContext {
11+
export interface IDisconnectRepoContext extends IContainerAppContext, GitHubContext, ExecuteActivityContext {
1212
// Make containerApp _required_
1313
containerApp: ContainerAppModel;
1414
}

src/commands/gitHub/disconnectRepo/disconnectRepo.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
import { getGitHubAccessToken } from "@microsoft/vscode-azext-github";
67
import { AzureWizard, AzureWizardExecuteStep, ITreeItemPickerContext, createSubscriptionContext } from "@microsoft/vscode-azext-utils";
7-
import { getGitHubAccessToken } from "../../../gitHub/getGitHubAccessToken";
88
import { ContainerAppsItem } from "../../../tree/ContainerAppsBranchDataProvider";
9-
import { ActionsTreeItem } from "../../../tree/gitHub/ActionsTreeItem";
9+
import { ActionsItem } from "../../../tree/configurations/ActionsItem";
1010
import { createActivityContext } from "../../../utils/activityUtils";
1111
import { localize } from "../../../utils/localize";
1212
import { pickContainerApp } from "../../../utils/pickContainerApp";
1313
import { isGitHubConnected } from "../connectToGitHub/isGitHubConnected";
1414
import { GitHubRepositoryDisconnectStep } from "./GitHubRepositoryDisconnectStep";
1515
import { IDisconnectRepoContext } from "./IDisconnectRepoContext";
1616

17-
export async function disconnectRepo(context: ITreeItemPickerContext & Partial<IDisconnectRepoContext>, node?: ContainerAppsItem | ActionsTreeItem): Promise<void> {
17+
export async function disconnectRepo(context: ITreeItemPickerContext & Partial<IDisconnectRepoContext>, node?: ContainerAppsItem | ActionsItem): Promise<void> {
1818
if (!node) {
1919
context.suppressCreatePick = true;
2020
node = await pickContainerApp(context);

src/commands/gitHub/openGitHubRepo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
import type { SourceControl } from "@azure/arm-appcontainers";
77
import { ITreeItemPickerContext, openUrl } from "@microsoft/vscode-azext-utils";
88
import type { ContainerAppsItem } from "../../tree/ContainerAppsBranchDataProvider";
9-
import type { ActionsTreeItem } from "../../tree/gitHub/ActionsTreeItem";
9+
import type { ActionsItem } from "../../tree/configurations/ActionsItem";
1010
import { localize } from "../../utils/localize";
1111
import { pickContainerApp } from "../../utils/pickContainerApp";
1212
import { getContainerAppSourceControl } from "./connectToGitHub/getContainerAppSourceControl";
1313

14-
export async function openGitHubRepo(context: ITreeItemPickerContext, node?: ContainerAppsItem | ActionsTreeItem): Promise<void> {
14+
export async function openGitHubRepo(context: ITreeItemPickerContext, node?: ContainerAppsItem | ActionsItem): Promise<void> {
1515
if (!node) {
1616
context.suppressCreatePick = true;
1717
node = await pickContainerApp(context);

src/gitHub/GitHubBranchListStep.ts

Lines changed: 0 additions & 60 deletions
This file was deleted.

src/gitHub/GitHubOrgListStep.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)