{"id":28256681,"url":"https://github.com/bird-studio/hoipoi_capsule","last_synced_at":"2026-04-19T19:33:10.124Z","repository":{"id":63247253,"uuid":"565906196","full_name":"bird-studio/hoipoi_capsule","owner":"bird-studio","description":"Fill in message with Deno","archived":false,"fork":false,"pushed_at":"2025-10-01T12:18:53.000Z","size":77,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-15T12:54:33.660Z","etag":null,"topics":["commit","cui","deno","gitmoji","gitmojis","terminal","tui","typescript"],"latest_commit_sha":null,"homepage":"https://deno.land/x/hoipoi_capsule","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/bird-studio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-11-14T15:18:23.000Z","updated_at":"2025-10-01T12:17:45.000Z","dependencies_parsed_at":"2023-11-07T12:27:35.038Z","dependency_job_id":"c1a04574-399f-4cd6-9bc8-811e370dd32e","html_url":"https://github.com/bird-studio/hoipoi_capsule","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/bird-studio/hoipoi_capsule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bird-studio%2Fhoipoi_capsule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bird-studio%2Fhoipoi_capsule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bird-studio%2Fhoipoi_capsule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bird-studio%2Fhoipoi_capsule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bird-studio","download_url":"https://codeload.github.com/bird-studio/hoipoi_capsule/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bird-studio%2Fhoipoi_capsule/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32020603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":["commit","cui","deno","gitmoji","gitmojis","terminal","tui","typescript"],"created_at":"2025-05-19T23:13:15.349Z","updated_at":"2026-04-19T19:33:10.116Z","avatar_url":"https://github.com/bird-studio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hoipoi capsule\n\n## What is this?\n\nCreate a commit message in an interactive format.\n\n\u003cvideo controls playsinline width=\"100%\" autoplay loop muted=\"true\" src=\"https://user-images.githubusercontent.com/92862731/201958468-dec2cf7a-8035-47b1-9668-d468641ce8be.mov\" type=\"video/mp4\" \u003e\n Sorry, your browser doesn't support embedded videos.\n\u003c/video\u003e\n\n## Try\n\n```bash\n# Go to git directory\nbrew install deno\n\ndeno run --allow-net --allow-write --allow-run \"https://deno.land/x/hoipoi_capsule/demo/fill_in_commit_message/conventionalcommits_style.ts?source\"\ncat .git/COMMIT_EDITMSG\n```\n\n## Use\n\nRun with Git hook.\n\nIt works without gh. gh is used to obtain github issues.Please complete the gh\nsetup in advance.\n\n```bash\nbrew install deno gh\n```\n\nPrepare Git hook.\n\n```bash\nmkdir .githooks\n\ncat \u003c\u003cEOF \u003e .githooks/prepare-commit-msg\n#!/bin/sh\n\nexec \u003c /dev/tty deno run --allow-net --allow-write --allow-run \"https://deno.land/x/hoipoi_capsule/demo/fill_in_commit_message/conventionalcommits_style.ts?source\"\n\nEOF\n\ngit config --local core.hooksPath .githooks\nchmod +x .githooks/prepare-commit-msg\n```\n\nExecution.\n\n```bash\ntouch myFile.txt\ngit add myFile.txt\ngit commit\n```\n\n## Customize\n\nHere is a reference.\n\n- [conventionalcommits_style](https://github.com/bird-studio/hoipoi_capsule/blob/main/demo/fill_in_commit_message/conventionalcommits_style.ts)\n\n```ts\nimport * as hoipoiCapsule from \"https://deno.land/x/hoipoi_capsule/mod.ts\";\n\nconst commitMessageTemplate = `{{type}}({{scope}}): {{summary}}\n\n{{body}}\n\nBREAKING CHANGE: {{breakingChange}}`;\n\nhoipoiCapsule.useCase.fillInCommitMessage.run({\n  commitMessageTemplate,\n  questionList: [\n    {\n      /**\n       * The answer applies to the {{type}} part of commitMessageTemplate.\n       */\n      target: \"type\",\n      /**\n       * Pre-prepared questions.\n       */\n      q: hoipoiCapsule.preset.fillInCommitMessage.conventionalcommits.qMap.type,\n\n      /**\n       * Thus, you can also create your own questions.\n       */\n      //   q: typeQ,\n\n      /**\n       * Modify the commit message.\n       * Use this function when a message is unanswered, for example.\n       */\n      fixCommitMessage: (p) =\u003e {\n        if (p.answerMap[\"type\"] === \"???\") {\n          return p.commitMessage.replace(/\\r?\\n{2,}/, \"\\n\").trim();\n        }\n        return p.commitMessage;\n      },\n    },\n  ],\n});\n\n/**\n * Please check here.\n * https://github.com/c4spar/deno-cliffy\n */\nconst typeQ = () =\u003e\n  hoipoiCapsule.userInterface.prompt.Select.prompt({\n    message: \"Select type.\",\n    search: true,\n    options: [\n      {\n        name:\n          \"Build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)\",\n        value: \"Build\",\n      },\n      {\n        name:\n          \"CI: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)\",\n        value: \"CI\",\n      },\n      { name: \"Docs: Documentation only changes\", value: \"Docs\" },\n      { name: \"Feat: A new feature\", value: \"Feat\" },\n      { name: \"Fix: A bug fix\", value: \"Fix:\" },\n      { name: \"Perf: A code change that improves performance\", value: \"Perf\" },\n      {\n        name:\n          \"Refactor: A code change that neither fixes a bug nor adds a feature\",\n        value: \"Refactor\",\n      },\n      {\n        name: \"Test: Adding missing tests or correcting existing tests\",\n        value: \"Test\",\n      },\n    ],\n  });\n```\n\n## Convenient Use\n\n- [gitmoji_style](https://github.com/bird-studio/hoipoi_capsule/blob/main/demo/fill_in_commit_message/gitmoji_style.ts)\n\n\u003cvideo controls playsinline width=\"100%\" autoplay loop muted=\"true\" src=\"https://user-images.githubusercontent.com/92862731/202081954-dc908df9-70d8-436a-8ad9-fa5d91cd1280.mov\" type=\"video/mp4\" \u003e\n Sorry, your browser doesn't support embedded videos.\n\u003c/video\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbird-studio%2Fhoipoi_capsule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbird-studio%2Fhoipoi_capsule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbird-studio%2Fhoipoi_capsule/lists"}