Giter VIP home page Giter VIP logo

webhooks2irc's Introduction

WebHooks2IRC

Build Status

GitLab Web Hooks to IRC

实现GitLab Web Hooks的推送的数据进行模版渲染,然后发送到指定的IRC频道

USAGE

  • 配置 settings.py
  • 安装相关的依赖库(推荐virtualenv)
  • 运行 Bottle 提供的web服务
  • 在 GitLab 中配置对应Hooks地址
  • 测试 Web Hooks
  • 确认 IRC 是否收到对应消息。

FUTURE

  • GitLab-CI 相关hooks支持.
  • 彩色化输出内容到IRC。
  • 通过 GitLab API 获取推送内容中部分 id 的名称
  • 支持发送私聊消息。
  • 相关BUG修正
  • 相关测试用例
  • Dockerfile编写

CHANGELOG

  • v0.1.1 2015-11-21

    • 一些BUG修复
    • 关键测试用例编写。
    • travis-ci 集成
    • 发布 v0.1.1
  • v0.1.0 2015-11-21

    • 模版渲染异常处理
    • 加入完整的模版
    • 发布 v0.1.0
  • v0.1.0 2015-11-20

    • irc 通讯
    • mako 渲染消息
    • 相关模块规范化.
    • 整个流程走通
  • v0.1.0 2015-11-19

    • 主体框架搭建
    • bottle 提供web服务

LICENSE

  • BSD 2-clause "Simplified" License

webhooks2irc's People

Contributors

cj1324 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

webhooks2irc's Issues

irc.client.MessageTooLong: Messages limited to 512 bytes including CR/LF

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.3/threading.py", line 901, in _bootstrap_inner
self.run()
File "/home/hanchen/webhooks2irc_env/lib/python3.3/site-packages/WebHooks2IRC-0.1.0-py3.3.egg/webhooks2irc/core/ircbot.py", line 5
2, in run
self._send(obj['channel'], obj['message'])
File "/home/hanchen/webhooks2irc_env/lib/python3.3/site-packages/WebHooks2IRC-0.1.0-py3.3.egg/webhooks2irc/core/ircbot.py", line 3
8, in _send
self.server.privmsg("#{0}".format(channel), message)
File "/home/hanchen/webhooks2irc_env/lib/python3.3/site-packages/irc/client.py", line 887, in privmsg
self.send_raw("PRIVMSG %s :%s" % (target, text))
File "/home/hanchen/webhooks2irc_env/lib/python3.3/site-packages/irc/client.py", line 923, in send_raw
sender(self._prep_message(string))
File "/home/hanchen/webhooks2irc_env/lib/python3.3/site-packages/irc/client.py", line 911, in _prep_message
raise MessageTooLong(msg)
irc.client.MessageTooLong: Messages limited to 512 bytes including CR/LF

Template Render Failed

Template Render Failed.
Traceback (most recent call last):
File "/home/hanchen/webhooks2irc_env/lib/python3.3/site-packages/webhooks2irc/core/template.py", line 29, in get_message
message = template.render(*_json)
File "/home/hanchen/webhooks2irc_env/lib/python3.3/site-packages/mako/template.py", line 445, in render
return runtime.render(self, self.callable, args, data)
File "/home/hanchen/webhooks2irc_env/lib/python3.3/site-packages/mako/runtime.py", line 829, in _render
*_kwargs_for_callable(callable, data))
File "/home/hanchen/webhooks2irc_env/lib/python3.3/site-packages/mako/runtime.py", line 864, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/home/hanchen/webhooks2irc_env/lib/python3.3/site-packages/mako/runtime.py", line 890, in exec_template
callable
(context, _args, *_kwargs)
File "_push_hook_tpl", line 39, in render_body
IndexError: list index out of range

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.