From e0308ca6ecd9eeda728abea5b4dfda4e61a6d6fe Mon Sep 17 00:00:00 2001 From: Marco Crivellaro Date: Wed, 16 Mar 2022 17:19:26 +0000 Subject: [PATCH] replacing workflow:write scope with workflow, workflow:write is invalid. Signed-off-by: Marco Crivellaro --- docs/features/software-templates/writing-templates.md | 2 +- packages/integration-react/src/api/ScmAuth.test.ts | 4 ++-- .../components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/features/software-templates/writing-templates.md b/docs/features/software-templates/writing-templates.md index 9a1cfdf736..0163877a8b 100644 --- a/docs/features/software-templates/writing-templates.md +++ b/docs/features/software-templates/writing-templates.md @@ -364,7 +364,7 @@ spec: secretsKey: USER_OAUTH_TOKEN additionalScopes: github: - - workflow:write + - workflow allowedHosts: - github.com ... diff --git a/packages/integration-react/src/api/ScmAuth.test.ts b/packages/integration-react/src/api/ScmAuth.test.ts index 1ad391d8d2..7e174c4cbf 100644 --- a/packages/integration-react/src/api/ScmAuth.test.ts +++ b/packages/integration-react/src/api/ScmAuth.test.ts @@ -153,11 +153,11 @@ describe('ScmAuth', () => { githubAuth.getCredentials({ url: 'http://example.com', additionalScope: { - customScopes: { github: ['org:read', 'workflow:write'] }, + customScopes: { github: ['org:read', 'workflow'] }, }, }), ).resolves.toMatchObject({ - token: 'repo read:org read:user org:read workflow:write', + token: 'repo read:org read:user org:read workflow', }); const gitlabAuth = ScmAuth.forGitlab(mockAuthApi); diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx index 22043d5761..7fac9f7840 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.test.tsx @@ -138,7 +138,7 @@ describe('RepoUrlPicker', () => { 'ui:options': { requestUserCredentials: { secretsKey: 'testKey', - additionalScopes: { github: ['workflow:write'] }, + additionalScopes: { github: ['workflow'] }, }, }, }} @@ -164,7 +164,7 @@ describe('RepoUrlPicker', () => { additionalScope: { repoWrite: true, customScopes: { - github: ['workflow:write'], + github: ['workflow'], }, }, });