Added analytics-service tinybird token#27495
Conversation
WalkthroughThis pull request adds a new Tinybird token configuration across two datasource files. The 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
83e5597 to
0322f38
Compare
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@ghost/core/core/server/data/tinybird/datasources/analytics_events.datasource`:
- Line 2: The datasource adds TOKEN "analytics-service" APPEND but there is no
provisioning or usage; add creation of an "analytics-service" token with APPEND
permissions in the Tinybird provisioning logic (extend the token creation
block/function in docker-analytics-manager.js — e.g., in the existing
create/provisionTinybirdTokens or TINYBIRD_ADMIN_TOKEN/TINYBIRD_TRACKER_TOKEN
flow, add creation of TINYBIRD_ANALYTICS_SERVICE_TOKEN), expose that token via
configuration (add TINYBIRD_ANALYTICS_SERVICE_TOKEN as an env var or Docker
volume provisioning alongside the existing tokens), and update ghost-stats.js to
read and use that token when contacting Tinybird or allow the analytics service
to set it (check or add code paths in ghost-stats.js to prefer
process.env.TINYBIRD_ANALYTICS_SERVICE_TOKEN or a runtime-exposed token setter
from the analytics service). Ensure the token name matches TOKEN
"analytics-service" and that created token has APPEND scope.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1339dd69-bf12-4a41-b9f3-1501552202bc
📒 Files selected for processing (2)
ghost/core/core/server/data/tinybird/datasources/analytics_events.datasourceghost/core/core/server/data/tinybird/datasources/analytics_events_test.datasource



This should have no user-facing impact.
Adding a new analytics-service Tinybird token with append scopes to our Tinybird workspace. This will allow the analytics service to send events to Tinybird.