npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hubot-matteruser-es6

v0.3.0

Published

[![npm package][npm-badge]][npm]

Downloads

12

Readme

hubot-matteruser-es6

npm package

Hubot is "chat bot" created by GitHub that listens for commands and executes actions based on your requests.

hubot-matteruser-es6 is a Hubot adapter for Mattermost written in javascript es6 that uses the Mattermost Web Services API and WebSockets to deliver Hubot functionality.

About current version 0.1.0

  • This version is testing currently. Do not use it in production.
  • This version is based on https://github.com/loafoe/hubot-matteruser v3.9.1
  • This version use mattermost v3 API and has been tested on mattermost v3.9.2
  • This version is compatible hubot v3.0.1 (es6 ported version)

Description

This 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 for all low level Mattermost communication.

Try the Hubot demo

You can try out Hubot by joining the Mattermost community server and joining the Hubot channel:

  1. Create an account on the Mattermost nightly builds server at https://pre-release.mattermost.com/
  2. Join the "Hubot" channel
  3. Type hubot help for instructions

Sample commands

You can try a simple command like hubot the rules to bring some static text stored in Hubot:

s

Try hubot animate me to have Hubot reach out to Giphy and bring back a random animated image.

s

Try 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

s

Docker usage

Standalone

Clone this repository, then build the Hubot-Matteruser container:

docker build --build-arg hubot_owner=<owner> \
             --build-arg hubot_name=<name> \
             --build-arg hubot_description=<desc> \
             --tag=hubot-matteruser-es6 \
             .

Start the container:

docker run -it \
           --env MATTERMOST_HOST=<mm_host> \
           --env MATTERMOST_GROUP=<mm_team> \
           --env MATTERMOST_USER=<mm_user_email> \
           --env MATTERMOST_PASSWORD=<mm_user_password> \
           -p 8080:8080 \
           --name hubot-matteruser-es6 \
           hubot-matteruser-es6

Docker Compose

TODO

Installation

1) Install a Mattermost server

Follow the Mattermost install guides

2) Install hubot-matteruser

On a separate server, install hubot-matteruser using the following commands:

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

Follow the instructions to set up your bot, including setup of mattermost-client.

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, ...) | | MATTERMOST_REPLY | No | (default: true) set to 'false' to stop posting reply responses as comments | | MATTERMOST_IGNORE_USERS | No | (default: empty) Enter a comma-separated list of user senderi_names to ignore. |

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!

License

The MIT License. See LICENSE file.