Repository navigation
Document direct-collaborators-only grant and revoke behavior - #200
Conversation
Describe how repository Grant and Revoke handle inherited access. Grant returns GrantAlreadyExists when the user already has the requested permission through a team, the org base permission, or org ownership. Revoke removes only the direct collaborator or invitation. No code change. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Superseded — see the current review report for commit
|
|
|
||
| - **Direct collaborators only.** GitHub is asked only for users with direct repository access. Team-based access is reconstructed from team membership, which the connector already syncs separately. | ||
| - **Skips per-team detail calls.** The `members_count` and `repos_count` profile fields are not synced for team resources. | ||
| - **Inherited access in grant and revoke.** Grant and revoke behave the same with or without this option. A repository grant checks the user's effective access first. If the user already has the requested permission, the grant returns "already exists" and no direct collaborator record is created. Effective access includes access through a team, the organization base permission, and organization ownership. With this option on, the sync lists only direct collaborators. A user with only inherited access can show a fulfilled grant in C1 and have no direct collaborator record on GitHub. A repository revoke removes only the direct collaborator or invitation. It does not change team or organization access, so the user can keep access after a revoke. |
There was a problem hiding this comment.
🟡 Suggestion (medium confidence): "already has the requested permission" reads as cumulative, but Grant (pkg/connector/repository.go:449-451) returns GrantAlreadyExists only when the effective role exactly equals the requested one. An org owner (effective admin) who is granted pull still gets AddCollaborator called and a GrantReplaced for admin. Consider wording it as "already has exactly the requested permission level" so operators don't expect a no-op for a lower level.
There was a problem hiding this comment.
Reworded to say the grant returns "already exists" only when the effective level is exactly the requested level. Higher or lower levels still add a direct collaborator. Fixed in 065f58a, also in docs/docs-info.md.
Superseded — see the current review report for commit
|
There was a problem hiding this comment.
No blocking issues found — see the full review report
Grant returns already exists only when the effective permission level equals the requested level. Other levels still add a direct collaborator. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Superseded — see the current review report for commit
|
Connector PR Review: Document direct-collaborators-only grant and revoke behaviorBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThis PR changes only documentation:
I applied the repo-local criteria. The provisioning sections (F/PR1–PR3) and the breaking-change gate (E) were checked against the documented behavior. No code, entitlement or identifier changes, so the code-specific sections (A–D, G, S) do not apply. Nothing in the changed files was left unreviewed. Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. Resolved prior findings
Reviewed commit: |
There was a problem hiding this comment.
No blocking issues found — see the full review report
Summary
The
direct-collaborators-onlyoption changes how the sync lists repository access. Its effect on repository grant and revoke with inherited access is not documented. A user with access through a team, the organization base permission, or organization ownership can show a fulfilled grant in C1 and have no direct collaborator record on GitHub. A revoke removes only the direct collaborator or invitation, so that user can keep access.This PR documents that behavior in
docs/connector.mdxanddocs/docs-info.md. It makes no code or behavior change.This replaces a code fix that is no longer planned.
🤖 Generated with Claude Code