Public
Like
1
google-calendar-linear-sync
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v143View latest version
Utilities and tools for the Google Calendar ↔ Linear sync system.
Create a .env file with your credentials:
cp .env.example .env # Edit .env with your actual API keys: LINEAR_API_KEY="your-api-key" LINEAR_TEAM_ID="your-team-id" GOOGLE_SERVICE_ACCOUNT_JSON="base64-encoded-json" GCAL_CALENDAR_ID="your-calendar-id"
Use deno task commands for all development operations:
deno task check # Check environment configuration deno task validate # Validate API structure and mock compatibility deno task dry-run # Run sync logic with real data (no changes made) deno task setup # Show Val Town configuration guide deno task test # Run unit tests deno task sync # Run production sync
deno run --allow-env --allow-net scripts/show-gcal.ts
Shows all GCal events with linking metadata.
deno run --allow-env --allow-net scripts/show-linear.ts
Shows targeted Linear issues with calendar metadata.
deno run --allow-env --allow-net scripts/show-canonical.ts
Shows the projector output - canonical items from Linear + GCal data.
deno run --allow-env --allow-net scripts/show-all.ts
Complete analysis showing GCal → Linear → Canonical flow with statistics.
# Used by CLI, can also be imported import { validateApis } from "./api-validator.ts";
Validates that mock data structures match real API responses.
# Used by CLI, can also be imported import { getValTownConfig } from "./val-town-config.ts";
Helpers for Val Town environment setup and configuration.
- Environment check:
deno task check - API validation:
deno task validate - Dry run test:
deno task dry-run - Check raw data: Use
show-gcal.tsandshow-linear.ts - Verify linking: Use
show-canonical.ts - Full analysis: Use
show-all.ts
This helps quickly identify:
- Environment configuration issues
- API structure mismatches
- Missing linking metadata
- Unexpected phase classifications
- Items that should be linked but aren't
- Overall sync system health