fix(scaffolder-backend-module-github): createEnvironmentVariable missing owner and repo
Signed-off-by: Diego Iglesias <diegohi@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend-module-github': patch
|
||||
---
|
||||
|
||||
Fixed issue with octokit call missing owner and repo when creating environment variables using github:environment:create action
|
||||
+4
@@ -221,6 +221,8 @@ describe('github:environment:create examples', () => {
|
||||
mockOctokit.rest.actions.createEnvironmentVariable,
|
||||
).toHaveBeenCalledWith({
|
||||
repository_id: 'repoid',
|
||||
owner: 'owner',
|
||||
repo: 'repository',
|
||||
environment_name: 'envname',
|
||||
name: 'key1',
|
||||
value: 'val1',
|
||||
@@ -229,6 +231,8 @@ describe('github:environment:create examples', () => {
|
||||
mockOctokit.rest.actions.createEnvironmentVariable,
|
||||
).toHaveBeenCalledWith({
|
||||
repository_id: 'repoid',
|
||||
owner: 'owner',
|
||||
repo: 'repository',
|
||||
environment_name: 'envname',
|
||||
name: 'key2',
|
||||
value: 'val2',
|
||||
|
||||
@@ -240,6 +240,8 @@ describe('github:environment:create', () => {
|
||||
mockOctokit.rest.actions.createEnvironmentVariable,
|
||||
).toHaveBeenCalledWith({
|
||||
repository_id: 'repoid',
|
||||
owner: 'owner',
|
||||
repo: 'repository',
|
||||
environment_name: 'envname',
|
||||
name: 'key1',
|
||||
value: 'val1',
|
||||
@@ -248,6 +250,8 @@ describe('github:environment:create', () => {
|
||||
mockOctokit.rest.actions.createEnvironmentVariable,
|
||||
).toHaveBeenCalledWith({
|
||||
repository_id: 'repoid',
|
||||
owner: 'owner',
|
||||
repo: 'repository',
|
||||
environment_name: 'envname',
|
||||
name: 'key2',
|
||||
value: 'val2',
|
||||
|
||||
@@ -187,6 +187,8 @@ export function createGithubEnvironmentAction(options: {
|
||||
for (const [key, value] of Object.entries(environmentVariables ?? {})) {
|
||||
await client.rest.actions.createEnvironmentVariable({
|
||||
repository_id: repository.data.id,
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
environment_name: name,
|
||||
name: key,
|
||||
value,
|
||||
|
||||
Reference in New Issue
Block a user