Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsantell/go-githubstream
Fetch commits from a GitHub repository periodically
https://github.com/jsantell/go-githubstream
Last synced: 3 months ago
JSON representation
Fetch commits from a GitHub repository periodically
- Host: GitHub
- URL: https://github.com/jsantell/go-githubstream
- Owner: jsantell
- License: mit
- Created: 2014-07-12T22:57:00.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-17T18:33:31.000Z (over 10 years ago)
- Last Synced: 2024-06-19T13:37:12.146Z (7 months ago)
- Language: Go
- Size: 164 KB
- Stars: 17
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
go-githubstream
================[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](http://godoc.org/github.com/jsantell/go-githubstream) [![Build Status](http://img.shields.io/travis/jsantell/go-githubstream.svg?style=flat)](https://travis-ci.org/jsantell/go-githubstream)
Fetch commits from a GitHub repository periodically. Uses [go-github](https://github.com/google/go-github) under the hood.
## Installation
```
$ go get github.com/jsantell/go-githubstream
```## Documentation
Document can be found on [GoDoc](http://godoc.org/github.com/jsantell/go-githubstream)
## Example
```go
package mainimport "fmt"
import "time"
import "github.com/jsantell/go-githubstream"var TOKEN string = os.Getenv("GITHUB_ACCESS_TOKEN")
func main() {
ghs := githubstream.NewGithubStream(time.Hour, time.Hour * 10, "jsantell", "go-githubstream", "master", TOKEN)// This fetches the github repo `jsantell/go-githubstream` once an hour,
// fetching commits from that point to 10 hours prior,
// and prints the commits
for commits := range ghs.Start() {
fmt.Println(commits)
}
}
```## License
MIT, Copyright (c) 2014 Jordan Santell