This repository was archived by the owner on May 9, 2026. It is now read-only.
Notion and Gmail Auth Fetch Changes#11
Merged
Merged
Conversation
- Add `serve:core` script to package.json for easier core serving. - Update default RUNTIME_URL in test harness to 7788 for consistency. - Refactor Gmail skill by removing unused token cache logic and improving error handling. - Implement interactive credential prompts in Gmail live test sync for better user experience. - Streamline Gmail API requests to always use OAuth proxy for improved security and consistency. - Update Notion helper functions to ensure all requests utilize the OAuth proxy, enhancing compatibility. These changes improve the overall functionality and user experience of the Gmail and Notion integrations, ensuring better performance and security.
…nsistency - Simplified the `ResolvedCreds` type definition for clarity. - Streamlined the `fetch` call in `resolveCredentials` for better readability. - Removed unnecessary whitespace in the Gmail API index file. These changes enhance code maintainability and improve overall readability without altering functionality.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughRefactors Gmail and Notion auth to route through OAuth proxy, removes local token-cache/refresh logic, adds interactive credential resolution for Gmail live tests, introduces a new Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant CLI as CLI Process
participant Env as Environment/.env
participant Backend as Backend API
participant Browser as Browser
participant OAuth as OAuth Proxy
User->>CLI: run live-test-sync / main()
CLI->>Env: read env vars (JWT_TOKEN, GMAIL_*)
alt Encrypted OAuth flow
CLI->>Backend: GET /auth/gmail/connect?... (Authorization: Bearer JWT)
Backend-->>CLI: oauthUrl
CLI->>Browser: open oauthUrl
Browser->>User: show consent, user grants
CLI->>User: prompt for integrationId / clientKeyShare
User-->>CLI: provide inputs
CLI->>OAuth: call oauthComplete(credentialId, clientKeyShare, GRANTED_SCOPES)
else Self-hosted flow
CLI->>User: prompt client_id, client_secret, refresh_token
User-->>CLI: provide credentials
CLI->>OAuth: call authComplete(client_id, client_secret, refresh_token)
end
OAuth-->>CLI: credential validated
CLI->>OAuth: use oauth.fetch(path) for subsequent Gmail API calls
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
- Document serve-core helpers, gmailFetch/GmailApiResponse, live-test-sync CLI helpers - Document notionFetch, formatApiError, and Notion format* exports - Fix prefer-const in notionFetch error path; clarify Gmail API file header Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Skill Submission
Skill name:
skill-name-hereType: [ ] Prompt-only | [ ] Coded (skill.ts)
Description
Brief description of what this skill does and why it's useful.
Checklist
SKILL.mdhas valid YAML frontmatter (name,description)eval(),Function(), or dynamic code executionctx.readData/ctx.writeData)skill.tshas name, description, version{ content: string }npx tsx harness/runner.ts ../skills/my-skillnpm run validatepasses indev/Testing
Describe how you tested this skill:
Category
Summary by CodeRabbit
New Features
Bug Fixes
Chores