You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sync: viewer_repo_role lookup uses the wrong REST shape #16
`gitcabin sync link` tries to fetch `viewer_permission` from `/repos//`. That field doesn't exist on the REST endpoint — it's a GraphQL Repository.viewerPermission field. REST returns a `permissions` object with `{admin, maintain, push, triage, pull}` booleans for the authenticated user.
Current behavior: the lookup silently falls through to "READ" for every link, which then makes viewer_can_close_or_reopen wrong on synced items the user actually owns.
Fix: either query GraphQL for viewerPermission, or map the REST permissions object to a role string (admin → ADMIN, maintain → MAINTAIN, push → WRITE, triage → TRIAGE, pull → READ).
Also surface a way to override role manually via `gitcabin sync link --role ADMIN`, which already exists but the auto path needs to actually work.
Activity