Add automated oncall rotation sync to Google Group#2
Merged
d-bytebase merged 7 commits intomainfrom Jan 23, 2026
Merged
Conversation
Design for a Go CLI tool that syncs current oncall rotation to Google Group based on a schedule file. Includes schedule parsing, Google API integration, and declarative sync logic. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add Go CLI tool that syncs current oncall rotation to Google Group: - Schedule parsing and validation with comprehensive tests - Google Groups API integration using service account - Declarative sync logic (group membership matches current rotation) - CLI with environment variable for credentials - Full test coverage for all components The tool reads a CSV schedule file, determines current oncall based on time, and updates Google Group membership to exactly match the current primary and secondary oncall people. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add automated daily sync workflow: - Runs on cron schedule (daily at midnight UTC) - Supports manual triggering via workflow_dispatch - Builds and runs synconcall tool with GitHub secrets Update root README with comprehensive setup guide: - Schedule file format and usage - Service account setup instructions - GitHub secrets configuration - Manual sync instructions - Troubleshooting guide Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix authentication by implementing proper domain-wide delegation: - Add --admin-user flag to specify domain admin for impersonation - Update GoogleGroupsClient to use JWT config with subject claim - Service account now impersonates domain admin (d@bytebase.com) - Update all documentation and examples with new flag This is required for service accounts to access Google Workspace Admin SDK APIs. The service account delegates to a domain admin user to perform group management operations. Tested successfully with real Google Group sync. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
ecmadao
approved these changes
Jan 23, 2026
Add GitHub Actions workflow that runs on PRs: - Run all Go tests to ensure code quality - Validate dev.oncall schedule format and structure - Add 'synconcall validate' subcommand for schedule validation The validate command checks: - CSV format correctness - Timestamp format (RFC3339) - Email validation - Chronological ordering - Current rotation can be determined Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change schedule from midnight to 1AM UTC to allow rotation to take effect - Add push trigger for main branch to sync on deployment - Keep manual workflow_dispatch trigger Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements automated oncall rotation management that syncs the current oncall schedule to a Google Group (
dev-oncall@bytebase.com).dev.oncallCSV file with rotation periodsKey Features
Go CLI Tool (
synconcall/)GitHub Actions Workflow
0 0 * * *)workflow_dispatchGOOGLE_SERVICE_ACCOUNTsecret for authenticationDocumentation
synconcall/README.mddocs/plans/Setup Required
After merging, configure:
GOOGLE_SERVICE_ACCOUNTwith JSON key contentSee updated README.md for detailed setup instructions.
Test Plan
🤖 Generated with Claude Code