This directory contains scripts to update existing projects in Gigya DS with proper author names where they are missing or set to "Unknown".
A straightforward script that updates projects with missing or "Unknown" authors.
Features:
data.jsonA comprehensive script with additional features and configuration options.
Features:
Environment Variables:
export GIGYA_API_KEY="your_api_key" export GIGYA_APP_KEY="your_app_key" export GIGYA_APP_SECRET="your_app_secret" export GIGYA_DOMAIN="accounts.eu1.gigya.com" # Optional, defaults to EU1
Data Source:
data.json exists in the same directory# Run the basic update script npx tsx update-project-authors.ts
# Preview what would be updated without making changes DRY_RUN=true npx tsx update-authors-advanced.ts
# Update both missing and "Unknown" authors npx tsx update-authors-advanced.ts
# Only update projects where author is specifically "Unknown" UPDATE_UNKNOWN_ONLY=true npx tsx update-authors-advanced.ts
| Environment Variable | Default | Description |
|---|---|---|
DRY_RUN | false | Preview changes without applying them |
UPDATE_UNKNOWN_ONLY | false | Only update "Unknown" authors, not missing ones |
GIGYA_DOMAIN | accounts.eu1.gigya.com | Gigya domain to use |
The scripts will update projects where the author field is:
undefined or null"")"Unknown""undefined" or "null" (string values)Note: If UPDATE_UNKNOWN_ONLY=true, only projects with author exactly equal to "Unknown" will be updated.
The advanced script includes author name cleanup:
I123456 become User I123456osvote[bot] become osvote (Bot)Both scripts provide detailed logging including:
š Starting author update process...
š„ Found 25 existing projects
š Created lookup for 20 projects with author data
š Updating "bolt.diy" with author: "I347305"
ā
Successfully updated "bolt.diy"
š Update Summary:
ā
Successfully updated: 15 projects
āļø Skipped: 8 projects
ā Errors: 0 projects
š Total processed: 23 projects
Missing Environment Variables:
No Projects Updated:
data.json contains author informationAPI Errors:
Author Data Not Found:
data.jsonAfter running the update scripts: