Repository navigation
Add workspace role provisioning - #63
Conversation
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
| return rlData, err | ||
| } | ||
| if !data.UserChangeRole.Success { | ||
| return rlData, fmt.Errorf("baton-linear: userChangeRole returned success=false") |
There was a problem hiding this comment.
🟡 Suggestion: Two errors here have no gRPC status code, so Grant/Revoke report them as codes.Unknown: this success=false result, and the catch-all GraphQL error at line 132. Repo criteria E3/P4 ask provisioning errors to carry a code, e.g. status.Error(codes.Internal, ...) here and codes.Unknown/FailedPrecondition as appropriate at L132, so C1 shows the failure correctly. (Confidence: medium; non-blocking.)
There was a problem hiding this comment.
Addressed in 0ad6640. Inferred unsuccessful/missing-data responses now carry Internal, and unclassified GraphQL errors carry an explicit Unknown status. Decode failures use uhttp.WrapErrors. Fixtures now assert status.FromError recognizes these errors, in addition to checking their codes. Full tests, scoped race tests, build, and lint pass.
Superseded — see the current review report for commit
|
There was a problem hiding this comment.
No blocking issues found — see the full review report
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
| } | ||
| } | ||
| if len(response.Errors) > 0 { | ||
| return rlData, status.Errorf(codes.Unknown, "baton-linear: role request failed: %s", response.Errors[0].Message) |
There was a problem hiding this comment.
🟡 Suggestion (medium confidence): The catch-all runs before requestErr is checked. So if a 5xx response also has a GraphQL errors body, it comes back as codes.Unknown and the Unavailable code from uhttp is lost. Per E2, pkg/retry only retries Unavailable, so Grant/Revoke would not back off on a transient Linear outage. Return requestErr first when resp.StatusCode >= 500, or only fall back to Unknown when requestErr is nil or a 4xx.
Superseded — see the current review report for commit
|
There was a problem hiding this comment.
No blocking issues found — see the full review report
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
Connector PR Review: Add workspace role provisioningBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThe new commit changes the order of checks in I scanned the full PR diff (README, capabilities, docs,
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
userChangeRole; requires an Admin-permission API key from a workspace admin/owner, with an owner's key forowner.user(revokingguestincreases access); baselineuserrevocation and app-account/appchanges are unsupported.Validation
go test ./..., uncached verbose tests, CI JSON/coverage tests, scoped race tests,go build ./cmd/baton-linear,make lint, shared-workflow MDX validation, and offline capability/config checks pass. HTTP fixtures cover success, idempotency, invalid inputs, permission/rate-limit failures, and unchanged team operations. No live-provider testing.