"maintain" cannot be used to verify actor permissions
- Vorherrschende Sprache
- JavaScript
- Sterne
- 167
- Forks
- 17
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### 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_
Beitragsleitfaden
Rechercherichtung
Beginnen Sie mit der bereitgestellten github/command@v2-Konfiguration und der Berechtigungsprüfung, die die gezeigte Protokollausgabe erzeugt. Vergleichen Sie das Berechtigungsfeld der GitHub API mit den Rollen maintain und write, und überprüfen Sie anschließend das Verhalten anhand der bereitgestellten Workflow-Konfiguration. Als erledigt gilt die Aufgabe, wenn Benutzer mit der Rolle maintain von Benutzern mit der Rolle write unterschieden werden können oder die Einschränkung eindeutig dokumentiert ist, falls die API diese Unterscheidung nicht unterstützt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- github-actions, javascript
- Bereich
- ci-cd
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100