{"id":31784782,"url":"https://github.com/devondragon/github-motion-sync-simple","last_synced_at":"2025-10-10T11:20:16.936Z","repository":{"id":262364708,"uuid":"887011805","full_name":"devondragon/github-motion-sync-simple","owner":"devondragon","description":"Simple Cloudflare Worker to sync GitHub Issues with your Motion Tasks","archived":false,"fork":false,"pushed_at":"2025-09-12T22:36:55.000Z","size":75,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-13T00:26:47.582Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devondragon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-12T02:31:12.000Z","updated_at":"2025-09-12T22:36:56.000Z","dependencies_parsed_at":"2024-11-12T03:27:35.267Z","dependency_job_id":"3639087d-0759-45eb-99aa-63eaadcb4d34","html_url":"https://github.com/devondragon/github-motion-sync-simple","commit_stats":null,"previous_names":["devondragon/github-motion-sync-simple"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devondragon/github-motion-sync-simple","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devondragon%2Fgithub-motion-sync-simple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devondragon%2Fgithub-motion-sync-simple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devondragon%2Fgithub-motion-sync-simple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devondragon%2Fgithub-motion-sync-simple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devondragon","download_url":"https://codeload.github.com/devondragon/github-motion-sync-simple/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devondragon%2Fgithub-motion-sync-simple/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003728,"owners_count":26083610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T11:20:13.089Z","updated_at":"2025-10-10T11:20:16.931Z","avatar_url":"https://github.com/devondragon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Issue to Motion Sync\n\nEffortlessly synchronize your [GitHub](https://github.com) Issues to [Motion](https://usemotion.com), ensuring that your project management workflow stays in sync with your development process. This service uses [Cloudflare Workers](https://workers.cloudflare.com) and [Cloudflare D1](https://developers.cloudflare.com/d1/) to securely and efficiently manage tasks across platforms, integrating GitHub issue tracking with Motion workspaces and projects.\n\n## Key Features\n\n- **Seamless GitHub Issue Sync**: Automatically sync new and updated GitHub issues with Motion tasks, keeping your workflow in Motion up-to-date with GitHub’s latest changes.\n- **Project Mapping**: Each GitHub repository is mapped to a project in Motion, and the sync automatically creates a new project in Motion if it doesn’t exist.\n- **Efficient Data Handling**: Powered by Cloudflare Workers and D1 Database, ensuring low latency, high security, and minimal operational overhead.\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n- [Contributing](#contributing)\n- [License](#license)\n\n\n# Getting Started\n\nYou can clone this repository, and run it on your own Cloudflare account, or you can use my free hosted version.\n\n## Free Hosted Version\n\nComing soon!\n\n## Running It Yourself\n\n### Prerequisites\n\n- [Cloudflare Account](https://dash.cloudflare.com/) with access to Workers and D1 Database.\n- [GitHub Account](https://github.com/) with necessary permissions to set up GitHub webhooks and read issues.\n- [Motion API Key](https://docs.usemotion.com/docs/motion-rest-api) with access to manage tasks and projects.\n\n\n### Installation\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/your-username/github-motion-sync.git\n   cd github-motion-sync\n   ```\n\n2. **Create Cloudflare D1 Database**:\n   This database will hold relationships and mappings from GitHub to Motion.\n\n   ```bash\n   npx wrangler d1 create github-motion-sync-simple\n   ```\n\n3. **Set Up Cloudflare Configuration**:\n   Ensure your `wrangler.toml` is correctly configured with the D1 Database and Worker details.\n\n      ```toml\n   [[d1_databases]]\n   binding = \"DB\"\n   database_name = \"github_motion_sync-simple\"\n   database_id = \"$YOUR DB ID HERE$\"\n   ```\n\n\n4. **Apply Database Migrations**:\n\nRun migrations locally with:\n```bash\nwrangler d1 migrations apply github_motion_sync_db\n```\n\nFor remote environment:\n```bash\nwrangler d1 migrations apply github_motion_sync_db --remote\n```\n\n5. **Get Secrets**\n   - Motion API Key: Login to your account on the [Motion website](https://app.usemotion.com), go to Settings, then API, then API Keys, and create an API Key.\n   - Motion Workspace ID: Run the workspaces.js script to get the internal ID for the Motion Workspace.\n\n```bash\nnode workspaces.js \"$MOTION_API_KEY\"\n```\nThis will output a list of your Motion Workspaces with their Name, and then their ID.  Please save the ID of the Workspace you want to use.\n\n\n6. **Set Environment Variables**:\n   - MOTION_API_KEY - The key you got in the Get Motion API Key step above\n   - MOTION_WORKSPACE_ID - The ID you saved in the step above\n   - GITHUB_USER_ID - your GitHub username\n\nPush secrets to Cloudflare using `wrangler secret put $KEYNAME`\nWrangler will prompt you to provide the secert for the key name\n\n  ```bash\n  npx wrangler secret put MOTION_API_KEY\n   ```\n\n   ```bash\n  npx wrangler secret put MOTION_WORKSPACE_ID\n   ```\n   ```bash\n  npx wrangler secret put GITHUB_USER_ID\n   ```\n\n\n7. **Deploy to Cloudflare**\n\n   ```bash\n   npx wrangler deploy\n   ```\n\n   You can use the default URL or configure a custom domain for the Worker.  You'll use this URL for the GitHub Webhook (next).\n\n8. **Configure GitHub Repository Webhooks**\n   1. In your GitHub repository settings, navigate to **Webhooks** and click **Add webhook**.\n   2. Set the **Payload URL** to your Worker’s endpoint, e.g., `https://your-worker.example.workers.dev`.\n   3.  Select **application/json** as the **Content type**.\n   4.  Choose the **Just the `issues` event** option to trigger syncs on new or updated issues.\n   5.  Save the webhook.\n\nRepeat for all Repositories whose Issues you want synced to Motion.\n\nDONE!\n\n\n## 403s?\n\nIf you are seeing 403s for your Webhook Worker from GitHub and issues aren't syncing through, you may need to setup a Cloudflare WAF rule to skip some WAF checks for your Worker, as the payload of the Webhook event can include HTML, JS, etc...  if it is in your Issue description.\n\nFor the custom domain you have the Worker URL mapped to, in the Cloudflare Admin, go to Security -\u003e WAF -\u003e Custom Rules, and create a rule with a hostname or other match for your endpoint, and Skip All Managed Rules. You may need to expand More components to skip and also skip user agent blocking, brower integrity check, and Managed rules (Previous version), depending on your setup.\n\n\n## Contributing\n\nWe welcome contributions! Please follow these steps:\n\n1. **Fork the repository** and create your branch:\n   ```bash\n   git checkout -b feature/your-feature\n   ```\n\n2. **Make your changes** and test thoroughly.\n\n3. **Submit a pull request** with a detailed description of your changes.\n\n### Development Guidelines\n\n- Keep code modular, following the structure laid out in `src/`.\n- Add comments where necessary, and ensure functions are well-documented.\n- Run tests and check compatibility with the latest versions of Node and `wrangler`.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Questions?\n\nFor any questions or feedback, feel free to [open an issue](https://github.com/your-username/github-motion-sync/issues) or reach out directly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevondragon%2Fgithub-motion-sync-simple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevondragon%2Fgithub-motion-sync-simple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevondragon%2Fgithub-motion-sync-simple/lists"}