Skip to content

Commit 4b5b669

Browse files
committed
add comment clarifying maintain mapping
1 parent f765d39 commit 4b5b669

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pkg/lockdown/lockdown.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ func (c *RepoAccessCache) checkPushAccess(ctx context.Context, username, owner,
267267
return false, fmt.Errorf("failed to get user permission level: %w", err)
268268
}
269269

270+
// REST API maps "maintain" to "write" (and "triage" to "read")
271+
// https://docs.github.com/en/rest/collaborators/collaborators#get-repository-permissions-for-a-user
270272
permission := permLevel.GetPermission()
271273
return permission == "admin" || permission == "write", nil
272274
}

0 commit comments

Comments
 (0)