"maintain" cannot be used to verify actor permissions
- Langage dominant
- JavaScript
- Étoiles
- 167
- Forks
- 17
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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_
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la configuration github/command@v2 fournie et la vérification des permissions qui produit la sortie de journal affichée. Comparez le champ de permission de la GitHub API avec les rôles maintain et write, puis vérifiez le comportement à l’aide de la configuration de workflow fournie. Le travail est terminé lorsque les utilisateurs ayant le rôle maintain peuvent être distingués des utilisateurs ayant le rôle write, ou lorsque la limitation est clairement documentée si l’API ne permet pas cette distinction.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- github-actions, javascript
- Domaine
- ci-cd
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100