tinyspeck/hammock

语言: PHP

git: https://github.com/tinyspeck/hammock

在您自己的服务器上运行Slack集成
Run Slack integrations on your own server
README.md (中文)

弃用

请注意,此项目已不再维护。

吊床

=========

Hammock是一个用于运行Slack集成的独立webapp。 这允许您修改现有集成,编写新的自定义集成或使用 防火墙内部的某些集成。

为Hammock编写的集成使用与Slack本身相同的API,因此有所贡献 这里的新集成将允许将它们添加到主要的Slack集成列表中。

要求

Hammock需要一个运行最新版PHP的Web服务器。 对于需要轮询的集成,还需要cron (或Windows上的/ schtasks)。

安装

  • 将此git存储库复制到Web服务器中
  • 将lib / config.php.example复制到lib / config.php
  • 在文本编辑器中打开lib / config.php,然后按照里面的说明操作
  • 确保您的Web服务器可以写入数据/
  • 在浏览器中访问index.php并开始配置

Heroku的

您可以使用以下命令在Heroku上运行Hammock(您需要安装 Heroku工具带已经):

cd hammock
heroku create
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php.git#redis
heroku config:set HAMMOCK_ROOT=http://{URL-TO-APP}/
heroku config:set HAMMOCK_CLIENT_ID={YOUR-CLIENT-ID}
heroku config:set HAMMOCK_CLIENT_SECRET={YOUR-CLIENT-SECRET}
heroku addons:add redistogo
git push heroku master

所有配置选项都从环境变量加载,数据存储在Redis中。

添加集成

要创建自己的集成,请阅读服务文档。

您还可以查看完整的服务参考文档。

路线图

这个版本的Hammock是非常准确的,旨在支持简单的webhook-to-Slack 风格整合首先。为了更好地支持这一点,我们将为其添加重播调试器 捕获传入的webhooks并能够以只读模式重播它们 发展。

未来的插件将能够提供交叉插件身份验证,例如,一个GitHub 集成可以使您对GitHub进行一次授权,然后允许您添加多个不同的 代码,问题,要点等的集成并共享凭据。这将得到支持 由插件的不同子类。

Hammock的视觉外观有点与Slack服务页面相匹配,但这样做 被更改为更紧密匹配,具有用于commmon UI元素的构建块,以及切换 集成配置的计划选项卡式界面。

对于需要某种轮询的集成,Hammock将支持轮询回调 并自动处理一些API调用diffing行为。使用这种机制,进行集成 可以在外部API调用的结果发生更改时注册要调用的方法。

我们还计划通过斜杠命令支持Slack内部触发的集成 和其他用户发起的动作。

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

DEPRECATED

Please note that this project is no longer maintained.

Hammock

=========

Hammock is a standalone webapp for running Slack integrations.
This allows you to modify existing integrations, write new custom integrations, or use
certain integrations inside your firewall.

Integrations written for Hammock use the same API as Slack itself, so contributing
new Integrations here will allow them to be added to the main Slack integrations list.

Requirements

Hammock requires a webserver running a recent version of PHP.
For integrations that require polling, cron is also required
(or at/schtasks on Windows).

Installation

  • Make a clone of this git repository onto your web server
  • Copy lib/config.php.example to lib/config.php
  • Open lib/config.php in a text editor and follow the instructions inside
  • Make sure data/ is writable by your web server
  • Visit index.php in your browser and start configuring

Heroku

You can run Hammock on Heroku using the following commands (you'll need to have installed
the Heroku toolbelt already):

cd hammock
heroku create
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php.git#redis
heroku config:set HAMMOCK_ROOT=http://{URL-TO-APP}/
heroku config:set HAMMOCK_CLIENT_ID={YOUR-CLIENT-ID}
heroku config:set HAMMOCK_CLIENT_SECRET={YOUR-CLIENT-SECRET}
heroku addons:add redistogo
git push heroku master

All config options are loaded from the environment variables and data is stored in Redis.

Adding integrations

To create your own integrations read the service docs.

You can also check the full service reference documentation.

Roadmap

This version of Hammock is pretty barebones, designed to support simple webhook-to-Slack
style integrations first. To better support this, we'll be adding a replay-debugger for
capturing incoming webhooks and being able to replay them in a read-only mode while
developing.

Future plugins will be able to provide cross-plugin authentication, so that e.g. a GitHub
integration can auth you against GitHub once and then allow you to add multiple different
integrations for code, issues, gists, etc. and share the credentials. This will be supported
by a different subclass of plugins.

The visual appearance of Hammock somewhat matches the Slack services pages, but this will
be changed to more closely match, have building blocks for commmon UI elements, and switch
the the planned tabbed interface for integration config.

For integrations that require some kind of polling, Hammock will support polling callbacks
and handle some API call diffing behavior automatically. Using this mechanism, an integration
can register a method to be called when the results of an external API call change.

We also plan to support integrations that are triggered from within Slack, via slash commands
and other user-initiated actions.