{"id":21029690,"url":"https://github.com/loafoe/hubot-matteruser","last_synced_at":"2025-05-14T16:10:02.655Z","repository":{"id":4003971,"uuid":"51656135","full_name":"loafoe/hubot-matteruser","owner":"loafoe","description":"Hubot adapter for Mattermost using Web API and Websockets","archived":false,"fork":false,"pushed_at":"2025-01-17T10:57:33.000Z","size":1717,"stargazers_count":192,"open_issues_count":20,"forks_count":81,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T13:43:09.327Z","etag":null,"topics":["hubot","hubot-adapter","mattermost","websockets"],"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/loafoe.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}},"created_at":"2016-02-13T17:16:32.000Z","updated_at":"2025-02-12T13:02:38.000Z","dependencies_parsed_at":"2023-07-05T19:32:49.508Z","dependency_job_id":null,"html_url":"https://github.com/loafoe/hubot-matteruser","commit_stats":{"total_commits":292,"total_committers":28,"mean_commits":"10.428571428571429","dds":0.6712328767123288,"last_synced_commit":"d5c7722a1588d82e69e7d5d6b47f868344a61872"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fhubot-matteruser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fhubot-matteruser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fhubot-matteruser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loafoe%2Fhubot-matteruser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loafoe","download_url":"https://codeload.github.com/loafoe/hubot-matteruser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247847596,"owners_count":21006098,"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","hubot-adapter","mattermost","websockets"],"created_at":"2024-11-19T12:13:39.915Z","updated_at":"2025-04-08T13:00:23.412Z","avatar_url":"https://github.com/loafoe.png","language":"JavaScript","funding_links":[],"categories":["📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"[![Downloads](https://img.shields.io/npm/dm/hubot-matteruser.svg)](https://www.npmjs.com/package/hubot-matteruser)\n[![Version](https://img.shields.io/npm/v/hubot-matteruser.svg)](https://github.com/loafoe/hubot-matteruser/releases)\n[![Licence](https://img.shields.io/npm/l/express.svg)](https://github.com/loafoe/hubot-matteruser/blob/master/LICENSE)\n\n# hubot-matteruser\n\n**Hubot** is \"chat bot\" created by GitHub that listens for commands and executes actions based on your requests. \n\n`hubot-matteruser` is a Hubot adapter for [Mattermost](https://about.mattermost.com/) written in JavaScript that uses the Mattermost [Web Services API](https://api.mattermost.com/) and WebSockets to deliver Hubot functionality. \n\n- Learn more about [Hubot in Wired Magazine](https://www.wired.com/2015/10/the-most-important-startups-hardest-worker-isnt-a-person/)\n- Learn more about [Mattermost as an open source, self-hosted team communication server](https://about.mattermost.com/)\n\n## Description\n\nThis [Hubot](https://github.com/github/hubot) adapter connects to your Mattermost server. You can invite your bot to any channel just as a regular user. It listens and perform your commands. The adapter uses [mattermost-client](https://github.com/loafoe/mattermost-client) for all low level Mattermost communication.\n\nTwo authentication methods are supported:\n\n* login/password,\n* [personnal access token](https://docs.mattermost.com/developer/personal-access-tokens.html).\n\nThe second one is necessary if the Mattermost server delegates the authentication to another service (for example when using Mattermost shiped with [GitLab](http://www.gitlab.com)).\nSuch method is also probably prefered as the token does not reveals original credentials and can be revoked without any impact on the related account.\n\n## Docker usage\n\n### Standalone\n\nClone this repository, then build the Hubot-Matteruser container:\n\n```\n$ docker build --build-arg hubot_owner=\u003cowner\u003e \\\n             --build-arg hubot_name=\u003cname\u003e \\\n             --build-arg hubot_description=\u003cdesc\u003e \\\n             --tag=hubot-matteruser \\\n             .\n```\n\nStart the container:\n\n```\n$ docker run -it \\\n           --env MATTERMOST_HOST=\u003cmm_host\u003e \\\n           --env MATTERMOST_GROUP=\u003cmm_team\u003e \\\n           --env MATTERMOST_USER=\u003cmm_user_email\u003e \\\n           --env MATTERMOST_PASSWORD=\u003cmm_user_password\u003e \\\n           -p 8080:8080 \\\n           --name hubot-matteruser \\\n           hubot-matteruser\n```\n\nor if you have a personal access token:\n\n```\n$ docker run -it \\\n           --env MATTERMOST_HOST=\u003cmm_host\u003e \\\n           --env MATTERMOST_GROUP=\u003cmm_team\u003e \\\n           --env MATTERMOST_ACCESS_TOKEN=\u003cpersonal\u003e\n           -p 8080:8080 \\\n           --name hubot-matteruser \\\n           hubot-matteruser\n```\n\n### Docker Compose\n\nTo integrate with a running Mattermost instance, update docker-compose.yml accordingly and launch the bot:\n\n``` \ndocker-compose build\ndocker-compose run -d\n```\n\nIf you just want to test locally, you can find [here](https://github.com/banzo/mattermost-docker/tree/feature/hubot-matteruser) a fork of the [official Mattermost Docker Compose stack](https://github.com/mattermost/mattermost-docker) plugged to Hubot-Matteruser: \n\n\n## Installation\n\n### 1) Install a Mattermost server\n\nFollow the [Mattermost install guides](https://docs.mattermost.com/guides/administrator.html#install-guides) to set up the latest version of Mattermost 5.4.x.\n\n**IMPORTANT:** Make sure your `hubot-matteruser` and `mattermost-client` versions **match** the major version of your Mattermost server so the API versions will match. \n\n### 2) Install hubot-matteruser\n\nOn a separate server, install `hubot-matteruser` using the following commands: \n\n  ```sh\nnpm install -g yo generator-hubot\nyo hubot --adapter matteruser\n  ```\n\nFollow the instructions to set up your bot, including setup of [`mattermost-client`](https://github.com/loafoe/mattermost-client). \n\n#### Environment variables\n\nThe adapter requires the following environment variables to be defined before your Hubot instance will start:\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| MATTERMOST\\_HOST | Yes | The Mattermost host e.g. _mm.yourcompany.com_ |\n| MATTERMOST\\_GROUP | Yes | The team/group on your Mattermost server e.g. _core_ |\n| MATTERMOST\\_USER | No | The Mattermost user account name e.g. _hubot@yourcompany.com_ |\n| MATTERMOST\\_PASSWORD | No | The password of the user e.g. _s3cr3tP@ssw0rd!_ |\n| MATTERMOST\\_ACCESS\\_TOKEN | No | The [personal access token](https://docs.mattermost.com/developer/personal-access-tokens.html) of the user |\n| MATTERMOST\\_WSS\\_PORT | No | Overrides the default port `443` for  websocket (`wss://`) connections |\n| MATTERMOST\\_HTTP\\_PORT | No | Overrides the default port (`80` or `443`) for `http://` or `https://` connections |\n| MATTERMOST\\_TLS\\_VERIFY | No | (default: true) set to 'false' to allow connections when certs can not be verified (ex: self-signed, internal CA, ... - MITM risks) |\n| MATTERMOST\\_USE\\_TLS | No | (default: true) set to 'false' to switch to http/ws protocols |\n| MATTERMOST\\_LOG\\_LEVEL | No | (default: info) set log level (also: debug, ...) |\n| MATTERMOST\\_REPLY | No | (default: true) set to 'false' to stop posting `reply` responses as comments |\n| MATTERMOST\\_IGNORE\\_USERS | No | (default: empty) Enter a comma-separated list of user senderi\\_names to ignore. |\n\n#### Example configuration\n\nThe below example assumes you have created a user `hubot@yourcompany.com` with username `hubot` and password `s3cr3tP@ssw0rd!` on your Mattermost server in the `core` team reachable on URL `https://mm.yourcompany.com/core`\n\n  ```sh\nexport MATTERMOST_HOST=mm.yourcompany.com \nexport MATTERMOST_GROUP=core\nexport MATTERMOST_USER=hubot@yourcompany.com\nexport MATTERMOST_PASSWORD=s3cr3tP@ssw0rd!\n  ```\n\n## Upgrade\n\nTo upgrade your Hubot for Mattermost 4.4.x, find the `package.json` file in your Hubot directory and look for the line in the `dependencies` section that references `hubot-matteruser`. Change the verion so it points to `^5.4.4` of the client. Example:\n\n  ```json\n    ...\n    \"dependencies\": {\n      \"hubot-matteruser\": \"^5.4.6\"\n    },\n    ...\n  ```\n\n## Try the Hubot demo\n\nYou can try out Hubot by joining the Mattermost community server and joining the Hubot channel: \n\n1. [Create an account](https://pre-release.mattermost.com/signup_user_complete/?id=f1924a8db44ff3bb41c96424cdc20676) on the Mattermost nightly builds server at https://pre-release.mattermost.com/\n2. Join the \"Hubot\" channel\n3. Type `hubot help` for instructions\n\n### Sample commands\n\nYou can try a simple command like `hubot the rules` to bring some static text stored in Hubot: \n\n![s](https://cloud.githubusercontent.com/assets/177788/20645776/b25da69a-b41c-11e6-81d2-a40d76947e60.png)\n\nTry `hubot animate me` to have Hubot reach out to Giphy and bring back a random animated image.\n\n![s](https://cloud.githubusercontent.com/assets/177788/20645764/88c267a8-b41c-11e6-96c9-529c3ca844f3.png)\n\nTry `hubot map me [NAME_OF_CITY]` to have Hubot reach out to Google Maps and bring back a map based on the name of a city you pass in as a parameter. For example, `hubot map me palo alto` brings back the below map of Palo Alto\n\n![s](https://cloud.githubusercontent.com/assets/177788/20645769/9d58a786-b41c-11e6-90b1-6a9e7ab19172.png)\n\n\n## License\n\nThe MIT License. See `LICENSE` file.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floafoe%2Fhubot-matteruser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floafoe%2Fhubot-matteruser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floafoe%2Fhubot-matteruser/lists"}