{"id":21648229,"url":"https://github.com/sapphi-red/hubot-traq","last_synced_at":"2025-04-11T19:33:42.712Z","repository":{"id":34915584,"uuid":"189400931","full_name":"sapphi-red/hubot-traq","owner":"sapphi-red","description":"Hubot adapter for traQ","archived":false,"fork":false,"pushed_at":"2024-12-09T00:25:12.000Z","size":198,"stargazers_count":5,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T02:48:21.045Z","etag":null,"topics":["hubot-adapter","traq","traq-bot"],"latest_commit_sha":null,"homepage":"","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/sapphi-red.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-30T11:21:53.000Z","updated_at":"2025-02-17T08:21:38.000Z","dependencies_parsed_at":"2024-08-15T10:53:32.856Z","dependency_job_id":null,"html_url":"https://github.com/sapphi-red/hubot-traq","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphi-red%2Fhubot-traq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphi-red%2Fhubot-traq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphi-red%2Fhubot-traq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphi-red%2Fhubot-traq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapphi-red","download_url":"https://codeload.github.com/sapphi-red/hubot-traq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248467346,"owners_count":21108629,"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":["hubot-adapter","traq","traq-bot"],"created_at":"2024-11-25T06:54:10.818Z","updated_at":"2025-04-11T19:33:42.689Z","avatar_url":"https://github.com/sapphi-red.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hubot-traq\n[![npm version](https://badge.fury.io/js/hubot-traq.svg)](https://badge.fury.io/js/hubot-traq) ![automatic release](https://github.com/sapphi-red/hubot-traq/workflows/automatic%20release/badge.svg) [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)  \n\n[traQ][]用[Hubot][]アダプター\n\n## 使い方\n\n### 新しいbotをつくる\n\n#### インストール\n前提として[Node.js][]が必要です\n```bash\n# 利用ツールのインストール\nnpm install -g yo generator-hubot\n# botを管理するディレクトリの作成\nmkdir -p /path/to/myhubot\ncd /path/to/myhubot\n# テンプレートの作成\nyo hubot\n```\n\nここまでしたら、画面にしたがって入力していき、**Bot adapter**と表示されたら`hubot-traq`と入力します  \n(もしくは`yo hubot`のあとに[すべてコマンド引数で指定することもできます][cmd-docs])\n\n既定で入っているscriptsが存在するので一度除きます(このままだとredisがないだの怒られるため)  \n具体的には`./external-scripts.json`を開いて`[]`にします  \n追加で`package.json`の`dependencies`の`hubot`と`hubot-traq`以外を取り除いて`npm install`をするといいでしょう  \n\n```bash\n# gitレポジトリの作成\ngit init\ngit add .\ngit commit -m \"Init\"\n```\n\n#### 初期設定\n下記の環境変数をそれぞれ設定します\n- `HUBOT_TRAQ_NAME` - traQで動かすHubotのtraQ ID (例: `@BOT_TEST`なら`BOT_TEST`)\n- `HUBOT_TRAQ_MODE` - BOTのモード (`HTTP`または`WebSocket`、省略時は`HTTP`)\n- `HUBOT_TRAQ_ACCESS_TOKEN` - traQで動かすHubotのAccess Token\n- `HUBOT_TRAQ_EMBED` - メンション・チャンネルリンクの自動埋め込みの有無(`TRUE`にすると有効、省略時は無効)\n- `PORT`または`EXPRESS_PORT` - [HTTPモードでのポート](https://github.com/hubotio/hubot/blob/master/docs/scripting.md#http-listener) (省略時は`8080`)\n- 以下はHTTPモードのときのみ必要\n  - `HUBOT_TRAQ_VERIFY_TOKEN` - traQで動かすHubotのVerification Code\n  - `HUBOT_TRAQ_PATH` - Botサーバーエンドポイントのパス(直下で受け取るなら`\"\"`、`/webhook/`で受け取るなら`\"/webhook/\"`)\n\nVerification CodeなどはそれぞれtraQのBot Consoleから確認できます\n\n#### 実行\n`package.json`の`scripts`の`start`を以下のように変更します\n\n```diff\n-    \"start\": \"hubot -a hubot-traq\",\n+    \"start\": \"hubot -a hubot-traq -n \\\"$HUBOT_TRAQ_NAME\\\" \\\"$@\\\"\",\n```\n\n#### showcaseへのデプロイ\n以下の設定で動作します\n\n- Deploy Type: `Runtime`\n- Build Type: `Buildpack`\n  - Context: `.`\n  - Use Database: BotでDBを使うか次第\n\n---\n\nさらに詳しい説明は[hubotのドキュメント][docs]を参照してください\n\n## Changelog\n- [Change log][]\n\n## リファレンス\n- [Wiki][]\n- [Example][]\n- [Example with Typescript][]\n\n[traQ]: https://github.com/traPtitech/traQ/\n[Hubot]: https://hubot.github.com/\n[Node.js]: https://nodejs.org/ja/\n[cmd-docs]: https://hubot.github.com/docs/\n[docs]: https://github.com/github/hubot/tree/master/docs\n[Wiki]: https://github.com/sapphi-red/hubot-traq/wiki\n[Example]: https://github.com/sapphi-red/traq-hubot-example\n[Example with Typescript]: https://github.com/sapphi-red/traq-hubot-example-ts\n[Change log]: https://github.com/sapphi-red/hubot-traq/blob/master/CHANGELOG.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapphi-red%2Fhubot-traq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapphi-red%2Fhubot-traq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapphi-red%2Fhubot-traq/lists"}