replacing workflow:write scope with workflow, workflow:write is invalid.
Signed-off-by: Marco Crivellaro <marco.crive@gmail.com>
This commit is contained in:
@@ -364,7 +364,7 @@ spec:
|
||||
secretsKey: USER_OAUTH_TOKEN
|
||||
additionalScopes:
|
||||
github:
|
||||
- workflow:write
|
||||
- workflow
|
||||
allowedHosts:
|
||||
- github.com
|
||||
...
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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'],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user