zulip/zerver
Eeshan Garg 026ff48020 webhooks/bitbucket2: Detect pushes that remove branches correctly.
This was a user-reported bug and a very subtle and painful one
to track down.

Previously, if payload['push']['changes'][i]['closed'] was True,
we assumed that a branch was removed. Looking at whether `closed`
was set to True or not was our way to tell whether a push removed
a branch or not.

However, this is wrong! `closed` being set to True can also mean
that the pull request associated with the branch was approved but
the branch itself was not deleted. According to the BitBucket docs,
the correct way to see if a branch is deleted is to check if `new`
is null.

This bug was leading to KeyErrors about not being able to find
the `commits` key, which shouldn't happen anymore!
2018-04-02 19:30:09 -02:30
..
fixtures markdown: Update bugdown emoticon translation logic to match frontend. 2018-03-29 15:56:24 -07:00
lib actions.py: Rename get_service_dicts_for_bots() to get_service_dicts_for_bot() 2018-04-02 11:18:50 -07:00
management mypy: Add explicit Optional for default=None parameters in various files. 2018-03-28 12:31:51 -07:00
migrations profile: Remove integer and float fields. 2018-04-02 09:46:21 -07:00
templatetags mypy: Migrate templatetags/minified_js.py to python3.5 annotations. 2018-03-12 11:23:30 -07:00
tests bugdown: Only open #narrow hash links inside the app. 2018-04-02 10:34:48 -07:00
tornado websockets: Fix race condition in CSRF token initialization. 2018-03-31 09:29:56 -07:00
views org settings: Add realm level default time format setting. 2018-03-31 16:23:26 -07:00
webhooks webhooks/bitbucket2: Detect pushes that remove branches correctly. 2018-04-02 19:30:09 -02:30
worker mypy: Remove need for cast by using ConcreteQueueWorker TypeVar. 2018-03-11 15:34:11 -07:00
__init__.py
apps.py zerver: Use Python 3 syntax for typing. 2017-11-28 16:49:36 -08:00
context_processors.py integrations/email: Render settings.EMAIL_GATEWAY_EXAMPLE correctly. 2018-01-22 18:05:20 -05:00
decorator.py decorators: Log custom HTTP headers in webhook requests. 2018-03-30 13:37:35 -07:00
filters.py zerver: Use Python 3 syntax for typing. 2017-11-28 16:49:36 -08:00
forms.py forms: Fix missing translation tag for disposable emails. 2018-03-15 14:43:40 -07:00
logging_handlers.py test_logging_handlers: Mock out `git describe` because can be slow. 2018-03-23 18:24:51 -07:00
middleware.py mypy: Rewrite some middleware annotations to use ViewFuncT. 2018-03-17 23:25:05 +00:00
models.py profile: Set max length for long text to 500. 2018-04-02 09:51:09 -07:00
signals.py emails: Fix notify_new_login emails have unserializable context. 2017-12-22 16:34:18 -05:00
static_header.txt
storage.py mypy: Improve typing for ManifestStaticFilesStorage monkeypatch. 2017-12-08 19:00:18 -08:00