Skip to content

Commit 312a29c

Browse files
committed
Remove maintain permissions
1 parent 2922e87 commit 312a29c

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Advanced usage with some custom configuration:
4545
command: .restart # can be anything you want (example)
4646
reaction: "eyes"
4747
allowed_contexts: "pull_request,issue"
48-
permissions: "maintain,admin"
48+
permissions: "write,admin"
4949
allowlist: monalisa
5050
```
5151
@@ -190,7 +190,7 @@ As seen above, we have a single example step. Perhaps you would actually use a r
190190
| `success_reaction` | `true` | `+1` | The reaction to add to the comment that triggered the Action if its execution was successful |
191191
| `failure_reaction` | `true` | `-1` | The reaction to add to the comment that triggered the Action if its execution failed |
192192
| `allowed_contexts` | `true` | `pull_request` | A comma separated list of comment contexts that are allowed to trigger this IssueOps command. Pull requests and issues are the only currently supported contexts. To allow IssueOps commands to be invoked from both PRs and issues, set this option to the following: `"pull_request,issue"`. By default, the only place this Action will allow IssueOps commands from is pull requests |
193-
| `permissions` | `true` | `"write,maintain,admin"` | The allowed GitHub permissions an actor can have to invoke IssueOps commands |
193+
| `permissions` | `true` | `"write,admin"` | The allowed GitHub permissions an actor can have to invoke IssueOps commands |
194194
| `allow_drafts` | `true` | `"false"` | Whether or not to allow this IssueOps command to be run on draft pull requests |
195195
| `allow_forks` | `true` | `"false"` | Whether or not to allow this IssueOps command to be run on forked pull requests |
196196
| `skip_ci` | `true` | `"false"` | Whether or not to require passing CI checks before this IssueOps command can be run |

__tests__/functions/prechecks.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ beforeEach(() => {
1818
jest.spyOn(core, 'debug').mockImplementation(() => {})
1919
jest.spyOn(core, 'warning').mockImplementation(() => {})
2020
jest.spyOn(core, 'setOutput').mockImplementation(() => {})
21-
process.env.INPUT_PERMISSIONS = 'admin,write,maintain'
21+
process.env.INPUT_PERMISSIONS = 'admin,write'
2222

2323
jest.spyOn(validPermissions, 'validPermissions').mockImplementation(() => {
2424
return true

__tests__/functions/valid-permissions.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var context
88
beforeEach(() => {
99
jest.clearAllMocks()
1010
jest.spyOn(core, 'setOutput').mockImplementation(() => {})
11-
process.env.INPUT_PERMISSIONS = 'write,maintain,admin'
11+
process.env.INPUT_PERMISSIONS = 'write,admin'
1212

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

4646
expect(await validPermissions(octokit, context)).toEqual(
47-
'👋 __monalisa__, seems as if you have not write/maintain/admin permissions in this repo, permissions: read'
47+
'👋 __monalisa__, seems as if you have not write/admin permissions in this repo, permissions: read'
4848
)
4949
expect(setOutputMock).toHaveBeenCalledWith('actor', 'monalisa')
5050
})

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ inputs:
3333
required: true
3434
default: "pull_request"
3535
permissions:
36-
description: 'The allowed GitHub permissions an actor can have to invoke IssueOps commands - Example: "write,maintain,admin"'
36+
description: 'The allowed GitHub permissions an actor can have to invoke IssueOps commands - Example: "write,admin"'
3737
required: true
38-
default: "write,maintain,admin"
38+
default: "write,admin"
3939
allow_drafts:
4040
description: 'Whether or not to allow this IssueOps command to be run on draft pull requests'
4141
required: true

0 commit comments

Comments
 (0)