zulip/zerver/webhooks/github/fixtures
Eeshan Garg 4c0890e8b0 webhooks/github: Handle empty 'requested_reviewers' key.
We recently received a bug report that implied that for certain
payloads, the `requested_reviewers` key was empty whereas a
singular `requested_reviewer` key containing one reviewer's
information was present in its stead. Naturally, this raised
some not so pretty IndexError exceptions.

After some investigation and generating a few similar payloads,
I discovered that in every case both the `requested_reviewers`
and the `requested_reviewer` keys were correctly populated, so I
had to manually edit the payload to reproduce the error on my end.

My guess is that this anomaly goes back to when GitHub's reviewer
request feature was new and didn't support requesting multiple
reviewers, and that the singular `requested_reviewer` key could
possibly just be there for backwards compatibility or might just
be mere oversight. Either way, the solution here is to look for the
plural `requested_reviewers` key, and if that is empty, fall back
to the singular `requested_reviewer` key.
2018-10-23 14:41:24 -07:00
..
assigned_pull_request.json
closed_pull_request.json
commit_comment.json
create.json
delete.json
deployment.json
deployment_status.json
edited_pull_request.json
fork.json
issue.json
issue_comment.json
issue_comment_deleted.json webhooks/github: Test and improve messages for issue comment deletion. 2018-10-04 12:16:06 -07:00
labeled_pull_request.json
member.json
membership.json
merged_pull_request.json
opened_pull_request.json
opened_pull_request_with_preassigned_assignee.json webhooks/github: Test pull requests with preassigned assignees. 2018-10-04 12:16:06 -07:00
page_build.json
ping.json
ping_organization.json
public.json
pull_request_review.json
pull_request_review_comment.json
pull_request_review_requested.json webhooks/github: Add support for PR review requests. 2018-07-01 12:40:45 -07:00
pull_request_review_requested_multiple_reviewers.json webhooks/github: Add support for PR review requests. 2018-07-01 12:40:45 -07:00
pull_request_review_requested_singular_key.json webhooks/github: Handle empty 'requested_reviewers' key. 2018-10-23 14:41:24 -07:00
push_1_commit.json
push_1_commit_without_username.json
push_50_commits.json
push_delete_branch.json
push_event.json
push_local_branch_without_commits.json
push_multiple_committers.json
push_multiple_committers_with_others.json
push_tag.json
release.json
repository.json
request_review_pull_request.json
request_review_removed_pull_request.json
status.json
status_with_target_url.json webhooks/github: Test commit status payloads with target_url. 2018-10-04 12:16:06 -07:00
synchronized_pull_request.json
team_add.json
unassigned_pull_request.json
unlabeled_pull_request.json
watch_repository.json
wiki_pages.json