Skip to content

Add GitHub as a supported integration platform#43

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-sync-issue-with-github
Draft

Add GitHub as a supported integration platform#43
Copilot wants to merge 2 commits intomainfrom
copilot/fix-sync-issue-with-github

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

GitHub was not a supported integration platform, making it impossible for users to sync their data/predictions with a GitHub repository. All attempts to create a GitHub integration were silently rejected by validation.

Changes Made

New: src/github.js — GitHub REST API client

  • syncPrediction(owner, repo, prediction) — commit prediction JSON to a repo (create or update via Contents API)
  • createPredictionIssue(owner, repo, prediction) — open a formatted GitHub Issue with prediction report
  • listSyncedPredictions(owner, repo) — list previously synced prediction files
  • getRepository(owner, repo) — fetch repo metadata

Backend

  • Integration model ENUM: added 'github'
  • Route validator isIn([...]): added 'github'
  • getPlatforms(): added GitHub entry with sync, version-control, repository, collaboration features
  • formatPredictionForPlatform(): added 'github' case returning file path + commit message

Frontend / Config

  • src/index.js: exports GitHub alongside existing clients
  • Integrations.js: added GitHub to the subtitle
  • .env.example: added GITHUB_TOKEN with PAT instructions
  • INTEGRATIONS.md / README.md: documented GitHub platform config, required scopes, and export format

Tests

  • tests/github.test.js: 15 unit tests covering constructor, syncPrediction (new file, existing file with SHA, custom path), createPredictionIssue, listSyncedPredictions, headers, network errors, non-JSON responses

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 📚 Documentation update
  • 🧪 Test updates

Testing

  • Unit tests pass
  • Manual testing completed
  • No breaking changes

Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Copilot AI changed the title [WIP] Fix sync issue with GitHub for MyClaw Add GitHub as a supported integration platform Apr 11, 2026
Copilot AI requested a review from lippytm April 11, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants