github.com/abayer/test-infra@v0.0.5/prow/cmd/phony/README.md (about) 1 # Phony 2 3 `phony` sends fake GitHub webhooks. 4 5 ## Running a GitHub event manager 6 `phony` is most commonly used for testing [hook](../hook), but can be used for testing any 7 externally exposed service configured to receive GitHub events. 8 9 To get an idea of `phony`'s behavior, start a local instance of `hook` with 10 this: 11 ``` 12 go run prow/cmd/hook/main.go 13 --deck-url=<production deck URL> 14 --config-path=prow/config.yaml 15 --plugin-config=prow/plugins.yaml 16 --hmac-secret-file=path/to/hmac 17 --github-token-file=path/to/github-token 18 ``` 19 20 ## Usage 21 Once you have a running server that manages github webhook events, generate an 22 `hmac` token (same process as in [prow](../..)), and point a `phony` pull 23 request event at it with the following: 24 ``` 25 bazel run //prow/cmd/phony -- 26 --address=http://localhost:8888/hook 27 --hmac=<hmac token> 28 --event=pull_request 29 --payload="{}" 30 ``` 31 32 If you are testing `hook` and successfully sent the webhook from `phony`, you should see a log from `hook` resembling the following: 33 ``` 34 {"author":"","component":"hook","event-GUID":"GUID","event-type":"pull_request","level":"info","msg":"Pull request .","org":"","pr":0,"repo":"","time":"2018-05-29T11:38:57-07:00","url":""} 35 ``` 36 37 A list of supported events can be found in the [Github API Docs](https://developer.github.com/v3/activity/events/types/).