{"id":20688574,"url":"https://github.com/hicarod/todoasissue","last_synced_at":"2026-04-29T12:37:57.582Z","repository":{"id":62690731,"uuid":"558334895","full_name":"HicaroD/TodoAsIssue","owner":"HicaroD","description":"📝 From TODOs to issues.","archived":false,"fork":false,"pushed_at":"2023-01-22T19:31:07.000Z","size":158,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-17T16:56:41.274Z","etag":null,"topics":["cli","dart","github","github-api","gitlab"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/todo_as_issue","language":"Dart","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/HicaroD.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-27T10:47:35.000Z","updated_at":"2024-03-21T18:37:02.000Z","dependencies_parsed_at":"2023-02-12T18:00:39.499Z","dependency_job_id":null,"html_url":"https://github.com/HicaroD/TodoAsIssue","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/HicaroD%2FTodoAsIssue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HicaroD%2FTodoAsIssue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HicaroD%2FTodoAsIssue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HicaroD%2FTodoAsIssue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HicaroD","download_url":"https://codeload.github.com/HicaroD/TodoAsIssue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242951172,"owners_count":20211572,"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":["cli","dart","github","github-api","gitlab"],"created_at":"2024-11-16T23:06:08.688Z","updated_at":"2025-12-07T12:01:46.743Z","avatar_url":"https://github.com/HicaroD.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :pencil: TODOasIssue\n\n![workflow](https://github.com/HicaroD/TodoAsIssue/actions/workflows/dart.yml/badge.svg)\n![pubdev](https://img.shields.io/pub/v/todo_as_issue)\n\n## Summary\n\n1. [Description](#description)\n2. [Installation](#installation)\n3. [Setting up `todo.json`](#setting-up-todojson)\n\n   3.1. [Required fields for GitHub](#required-fields-for-github)\n\n   3.2. [Required fields for GitLab](#required-fields-for-gitlab)\n\n4. [Setting up `todo.txt`](#setting-up-todotxt)\n5. [Usage](#usage)\n6. [Project architecture](#project-architecture)\n7. [Supported platforms](#supported-platforms)\n8. [License](#license)\n\n## Description\n\nFrom a list of TODOs to a list of issues on your GitHub or GitLab repository.\n\n```markdown\n[~]: \"This is my first TODO\";\n[]: \"This is my second TODO\";\n[]: \"This is my third TODO\" \"And it also has a body text\";\n[]: \"This is my last TODO\" \"And it has a body text\" {\"label1\", \"label2\"};\n```\n\nGitHub and Gitlab projects can have issues created by developers / users to report errors, bugs and etcetera. The idea of building `TODOasIssue` is to automate the creation of issues locally by writing everything that you need in a simple text file and publishing it to your GitHub / GitLab project without even opening your browser to do that.\n\n## Installation\n\nFirst of all, you need to have Dart installed on your computer. See [Dart documentation](https://dart.dev/get-dart). After that, run the following command:\n\n```bash\ndart pub global activate todo_as_issue\n```\n\nNow you have `TodoAsIssue` installed.\n\n## Setting up `todo.json`\n\nOn your project root folder, create a file called `todo.json` and paste the content below:\n\n```json\n{\n  \"owner\": \"YOUR_GITHUB_USERNAME\",\n  \"repo_name_github\": \"YOUR_GITHUB_REPOSITORY_NAME\",\n  \"repo_id_gitlab\": \"YOUR_GITLAB_PROJECT_ID\",\n  \"platform\": \"YOUR_OPEN_SOURCE_PLATFORM\",\n  \"github_token\": \"YOUR_PRIVATE_TOKEN_FROM_GITHUB\",\n  \"gitlab_token\": \"YOUR_PRIVATE_TOKEN_FROM_GITLAB\"\n}\n```\n\nIn `platform` field, you can use `github` or `gitlab`.\n\nSee the image below from my URL bar that will teach you how to identify your `owner` and `repo_name_github` fields:\n\n![image](https://user-images.githubusercontent.com/75737377/210892430-78b320ec-bd78-451a-9b9f-ee0c7684e1f9.png)\n\nAfter that, you can create a file called `todo.txt` in the project root folder to insert all your TODOs. For more informations and examples about how to create a TODO file, go [here](./examples/).\n\n### Required fields for GitHub\n\n- `owner`: Your GitHub username\n- `repo_name_github`: Your repository name\n- `platform`: It should be `github`\n- `github_token`: Your private access token. See [GitHub Docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)\n\nLeave the remaining ones empty (empty string).\n\n### Required fields for GitLab\n\n- `repo_id_gitlab`: Your repository id\n- `platform`: It should be `gitlab`\n- `gitlab_token`: Your private access token. See [GitLab Docs](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html)\n\nYou can leave the remaining one empty because each platform will only its required fields.\n\n**WARNING**: Insert this file `todo.json` on your `.gitignore` in order to keep your informations safe, especially your private token.\n\n## Setting up `todo.txt`\n\nIn the [description](#description), you have a pretty clear example on how to structure\nyour `todo.txt`. In this section I just want to mention a couple things.\n\nFirst of all, each issue can have a `title`, `body` and a `labels`. `title` is required, but\n`body` and `labels` are not, however you need to respect the order. For example:\n\n```markdown\n[]: \"Title of issue\" \"Body of issue\" {\"label1\", \"label2\"};\n```\n\nThe example above is **valid** because `labels` are placed _after_ `body`.\n\n```markdown\n[]: \"Title of issue\" {\"label1\", \"label2\"} \"Body of issue\";\n```\n\nThe example above is **invalid** because `labels` are placed _before_ `body`. This order is\nwrong!\n\n## Usage\n\nAfter setting up `TodoAsIssue`, go to your project's root directory and run the following command:\n\n```\ntodo_as_issue\n```\n\nThat command will look for `todo.json` and `todo.txt` on project's root directory.\n\n## Project architecture\n\n- [`lib/api`](./lib/api/): Code that is related to the API's communication.\n  - [`lib/api/api.dart`](./lib/api/api.dart): Class for calling method to create issues\n  - [`lib/api/github.dart`](./lib/api/github.dart): Class for implementing the communication with GitHub's API to create an issue.\n  - [`lib/api/gitlab.dart`](./lib/api/gitlab.dart): Class for implementing the communication with GitLab's API to create an issue.\n    Extracting some methods on API communication code - [`lib/api/opensource_platform.dart`](./lib/api/opensource_platform.dart): Interface for any open source platform that I may want to create in the future.\n  - [`./lib/api/successful_status.dart`](./lib/api/successful_status.dart): Class for getting successful message based on issue counter.\n- [`lib/core`](./lib/core/): Code that is common across all the source code.\n  - [`lib/core/http_client`](./lib/core/http_client/): Implementation of an HTTP client\n    - [`lib/core/http_client/http_client_interface.dart`](./lib/core/http_client/http_client_interface.dart): Interface for any HTTP client that I may want to create in the future. This is useful because my code will not be dependent\n    - [`lib/core/http_client/http_client.dart`](./lib/core/http_client/http_client.dart): Implementation of an HTTP Client using [`http`](https://pub.dev/packages/http) package.\n  - [`lib/core/errors`](./lib/core/errors/):\n    - [`lib/core/errors/api_exceptions`](./lib/core/errors/api_exceptions.dart): File for defining all exceptions related to API communication.\n    - [`lib/core/errors/lexer_exceptions.dart`](./lib/core/errors/lexer_exceptions.dart): File for defining all exceptions related to the lexer.\n    - [`lib/core/errors/parser_exceptions.dart`](./lib/core/errors/parser_exceptions.dart): File for defining all exceptions related to the parser.\n- [`lib/lexer`](./lib/lexer/): Tool for converting a text file into a list of tokens\n  - [`lib/lexer/lexer.dart`](./lib/lexer/lexer.dart): Implementation of lexer (tokenizer)\n  - [`lib/lexer/position.dart`](./lib/lexer/position.dart): Class for managing cursor and line positions\n  - [`lib/lexer/tokens.dart`](./lib/lexer/tokens.dart): Class for representing a token and an enum to represent a token kind.\n- [`lib/parser`](./lib/parser/): Tool for converting a list of tokens into a list of TODOs\n  - [`lib/parser/parser.dart`](./lib/parser/parser.dart): Class for converting a list of tokens (generated by the lexer) into a list of TODOs\n  - [`lib/parser/todo.dart`](./lib/parser/todo.dart): Class for representing a TODO object.\n- [`lib/utils`](./lib/utils/): Utility code\n  - [`lib/utils/configuration.dart`](./lib/utils/configuration.dart): Data class for representing `todo.json`.\n  - [`lib/utils/endpoints.dart`](./lib/utils/endpoints.dart): Important endpoints\n  - [`lib/utils/reader.dart`](./lib/utils/reader.dart): Helper class for reading importants files (`todo.json` and `todo.txt`)\n- [`test`](./test/): Folder for storing all tests\n  - [`test/mocks/`](./test/mocks/): Folder for defining some mocks for helping me to test the code.\n    - [`test/mocks/configuration_mock.dart`](./test/mocks/configuration_mock.dart): File for storing a mock object of `Configuration`.\n    - [`test/mocks/todo_mocks.dart`](./test/mocks/todo_mocks.dart): File for storing a list of mock TODOs.\n  - [`test/api_test.dart`](./test/api_test.dart): Unit test for API communication.\n  - [`test/lexer_test.dart`](./test/lexer_test.dart): Unit test for lexer\n  - [`test/parser_test.dart`](./test/parser_test.dart): Unit test for parser\n\n## Supported platforms\n\n- Linux: Working properly on Manjaro Arch Linux and Ubuntu.\n- Windows: It might work, but it was not tested.\n- macOS: It might work, but it was not tested.\n\n## License\n\nThis project is licensed under the MIT license. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhicarod%2Ftodoasissue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhicarod%2Ftodoasissue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhicarod%2Ftodoasissue/lists"}