Remove maintain permissions by GrantBirki · Pull Request #68 · github/command · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
2 changes: 1 addition & 1 deletion __tests__/functions/prechecks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ beforeEach(() => {
jest.spyOn(core, 'debug').mockImplementation(() => {})
jest.spyOn(core, 'warning').mockImplementation(() => {})
jest.spyOn(core, 'setOutput').mockImplementation(() => {})
process.env.INPUT_PERMISSIONS = 'admin,write,maintain'
process.env.INPUT_PERMISSIONS = 'admin,write'

jest.spyOn(validPermissions, 'validPermissions').mockImplementation(() => {
return true
Expand Down
4 changes: 2 additions & 2 deletions __tests__/functions/valid-permissions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var context
beforeEach(() => {
jest.clearAllMocks()
jest.spyOn(core, 'setOutput').mockImplementation(() => {})
process.env.INPUT_PERMISSIONS = 'write,maintain,admin'
process.env.INPUT_PERMISSIONS = 'write,admin'

context = {
actor: 'monalisa'
Expand Down Expand Up @@ -44,7 +44,7 @@ test('determines that a user has does not valid permissions to invoke the Action
})

expect(await validPermissions(octokit, context)).toEqual(
'👋 __monalisa__, seems as if you have not write/maintain/admin permissions in this repo, permissions: read'
'👋 __monalisa__, seems as if you have not write/admin permissions in this repo, permissions: read'
)
expect(setOutputMock).toHaveBeenCalledWith('actor', 'monalisa')
})
Expand Down
4 changes: 2 additions & 2 deletions action.yml