Conversation
- Update baton-sdk to v0.7.10 - Create pkg/config package with generated configuration - Update main.go to use config.RunConnector API - Update connector to use V2 interface - Update Makefile for config generation and lambda support - Update GitHub workflows Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
WalkthroughAdds Notion connector configuration: a generated config accessor ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
- Added WithDisplayName() to SCIM token field - Marked SCIM token as secret with WithIsSecret(true) - Converted Config to use field.NewConfiguration pattern - Added connector display name, help URL, and icon URL Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
go.mod (1)
5-6:⚠️ Potential issue | 🟠 MajorSDK version mismatch with PR description.
The PR description states the SDK was bumped to v0.7.10, but this file shows
github.com/conductorone/baton-sdk v0.4.2. Please verify which version is intended and update accordingly.
🧹 Nitpick comments (2)
pkg/config/conf.gen.go (1)
10-10: Minor: Inconsistent pointer receiver formatting.The pointer receiver on line 10 uses
c* Notion(space after asterisk) while other methods usec *Notion(space before asterisk). Since this is generated code, consider updating the generator template for consistency.-func (c* Notion) findFieldByTag(tagValue string) (any, bool) { +func (c *Notion) findFieldByTag(tagValue string) (any, bool) {pkg/config/config.go (1)
37-43: Consider adding validation for the SCIM token.
ValidateConfigcurrently returnsnilwithout performing any validation. If there are constraints on the SCIM token format (e.g., minimum length, prefix pattern), consider adding validation here to fail fast with a descriptive error rather than at runtime during API calls.Example validation pattern
func ValidateConfig(c *Notion) error { token := c.GetString("scim-token") if token != "" && len(token) < 10 { return fmt.Errorf("scim-token appears to be too short") } return nil }
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…pabilities generation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Migrate main.go from DefineConfiguration to RunConnector with WithDefaultCapabilitiesConnectorBuilder - Update connector.New signature to accept config.Notion type instead of scimToken string - Add config package import to connector.go - ResourceSyncers already uses V2 types (connectorbuilder.ResourceSyncer) - config.go already exists (no need to rename from schema.go) - Run go mod tidy to clean up unused dependencies Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace pagination.Token with rs.SyncOpAttrs and return *rs.SyncOpResults instead of string/annotations in all List, Entitlements, and Grants methods. Simplify helpers to use direct token conversion functions matching the V2 pattern. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
WithDefaultCapabilitiesConnectorBuilderV2 enables capabilities generation without credentials. Original workflow had no secrets. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Containerizes the connector following baton-databricks#35 and baton-contentful#48.
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Summary by CodeRabbit
New Features
Chores