Google Sheets Setup for Documentation Versioning
Overview
The versioning system creates version-specific tabs in Google Sheets to preserve EIP compatibility data when documentation versions are frozen. Configuration:- Spreadsheet ID:
1OGscheUSh-g15p7mNYjSaxI05E8O_3R3tDK0IwXaczk - Main Sheet:
eip_compatibility_data(live data) - Version Tabs:
v0.4.x,v0.5.0, etc. (frozen snapshots)
How It Works
Active Development (docs/next/):
eip_compatibility_data with live data.
Frozen Versions (docs/v0.5.0/):
v0.5.0 with snapshot data.
Tab Reference Format
** Correct**: Use sheet tab name as identifier:sheetTab="v0.4.x"sheetTab="v0.5.0"sheetTab="eip_compatibility_data"
API Setup Process
1. Google Cloud Project
- Go to Google Cloud Console
- Create new project:
cosmos-docs-versioning - Select the project
2. Enable Sheets API
- Navigate: APIs & Services → Library
- Search: “Google Sheets API”
- Click “Enable”
3. Create Service Account
- Navigate: APIs & Services → Credentials
- Click “Create Credentials” → “Service Account”
- Name:
docs-versioning-bot - Click “Create and Continue”
- Skip role assignment (click “Continue”)
- Click “Done”
4. Generate Key
- Click on the created service account
- Go to “Keys” tab
- Click “Add Key” → “Create New Key”
- Select “JSON” format
- Click “Create”
- Save file to one of these locations:
scripts/service-account-key.json(recommended - shared across scripts)scripts/versioning/service-account-key.json- Or set environment variable
GOOGLE_SERVICE_ACCOUNT_KEYto the key file path
5. Share Spreadsheet
- Open the EIP Compatibility Spreadsheet
- Click “Share”
- Add the service account email (from the JSON key file)
- Set permission to “Editor”
- Click “Send”
6. Install Dependencies
Testing
Test the setup:Troubleshooting
“The caller does not have permission”- Verify spreadsheet is shared with service account email
- Check Editor permissions granted
- Verify
MAIN_SHEET_NAMEmatches actual sheet name - Check sheet tab exists in spreadsheet
- Verify service account key file exists
- Check JSON key format is valid
- Ensure API is enabled in Google Cloud