{"id":17694805,"url":"https://github.com/ngshiheng/todoleet","last_synced_at":"2025-03-12T22:33:01.407Z","repository":{"id":37081954,"uuid":"437324917","full_name":"ngshiheng/todoleet","owner":"ngshiheng","description":"Syncs Daily LeetCoding Challenge to Todoist","archived":true,"fork":false,"pushed_at":"2024-07-04T17:06:51.000Z","size":89,"stargazers_count":6,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T08:30:57.427Z","etag":null,"topics":["cloudflare-worker","leetcode","serverless","todoist","wrangler"],"latest_commit_sha":null,"homepage":"https://jerrynsh.com/how-i-sync-daily-leetcoding-challenge-to-todoist/","language":"JavaScript","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/ngshiheng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":["ngshiheng"]}},"created_at":"2021-12-11T15:55:45.000Z","updated_at":"2024-07-06T00:45:37.000Z","dependencies_parsed_at":"2023-01-24T03:46:05.346Z","dependency_job_id":"893b28fd-2389-4e40-902b-d8aaf04790a3","html_url":"https://github.com/ngshiheng/todoleet","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngshiheng%2Ftodoleet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngshiheng%2Ftodoleet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngshiheng%2Ftodoleet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngshiheng%2Ftodoleet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngshiheng","download_url":"https://codeload.github.com/ngshiheng/todoleet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243307050,"owners_count":20270253,"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","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":["cloudflare-worker","leetcode","serverless","todoist","wrangler"],"created_at":"2024-10-24T13:49:47.371Z","updated_at":"2025-03-12T22:33:01.034Z","avatar_url":"https://github.com/ngshiheng.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ngshiheng"],"categories":[],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003eTodoLeet\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"403\" height=\"163\" src=\"https://i.imgur.com/FObZwQJ.png\"\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003eSyncs Daily LeetCoding Challenge to Todoist.\u003c/div\u003e\n\n[![CI](https://github.com/ngshiheng/todoleet/actions/workflows/ci.yml/badge.svg)](https://github.com/ngshiheng/todoleet/actions/workflows/ci.yml)\n[![Release](https://github.com/ngshiheng/todoleet/actions/workflows/release.yml/badge.svg)](https://github.com/ngshiheng/todoleet/actions/workflows/release.yml)\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Context](#context)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Deployment](#deployment)\n  - [Wrangler CLI](#wrangler-cli)\n- [Contributing](#contributing)\n- [References](#references)\n- [FAQ](#faq)\n  - [Is it safe to publish wrangler.toml with `account_id`?](#is-it-safe-to-publish-wranglertoml-with-account_id)\n\n## Context\n\n```mermaid\ngraph LR;\n    A[Schedule Event] --\u003e B[Sync LeetCode Coding Challenge];\n    B --\u003e C{Fetch Daily Coding Challenge};\n    C --\u003e|Success| D[Create Todoist Task];\n    C --\u003e|Failure| E[Handle Error];\n    D --\u003e F[Task Created];\n    E --\u003e G[Error Handling];\n```\n\nA [Cloudflare Worker](https://developers.cloudflare.com/workers/) project that syncs Daily LeetCoding Challenge to your [Todoist](https://todoist.com/). The worker runs every day at [00:01 UTC](https://crontab.guru/#1_0_*_*_*) and syncs the Daily LeetCoding Challenge to your Todoist.\n\n[Read more...](https://jerrynsh.com/how-i-sync-daily-leetcoding-challenge-to-todoist/).\n\n## Requirements\n\n-   A Cloudflare account\n-   Install [Wrangler](https://github.com/cloudflare/wrangler#installation) CLI for Cloudflare Workers deployment\n\n## Installation\n\nThe dependencies are only used for development. So the installation is not required.\n\n```sh\nnpm ci\n```\n\n## Usage\n\nTo test out the cron trigger locally, run the following:\n\n```sh\n# 1. set TODOIST_API_TOKEN\nwrangler login\nwrangler secret put TODOIST_API_TOKEN\n\n# 2. run worker\nnpm run dev # wrangler dev --test-scheduled --remote\n\n# 3. test scheduled event.\ncurl \"http://localhost:8787/__scheduled\"\n\n# 4. check if a new task is created on your Todoist\n```\n\n## Deployment\n\n### Wrangler CLI\n\n1. Add `TODOIST_API_TOKEN` using `wrangler secret put TODOIST_API_TOKEN`. You may find the newly added secret under `Cloudflare Worker` -\u003e `Settings` -\u003e `Variables`. You can get your Todoist API token from https://app.todoist.com/app/settings/integrations/developer.\n\n2. This is only required for [Wrangler actions](https://github.com/marketplace/actions/deploy-to-cloudflare-workers-with-wrangler). Add `CF_API_TOKEN` into your GitHub repository secrets. You can create your API token from https://dash.cloudflare.com/profile/api-tokens using the `Edit Cloudflare Workers` template.\n\n3. To publish any new changes to your Cloudflare Worker, run `wrangler deploy`\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n1. Fork this\n2. Create your feature branch (`git checkout -b tommy/fooBar`)\n3. Commit your changes (`git commit -am 'feat: add some fooBar'`, make sure that your commits are [semantic](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716))\n4. Push to the branch (`git push origin tommy/fooBar`)\n5. Create a new Pull Request\n\n## References\n\n-   https://developer.todoist.com/guides/\n-   https://developers.cloudflare.com/workers/\n\n## FAQ\n\n### Is it safe to publish wrangler.toml with `account_id`?\n\n[Yes](https://github.com/cloudflare/wrangler/issues/209#issuecomment-541654484).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngshiheng%2Ftodoleet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngshiheng%2Ftodoleet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngshiheng%2Ftodoleet/lists"}