access token is now optional
* fix some err checks * github api url can be configured (e.g. point it at an enterprise instance) [finishes #89638752 #89633744] Signed-off-by: Chris Brown <cbrown@pivotal.io>
This commit is contained in:
@@ -11,7 +11,11 @@ func main() {
|
||||
var request resource.CheckRequest
|
||||
inputRequest(&request)
|
||||
|
||||
github := resource.NewGitHubClient(request.Source)
|
||||
github, err := resource.NewGitHubClient(request.Source)
|
||||
if err != nil {
|
||||
resource.Fatal("constructing github client", err)
|
||||
}
|
||||
|
||||
command := resource.NewCheckCommand(github)
|
||||
response, err := command.Run(request)
|
||||
if err != nil {
|
||||
|
@@ -18,7 +18,11 @@ func main() {
|
||||
|
||||
destDir := os.Args[1]
|
||||
|
||||
github := resource.NewGitHubClient(request.Source)
|
||||
github, err := resource.NewGitHubClient(request.Source)
|
||||
if err != nil {
|
||||
resource.Fatal("constructing github client", err)
|
||||
}
|
||||
|
||||
command := resource.NewInCommand(github, os.Stderr)
|
||||
response, err := command.Run(destDir, request)
|
||||
if err != nil {
|
||||
|
@@ -18,7 +18,11 @@ func main() {
|
||||
|
||||
sourceDir := os.Args[1]
|
||||
|
||||
github := resource.NewGitHubClient(request.Source)
|
||||
github, err := resource.NewGitHubClient(request.Source)
|
||||
if err != nil {
|
||||
resource.Fatal("constructing github client", err)
|
||||
}
|
||||
|
||||
command := resource.NewOutCommand(github, os.Stderr)
|
||||
response, err := command.Run(sourceDir, request)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user