zulip/zerver/webhooks
Steve Howell 4de2b78c25 github refactor: Add Helper class.
The Helper class will soon grow, but the immediate
problem it solves is the need to jankily inspect
the parameters of our get_*_body function.

Most of the changes were handled by an ad hoc
munge.py script.

The substantive changes were adding the Helper
class and passing it in.

And then the linter discovered a place where
the optional include_title parameter wasn't used
(which is one of the reasons to avoid the janky
inspect-signature technique).

As a side note, none of the include_title parameters
needed a default value of False, as we always passed
in an explicit value.

We test cover both sides of include_title, which
you can verify by hard coding it to either True or
False (and seeing the relevant failures), although I
suspect most individual codepaths
only test one value, based on whether "topic" is in
the fixture or not.

Finally, I know Helper is not a great name, but I
intend to evolve the class a bit before deciding
whether a more descriptive name is helpful here.
(For example, an upcoming commit will add a
log_unexpected helper method.)
2020-09-03 10:44:39 -07:00
..
airbrake webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
alertmanager python: Replace unnecessary intermediate lists with generators. 2020-09-02 11:15:41 -07:00
ansibletower webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
appfollow webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
appveyor webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
basecamp webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
beanstalk webhook tests: Introduce get_payload. 2020-08-24 12:34:46 -07:00
beeminder webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
bitbucket webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
bitbucket2 webhook tests: Avoid check_webhook for multi messages. 2020-08-24 12:34:46 -07:00
bitbucket3 python: Rewrite dict() as {}. 2020-09-02 11:15:41 -07:00
buildbot webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
canarytoken webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
circleci webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
clubhouse webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
codeship webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
crashlytics webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
delighted webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
deskdotcom python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00
dialogflow webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
dropbox webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
errbit webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
flock webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
freshdesk webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
front webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
gci webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
gitea isort: Enable black profile. 2020-09-02 11:00:07 -07:00
github github refactor: Add Helper class. 2020-09-03 10:44:39 -07:00
gitlab webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
gocd webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
gogs webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
gosquared webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
grafana webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
greenhouse webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
groove webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
harbor webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
hellosign webhook tests: Introduce get_payload. 2020-08-24 12:34:46 -07:00
helloworld webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
heroku webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
homeassistant webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
honeybadger/fixtures inetgrations: Add webhook payloads for Honeybadger. 2018-01-02 11:45:33 -05:00
ifttt webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
insping webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
intercom webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
jira jira: Ignore worklog_updated event. 2020-08-24 12:34:46 -07:00
librato webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
mention webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
netlify webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
newrelic webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
opbeat webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
opsgenie python: Replace unnecessary intermediate lists with generators. 2020-09-02 11:15:41 -07:00
pagerduty webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
papertrail webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
pingdom webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
pivotal webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
raygun webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
reviewboard webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
rollbar/fixtures integrations: Add webhook payloads for rollbar. 2018-01-11 06:32:37 -05:00
runscope/fixtures integrations: Add webhook payloads for Runscope. 2017-12-29 07:27:20 -05:00
semaphore webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
sentry sentry: When there are multiple stacktraces, take the most recent. 2020-08-31 14:14:20 -07:00
slack webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
slack_incoming webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
solano webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
splunk webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
statuspage webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
stripe webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
taiga webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
teamcity webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
thinkst webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
transifex webhook tests: Introduce get_payload. 2020-08-24 12:34:46 -07:00
travis webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
trello trello: Remove unnecessary "is not supported" verbiage. 2020-08-31 14:24:35 -07:00
updown webhook tests: Avoid check_webhook for multi messages. 2020-08-24 12:34:46 -07:00
wordpress webhook tests: Rename helper to send_webhook_payload. 2020-08-24 12:34:46 -07:00
yo webhook tests: Introduce get_payload. 2020-08-24 12:34:46 -07:00
zabbix webhook tests: Remove needless get_body functions. 2020-08-24 12:34:46 -07:00
zapier webhook tests: Rename main helper to check_webhook. 2020-08-24 12:34:46 -07:00
zendesk webhook tests: Introduce get_payload. 2020-08-24 12:34:46 -07:00
__init__.py