Anders Kaseorg
3321a81c4a
wordpress: Fix nonsense tests.
...
‘stream_name’ is not a cromulent keyword argument for client_post(),
‘unknown_action’ is malformed application/x-www-form-urlencoded, and
these two tests were duplicates of each other with different comments.
I’m not sure what they were intended to test, but here’s a guess.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-23 16:12:53 -07:00
Alex Vandiver
d0c5389d60
gitlab: Fix event_name -> object_kind defaulting.
...
94457732c1
changed this from:
```py
event_name = payload.get("event_name", payload.get("object_kind")).tame(check_string)
```
...to:
```py
event_name = payload.get("event_name", payload["object_kind"]).tame(check_string)
```
Which causes a failure when `event_name` exists but `object_kind` does
not, since the default is evaluated first.
Switch to an `if` statement to clarify the fallbacks better.
2022-06-02 23:23:19 -07:00
Anders Kaseorg
8b1e7a8b3e
github: Accept null for issue and pull request body.
...
https://github.com/octokit/webhooks/blob/v5.6.0/payload-schemas/api.github.com/common/issue.schema.json#L84
https://github.com/octokit/webhooks/blob/v5.6.0/payload-schemas/api.github.com/common/pull-request.schema.json#L78
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-05-23 15:52:24 -07:00
Anders Kaseorg
0043c0b6b2
django: Use HttpRequest.headers.
...
Fixes #14769 .
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-05-13 20:42:20 -07:00
Anders Kaseorg
110f7a379a
beanstalk: Move %40 kludge into authenticated_rest_api_view.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-05-13 20:42:20 -07:00
Anders Kaseorg
1e453633b0
gitlab: Remove function signature inspection nonsense.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-05-12 18:04:44 -07:00
Anders Kaseorg
f05fa9937b
gci: Fix get_body_based_on_event type.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-05-12 18:04:44 -07:00
Anders Kaseorg
4c772989a1
front: Fix get_body_based_on_event type.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-05-12 18:04:44 -07:00
Anders Kaseorg
6d1b68c61b
freshdesk: Remove unsafe TicketDict class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-05-12 17:56:46 -07:00
Christopher Chong
94457732c1
github, gitlab: Replace the usage of dict.get(key) with dict[key].
2022-05-10 13:50:20 -07:00
Christopher Chong
27a498e1e7
gitlab: Strengthen types using WildValue.
2022-05-10 13:50:20 -07:00
Christopher Chong
76b1a682b7
github: Strengthen types using WildValue.
2022-05-10 13:50:20 -07:00
Christopher Chong
2f097c524e
gitea, gogs: Strengthen types using WildValue.
2022-05-10 13:50:20 -07:00
Christopher Chong
83178a474f
gci: Strengthen types using WildValue.
2022-05-10 13:50:20 -07:00
Christopher Chong
087d4dff9d
front: Strengthen types using WildValue.
2022-05-10 13:50:20 -07:00
Christopher Chong
3cd41be3d0
freshstatus: Strengthen types using WildValue.
2022-05-10 13:50:20 -07:00
Christopher Chong
f349da218c
freshping: Strengthen types using WildValue.
2022-05-10 13:50:20 -07:00
Christopher Chong
ec1e958e90
freshdesk: Strengthen types using WildValue.
2022-05-10 13:50:20 -07:00
Christopher Chong
6e0e175183
flock: Strengthen types using WildValue.
2022-05-10 13:50:20 -07:00
Christopher Chong
5833c05fa6
errbit: Strengthen types using WildValue.
2022-05-10 13:50:20 -07:00
Christopher Chong
66fd6b1e55
dialogflow: Strengthen types using WildValue.
2022-05-10 13:50:20 -07:00
Christopher Chong
990a046fc7
delighted: Strengthen types using WildValue.
2022-05-10 13:50:20 -07:00
Adam Sah
a9ce02348b
testing: Improve backend code coverage for semaphore webhook.
2022-05-04 16:13:24 -07:00
Christopher Chong
b6f6f6db8d
slack_incoming: Process request payload directly in view.py.
...
slack_incoming webhook previously used has_request_variables to
extract payload from HttpRequest object first, before trying to
access HttpRequest.body again in view.py. This caused an error
when one sends a request without payload - it is forbidden to
read from request data stream twice.
Instead of relying on has_request_variables, this PR extracts
payload depending on content type in view.py directly to avoid
reading request data stream twice.
Fixes #19056 .
2022-04-28 14:45:38 -07:00
Anders Kaseorg
6331a314d4
Correctly hyphenate “non-”.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-27 22:10:31 -07:00
Anders Kaseorg
a2825e5984
python: Use Python 3.8 typing.{Protocol,TypedDict}.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-27 12:57:49 -07:00
Anders Kaseorg
a543dcc8e3
Remove Debian 10 support.
...
As a consequence:
• Bump minimum supported Python version to 3.8.
• Move Vagrant environment to Ubuntu 20.04, which has Python 3.8.
• Move CI frontend tests to Ubuntu 20.04.
• Move production build test to Ubuntu 20.04.
• Move 3.4 upgrade test to Ubuntu 20.04.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-26 16:32:02 -07:00
Anders Kaseorg
975066e3f0
actions: Split out zerver.actions.message_send.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-14 17:14:34 -07:00
Anders Kaseorg
24070c7ad8
beeminder: Accept float for payload["goal"]["pledge"].
...
The documentation at https://api.beeminder.com/#goal says this is
“number”; empirically, we do in fact get decimal points.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-22 21:08:48 -04:00
Simmo Saan
307a7d8104
bitbucket3: Fix docs typo Zuilp -> Zulip
2022-03-20 16:10:03 -07:00
Anders Kaseorg
2a0bc2d1c9
crashlytics: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
be781f19e6
codeship: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
d5a8e040da
clubhouse: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
573d264759
circleci: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
02393ecad7
canarytoken: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
d86fb95ce6
buildbot: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
42662f22c8
bitbucket3: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
6528538188
bitbucket2: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
b637ba5f0f
bitbucket: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
af565ef32f
beeminder: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
950e3cfcaf
beanstalk: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
2551320a3b
beanstalk: Remove pointless payload mutation.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
4689678546
basecamp: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
ff187411c0
appveyor: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
04e09d21a3
appfollow: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
07ae5f54ee
ansibletower: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
d436f8098e
alertmanager: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
ac9a5ba894
airbrake: Strengthen types using WildValue.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
af67eee3ea
bitbucket2: Cast append_punctuation argument to str.
...
Commit ab8aae6d0c
(#12161 ) incorrectly
assumed that ‘new’ is a string. In the case of change == "links",
it’s a dict.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00
Anders Kaseorg
82081ddb95
bitbucket3: Remove function signature inspection nonsense.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-15 13:02:02 -07:00