Discover Packages
github.com/txn2/n2bot
command
module
Version:
v1.0.7
Opens a new window with list of versions in this module.
Published: Aug 26, 2018
License: MIT
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
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
Expand ▾
Collapse ▴
Documentation
¶
n2irc receives posted JSON and renders associated
templates to an IRC channel
txn2.com
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.