Skip to content

[#51]: whPullReqTargetRepo can be null #52

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

Merged
merged 4 commits into from
Dec 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Domen Kozar <domen@dev.si>
Alistair Burrowes
Matthew Bauer
Julien Debon
Robert Hensing
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# 0.16.0

* The invitation and membership fields were made optional for `OrganizationEvent` (resolves #37)
* The maintaining sponsor [onrock.online](https://onrock.online) has rebranded to [Cuedo Business Solutions](https://cuedo.com.au)
* The target repository field was made optional for `PullRequestTarget` (by Robert Hensing, resolves #51)
* Support for marketplace purchase event (by Alistair Burrowes, resolves #46)
* The maintaining sponsor [onrock.online](https://onrock.online) has rebranded to [Cuedo Business Solutions](https://cuedo.com.au)

# 0.15.0

Expand Down
405 changes: 405 additions & 0 deletions fixtures/pull-request-delete-null-head-repo-anomaly.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions github-webhooks.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.34.4.
--
-- see: https://github.com/sol/hpack
--
-- hash: aa1082b50f20ff4d2ed5d10d0f215c3fa9be961cd238536a50df29ee96172bb1

name: github-webhooks
version: 0.15.0
Expand All @@ -20,7 +18,8 @@ author: Kyle Van Berendonck <kyle.vanberendonck@cuedo.com.au>,
Domen Kozar <domen@dev.si>,
Alistair Burrowes,
Matthew Bauer,
Julien Debon
Julien Debon,
Robert Hensing
maintainer: Kyle Van Berendonck <foss@cuedo.com.au>
copyright: (c) 2017-2020 Cuedo Business Solutions
license: MIT
Expand Down Expand Up @@ -65,6 +64,7 @@ extra-source-files:
fixtures/project-column-event.json
fixtures/project-event.json
fixtures/public-event.json
fixtures/pull-request-delete-null-head-repo-anomaly.json
fixtures/pull-request-event-null-body.json
fixtures/pull-request-event.json
fixtures/pull-request-review-comment-event.json
Expand All @@ -87,6 +87,12 @@ flag ci
default: False

library
exposed-modules:
GitHub.Data.Webhooks.Events
GitHub.Data.Webhooks.Payload
GitHub.Data.Webhooks.Secure
other-modules:
Paths_github_webhooks
hs-source-dirs:
src
default-extensions:
Expand All @@ -107,17 +113,14 @@ library
, vector
if flag(ci)
ghc-options: -Wall -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi
exposed-modules:
GitHub.Data.Webhooks.Events
GitHub.Data.Webhooks.Payload
GitHub.Data.Webhooks.Secure
other-modules:
Paths_github_webhooks
default-language: Haskell2010

test-suite spec
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
DecodeEventsSpec
Paths_github_webhooks
hs-source-dirs:
spec
default-extensions:
Expand All @@ -135,7 +138,4 @@ test-suite spec
, vector
if flag(ci)
ghc-options: -Wall -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi
other-modules:
DecodeEventsSpec
Paths_github_webhooks
default-language: Haskell2010
1 change: 1 addition & 0 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ author:
- Alistair Burrowes
- Matthew Bauer
- Julien Debon
- Robert Hensing
maintainer: Kyle Van Berendonck <foss@cuedo.com.au>
github: onrock-eng/github-webhooks
description:
Expand Down
339 changes: 331 additions & 8 deletions spec/DecodeEventsSpec.hs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/GitHub/Data/Webhooks/Payload.hs
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ instance NFData HookPullRequest where rnf = genericRnf
data PullRequestTarget = PullRequestTarget
{ whPullReqTargetSha :: !Text
, whPullReqTargetUser :: !HookUser
, whPullReqTargetRepo :: !HookRepository
, whPullReqTargetRepo :: !(Maybe HookRepository) -- maybe null, see #47
, whPullReqTargetLabel :: !Text -- ex "user:branch"
, whPullReqTargetRef :: !Text -- ex "somebranch"
}
Expand Down