scottleedavis / mattermost-remind

A /remind slash command for mattermost

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This project is no longer maintained, please use mattermost-plugin-remind instead.

mattermost-remind Build Status codecov Codacy Badge

A /remind slash command for Mattermost built with Spring Boot

/remind [@someone or ~channel] [what] [when]

set_reminder reminded

usage

See the full list of Usage Examples in the wiki

  • /remind help
  • /remind list
  • /remind version
  • /remind [who] [what] [when]
    • /remind [who] [what] in [# (seconds|minutes|hours|days|weeks|months|years)]
    • /remind [who] [what] at [(noon|midnight|one..twelve|00:00am/pm|0000)] (every) [day|date]
    • /remind [who] [what] (on) [(Monday-Sunday|Month&Day|MM/DD/YYYY|MM/DD)] (at) [time]
    • /remind [who] [what] every (other) [Monday-Sunday|Month&Day|MM/DD] (at) [time]
  • /remind [who] [when] [what]

releases

bugs & issues

setup

requirements

Mattermost Integration
  • Create an administrative user named mattermost-remind
    • get userId for mattermost-remind sudo ./mattermost user search mattermost-remind
    • put userId in ENV where java/image will run REMIND_USER=<USER_ID>
  • Ensure Custom Integrations (in System Console) has the following enabled
    • Enable Incoming Webhooks
    • Enable Custom Slash Commands
    • Enable integrations to override usernames & Enable integrations to override profile picture icons
  • create remind as slash command
    • Title & "Autocomplete Description": Set a reminder
    • Leave "Description" blank
    • Response Username: mattermost-remind
    • Autocomplete hint: [@someone or ~channel] [what] [when]
    • Request URL: <path_to_mattermost-remind>/remind
    • set mattermost system icon
    • put token in ENV where java/image will run REMIND_SLASH_TOKEN=<YOUR_TOKEN>
  • create incoming webhook
    • Title & Description: Set a reminder
    • Channel: Town Square <= (won't be used)
    • Username: mattermost-remind
    • set mattermost system icon
    • put webhook URL in ENV where java/image will run REMIND_WEBHOOK_URL=<YOUR_WEBHOOK>
Datasources
  • h2 is the default database
  • PostgreSQL can be used by changing application.properties and create the reminders & occurrences tables (reminders.example.postgresql.sql)
      spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
      spring.datasource.url=jdbc:postgresql://YOUR_DATABASE_SERVER:5432/YOUR_DATABASE_NAME 
      spring.datasource.username=YOUR_DATABASE_USER 
      spring.datasource.password=postgres@YOUR_DATABASE_PASSWORD  
      spring.datasource.driver-class-name=org.postgresql.Driver
      spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
    
  • SQL Server can be used by changing application.properties and create the reminders & occurrences tables (reminders.example.sqlserver.sql)
      spring.datasource.url=jdbc:sqlserver://YOUR_DATABASE_SERVER;databaseName=YOUR_DATABASE_NAME
      spring.datasource.username=YOUR_DATABASE_USER
      spring.datasource.password=YOUR_DATABASE_PASSWORD
      spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
      spring.jpa.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect
    
  • MySQL can be used by changing application.properties and create the reminders & occurrences tables (reminders.example.mysql.sql)
      spring.datasource.url=jdbc:mysql://YOUR_DATABASE_SERVER/YOUR_DATABASE_NAME
      spring.datasource.username=YOUR_DATABASE_USER
      spring.datasource.password=YOUR_DATABASE_PASSWORD
      spring.datasource.driverClassName=com.mysql.jdbc.Driver
      spring.jpa.hibernate.dialect=org.hibernate.dialect.MySQLDialect
    

build

  • Build: Maven & Java8
    • ./mvnw package
  • Build Docker Image
    • ./mvnw install dockerfile:build

execution

  • Running via java
export REMIND_USER="5okns4uk9ffauy16q8rkhe9zjc"
export REMIND_SLASH_TOKEN="7q61n4m5mfbebpme4ga5nu1gdh"
export REMIND_WEBHOOK_URL="http://127.0.0.1:8065/hooks/jqg3bkxbip8hzgsrsnzep5jqyc"

java -jar application/target/mattermost-remind-app-0.0.4.jar
  • Running via docker
docker pull scottleedavis/mattermost-remind
docker run -p 8080:8080 -e "REMIND_USER=5okns4uk9ffauy16q8rkhe9zjc" -e "REMIND_SLASH_TOKEN=7q61n4m5mfbebpme4ga5nu1gdh" -e "REMIND_WEBHOOK_URL=http://127.0.0.1:8065/hooks/jqg3bkxbip8hzgsrsnzep5jqyc" scottleedavis/mattermost-remind:latest

About

A /remind slash command for mattermost

License:Apache License 2.0


Languages

Language:Java 98.6%Language:Shell 1.3%Language:Dockerfile 0.2%