Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle PullRequestEvent where related PR has empty body #20

Conversation

rob-b
Copy link
Contributor

@rob-b rob-b commented Jan 29, 2019

It doesn't seem to be covered in the github docs but it is possible to
create a pull request with no body/description in which case the body is
sent as Null which fails to decode

λ> eitherDecodeStrict b :: Either String PullRequestEvent
Left "Error in $['pull_request'].body: expected Text, encountered Null"

Issue reference:

Submission Checklist:

  • [x ] Have you followed the guidelines in our Contributing document (for example, is your tree a clean merge)?
  • [ x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • [x ] Does your submission build?
  • [x ] Does your submission pass tests?
  • Have you run lints on your code locally prior to submission?
  • Have you updated all of the cabal/nix infrastructure?
  • Is this a breaking change? Have you discussed this?

@rob-b rob-b force-pushed the support-pull-request-event-where-pull-request-body-is-null branch from 082a3c8 to aa6470e Compare January 29, 2019 12:55
It doesn't seem to be covered in the github docs but it is possible to
create a pull request with no body/description in which case the body is
sent as Null which fails to decode

```
λ> eitherDecodeStrict b :: Either String PullRequestEvent
Left "Error in $['pull_request'].body: expected Text, encountered Null"
```
@rob-b rob-b force-pushed the support-pull-request-event-where-pull-request-body-is-null branch from aa6470e to ee178ea Compare January 29, 2019 12:58
@kvanbere kvanbere merged commit ce3a0cd into cuedo:master Jan 30, 2019
@kvanbere kvanbere added the bug label Jan 30, 2019
@kvanbere kvanbere requested review from kvanbere and removed request for kvanbere January 30, 2019 11:27
@kvanbere
Copy link
Member

Looks good, thanks. This is a bugfix, so I'll release this as 0.10.1 for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants