Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/f2prateek/github-webhook-server
https://github.com/f2prateek/github-webhook-server
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/f2prateek/github-webhook-server
- Owner: f2prateek
- Created: 2015-09-21T00:39:01.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-22T20:29:54.000Z (about 9 years ago)
- Last Synced: 2023-03-24T08:21:47.584Z (over 1 year ago)
- Language: Go
- Size: 119 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Github Webhook Server
package `gws` provides a `http.Server` implementation that handles webhook events from GitHub.
# Usage
```go
s := gws.New("")go func() {
for {
select {
case event := <-s.PushEvents:
fmt.Println("Received Push", event)
case event := <-s.IssueEvents:
fmt.Println("Received Issue", event)
case event := <-s.IssueCommentEvents:
fmt.Println("Received Issue Comment", event)
case event := <-s.PullRequestEvents:
fmt.Println("Received PR", event)
case event := <-s.OtherEvents:
fmt.Println("Received event", event)
}
}
}()log.Fatal(http.ListenAndServe(":8080", s))
```