fix: admins unable to approve PRs due to incorrect role mapping (#33)

This commit is contained in:
Zack Pollard
2026-04-22 17:34:52 +01:00
committed by GitHub
parent dff18b8da6
commit a7f7700834
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -113,7 +113,7 @@ The JSON structure should be:
"username": "user1",
"id": 12345
},
"role": "admin"
"role": "immich_admin"
},
{
"github": {
@@ -125,7 +125,7 @@ The JSON structure should be:
]
```
Users with `role` of "admin" or "team" are authorized to approve pull requests.
Users with `role` of "immich_admin", "team", or "immich" are authorized to approve pull requests.
## How It Works
+2 -2
View File
@@ -6,7 +6,7 @@
import { createOctokitForInstallation } from './auth.js';
import { CheckRunManager } from './check-runs.js';
type Role = 'admin' | 'team' | 'contributor' | 'support' | 'futo' | 'yucca';
type Role = 'immich_admin' | 'team' | 'immich' | 'contributor' | 'support' | 'futo' | 'yucca';
interface User {
github: {
@@ -25,7 +25,7 @@ interface User {
function hasApproverRole(user: User): boolean {
const roles = user.roles ?? (user.role ? [user.role] : []);
return roles.includes('admin') || roles.includes('team');
return roles.includes('immich_admin') || roles.includes('team') || roles.includes('immich');
}
interface Review {