Comments (11)
Opened #70 with some notes on how to add an integration if anyone's interested.
from zulip.
@timabbott
Here we should use webhooks instead of API .
API allows for the same actions like web interface but configuration the API (even if we make it easier) requires from user some technical skills. And its additional not needed maintenance of course
So I prefer using webhooks.
User did some checker in pingdom.com then add a hook that we handle.
This way does not require from the user doing the same configuration twice. And, what is the most important, user can use graphical interface of pingdom.
Small architecture question:
webhooks.py has more than 1000 lines. Quite a lot ;-)
What do you think about quick refactor?
webhooks:
__init__.py
common.py
beanstalk.py
github.py
. (another)
pingdom.py
. (another)
travis.py
In common.py we can have abstract class like
class WebhookHandlerAbstract(object):
def handle():
....
In init we can have just simple functions like:
def api_benstal_webhook(...):
BenstalkWebhookHandler().handle()
@timabbott Quick answer is welcome due to just 14 days trial of pingdom ;-)
from zulip.
Using webhooks here sounds good to me.
I agree that we will want to split webhooks.py into one-file-per-hook. If you choose to work on that, please write your changes in a way that's easy to review and carefully follow the Zulip commit guidelines http://zulip.readthedocs.org/en/latest/code-style.html#version-control
So for that refactor, I'd recommend first a commit moving webhooks.py to webhook/init.py, and then individual commits moving individual integrations out of the common file.
from zulip.
Also I would avoid combining the change to split out the files with a change to add a WebhookHandlerAbstract construct; it usually works best to avoid combining two totally different refactors into the same commit. (does this make sense?)
Also, at present there's little in common between the various webhooks, so I don't think there's a reason to create a WebhookHandlerAbstract class anyway.
from zulip.
WebhookHandlerAbstract is not good name/type - it's just an interface.
from zulip.
#513
Please take a look @timabbott
from zulip.
@timabbott
It's on my fork because I'm working on refactored webhooks version.
Please look if we've not missed our concepts.
from zulip.
Cool! That approach looks pretty good.
from zulip.
#537 - created, ready to review.
from zulip.
Merged in 44ed9da, thanks @TomaszKolek for building this!
from zulip.
FYI @zack-ahdach.
from zulip.
Related Issues (20)
- Update Slack webhook integration to use the new Slack app instead of legacy custom integration HOT 6
- Convert channel warning tooltip to Tippy HOT 7
- Make name change permissions more flexible HOT 6
- Add option to notify users when they are DMing a guest HOT 5
- Recent conversations: Hover state on the row looks almost same as non-hover state on the dark mode.
- Auto-close compose box after auto-opening
- Is it feasible to store data on cloud services? HOT 4
- Link to /accounts/find from page for an organization that doesn't exist HOT 6
- Update message content on /for/X pages HOT 3
- Auto populate bot avatar for webhook integrations bot HOT 12
- Old polls cause web exceptions and broken appearance HOT 8
- ./tools/provision fails to find its libraries when run using the fish shell HOT 6
- Reduce annoying "notification dot" on tab icon HOT 1
- Unable to get user upload from Amazon S3 server using basic authentication from Zulip Cloud server HOT 3
- Remove rendering in build_message_dict, perform in a background worker HOT 2
- Inconsistent localization languages in new channel notification HOT 4
- GIF or Video of Site Interface for East Access
- "New Login" email offers password reset for SAML users
- Make RabbitMQ vHost configurable HOT 2
- Do not redirect /api/v1/ URLs from HTTP to HTTPS HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zulip.