GithubHelp home page GithubHelp logo

spivegin / hubot-matteruser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from loafoe/hubot-matteruser

0.0 1.0 0.0 33 KB

Hubot adapter for Mattermost using Web API and Websockets

License: MIT License

CoffeeScript 100.00%

hubot-matteruser's Introduction

Downloads Version Licence

hubot-matteruser

Hubot Adapter for Mattermost using the Web API and Websockets.

Description

Use this Hubot Adapter to connect to your Mattermost server. You can invite your bot to any channel just as a regular user. It will listen and perform your commands. The adapter uses mattermost-client for all low level Mattermost communication.

Installation

Creating a bot from scratch is easy:

npm install -g yo generator-hubot
yo hubot --adapter matteruser

Follow the instructions to set up your bot.

Environment variables

The adapter requires the following environment variables to be defined before your Hubot instance will start:

Variable Required Description
MATTERMOST_HOST Yes The Mattermost host e.g. mm.yourcompany.com
MATTERMOST_GROUP Yes The team/group on your Mattermost server e.g. core
MATTERMOST_USER Yes The Mattermost user account name e.g. [email protected]
MATTERMOST_PASSWORD Yes The password of the user e.g. s3cr3tP@ssw0rd!
MATTERMOST_WSS_PORT No Overrides the default port 443 for websocket (wss://) connections
MATTERMOST_HTTP_PORT No Overrides the default port (80 or 443) for http:// or https:// connections
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)
MATTERMOST_USE_TLS No (default: true) set to 'false' to switch to http/ws protocols
MATTERMOST_LOG_LEVEL No (default: info) set log level (also: debug, ...)

Example configuration

The below example assumes you have created a user [email protected] with username hubot and password s3cr3tP@ssw0rd! on your Mattermost server in the core team reachable on URL https://mm.yourcompany.com/core

export MATTERMOST_HOST=mm.yourcompany.com 
export MATTERMOST_GROUP=core
export [email protected]
export MATTERMOST_PASSWORD=s3cr3tP@ssw0rd!

Example usage

For a complete working application that uses this client checkout the Hubot Mattermost adapter

Mattermost 3.3

Recently Mattermost has received a major upgrade that introduces backwards incompatible changes. Since hubot-matteruser is using user credentials for interacting with the Mattermost API this will break your Hubot if you upgrade your Mattermost server without also upgrading the mattermost-client version it uses.

Upgrading your Hubot for Mattermost 3.3

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 ^3.3.0 of the client. Example:

  ...
  "dependencies": {
    "hubot-matteruser": "^3.3.1"
  },
  ...

License

The MIT License. See LICENSE file.

hubot-matteruser's People

Contributors

citysim avatar contolini avatar hesstobi avatar loafoe avatar vhex avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.