"maintain" cannot be used to verify actor permissions
- Dominant language
- JavaScript
- Stars
- 167
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Issue
The "maintain" permission cannot be used to to verify the actor permissions. As a user with the "maintain" permission I would expect the following configuration to work. However, a comment is created that I only have the "write" permission.
Reading the GH API docs, it clearly states the "permission" field uses legacy base roles and that "maintain" is mapped to "write" [(ref)](https://docs.github.com/en/rest/collaborators/collaborators?apiVersion=2026-03-10#get-repository-permissions-for-a-user). So the output is expected but it is not clearly stated in this Action's documentation. Furthermore, using this legacy permission field of the API prevents us from differentiating between users with the write and users with the maintain role. In our case, we only want maintainers to be able to use the defined command and not developers with the "write" role.
### Action Configuration
```yaml
steps:
- uses: github/command@v2
id: command
with:
command: "/tf-apply"
permissions: maintain,admin
allowed_contexts: pull_request
reaction: "rocket"
skip_ci: true
```
### Relevant Actions Log Output
```
👋 , seems as if you have not maintain/admin permissions in this repo, permissions: write
```
### Extra Information
_No response_
Contributor guide
Research direction
Start with the supplied github/command@v2 configuration and the permission check that produces the shown log output. Compare the GitHub API permission field with the maintain and write roles, then verify the behavior using the provided workflow configuration. Done means maintain users can be distinguished from write users, or the limitation is clearly documented if the API cannot support that distinction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, javascript
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100