Skip to content

Commit 365765a

Browse files
committed
Update secret and variable parameters
1 parent 7965503 commit 365765a

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

src/commands/secrets/addSecret.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,14 @@ export async function createOrUpdateEnvSecret(
6666
value: string
6767
) {
6868
const keyResponse = await context.client.actions.getEnvironmentPublicKey({
69-
repository_id: context.id,
69+
owner: context.owner,
70+
repo: context.name,
7071
environment_name: environment
7172
});
7273

7374
await context.client.actions.createOrUpdateEnvironmentSecret({
74-
repository_id: context.id,
75+
owner: context.owner,
76+
repo: context.name,
7577
environment_name: environment,
7678
secret_name: name,
7779
key_id: keyResponse.data.key_id,

src/commands/secrets/deleteSecret.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export function registerDeleteSecret(context: vscode.ExtensionContext) {
1818
if (answer === acceptText) {
1919
if (environment) {
2020
await gitHubRepoContext.client.actions.deleteEnvironmentSecret({
21-
repository_id: gitHubRepoContext.id,
21+
owner: gitHubRepoContext.owner,
22+
repo: gitHubRepoContext.name,
2223
environment_name: environment.name,
2324
secret_name: secret.name
2425
});

src/commands/variables/addVariable.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export function registerAddVariable(context: vscode.ExtensionContext) {
3131
try {
3232
if ("environment" in args) {
3333
await gitHubRepoContext.client.actions.createEnvironmentVariable({
34-
repository_id: gitHubRepoContext.id,
34+
owner: gitHubRepoContext.owner,
35+
repo: gitHubRepoContext.name,
3536
environment_name: args.environment.name,
3637
name,
3738
value

src/treeViews/settings/environmentSecretsNode.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export class EnvironmentSecretsNode extends vscode.TreeItem {
2121
secrets = await this.gitHubRepoContext.client.paginate(
2222
this.gitHubRepoContext.client.actions.listEnvironmentSecrets,
2323
{
24-
repository_id: this.gitHubRepoContext.id,
24+
owner: this.gitHubRepoContext.owner,
25+
repo: this.gitHubRepoContext.name,
2526
environment_name: this.environment.name,
2627
per_page: 100
2728
},

src/treeViews/settings/environmentVariablesNode.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export class EnvironmentVariablesNode extends vscode.TreeItem {
2121
variables = await this.gitHubRepoContext.client.paginate(
2222
this.gitHubRepoContext.client.actions.listEnvironmentVariables,
2323
{
24-
repository_id: this.gitHubRepoContext.id,
24+
owner: this.gitHubRepoContext.owner,
25+
repo: this.gitHubRepoContext.name,
2526
environment_name: this.environment.name,
2627
per_page: 100
2728
},

0 commit comments

Comments
 (0)