Repository navigation
fix: read the git-activity Tinybird token from CROWD_PACKAGES_TB_TOKEN (CM-1824) - #4893
Conversation
…N (CM-1824) Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
PR SummaryMedium Risk Overview
Deployment: set Reviewed by Cursor Bugbot for commit de645b7. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟢 Approval recommended
The narrowly scoped changes have no identified blocking issues; deployment must supply CROWD_PACKAGES_TB_TOKEN.
0 open findings
What changed in this PR
Updates the git-activity contributors sync to use a dedicated, read-only Tinybird token instead of the shared activities token.
Changes:
- Requires
CROWD_PACKAGES_TB_TOKENthrough a configuration getter. - Passes the dedicated token to
TinybirdClient. - Adds a test assertion verifying token forwarding.
| File | Description |
|---|---|
| services/apps/packages_worker/src/member-contributors/git-activity/syncGitActivityContributors.ts | Supplies the dedicated token to Tinybird. |
| services/apps/packages_worker/src/member-contributors/__tests__/syncGitActivityContributors.test.ts | Verifies the client receives the token. |
| services/apps/packages_worker/src/config.ts | Adds the required token getter. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
|
|
Summary
Follow-up to #4887. The git-activity contributors sync now authenticates to Tinybird with
CROWD_PACKAGES_TB_TOKEN, a dedicated token that only has read access torepo_commit_contributors_copy_ds, instead of the sharedCROWD_TINYBIRD_ACTIVITIES_TOKENdefault ofTinybirdClient.Changes
config.ts:getPackagesTinybirdToken()readsCROWD_PACKAGES_TB_TOKENand throws when it is missing, so a misconfigured deployment fails at the first run instead of making unauthenticated calls.syncGitActivityContributors.ts: passes that token toTinybirdClient.Deployment
CROWD_PACKAGES_TB_TOKENmust be set on thesecurity-contacts-workerdeployment.CROWD_TINYBIRD_BASE_URLis still read by the client.