Skip to content

jsantell/go-githubstream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-githubstream

GoDoc Build Status

Fetch commits from a GitHub repository periodically. Uses go-github under the hood.

Installation

$ go get github.com/jsantell/go-githubstream

Documentation

Document can be found on GoDoc

Example

package main

import "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

About

Fetch commits from a GitHub repository periodically

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages