n2bot

command module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2018 License: MIT Imports: 13 Imported by: 0

README

n2bot

n2bot receives POSTed JSON data from third party applications using webhooks (also called a web callback or HTTP push API) in order to communicate stataus to and IRC channel.

n2bot is configured through a set of rules associated the type of posted JSON to a corresponding template used to form the channel message.

Example Configuration:

replacements:
  - pattern: user1
    replacement: cjimti
rules:
  - name: Gitlab Merge Request
    producer: Gitlab
    contentRule:
      key: object_kind
      equals: merge_request
    description: Gitlab merge request.
    template: "{{ .object_attributes.assignee.username }}, \x0304MERGE REQUEST\x03 #{{ .object_attributes.id }} is \x0313{{ .object_attributes.state }}\x03 for \x0307{{ .project.name }}\x03 {{ .project.web_url }} cc {{ .user.username }}"

Development

Run from source:

DEBUG=true CONFIG=example.yml go run ./n2bot.go

Documentation

Overview

n2irc receives posted JSON and renders associated templates to an IRC channel

txn2.com

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL