Skip to content

Commit

Permalink
Print commit hash on success
Browse files Browse the repository at this point in the history
  • Loading branch information
maetthu committed Feb 20, 2021
1 parent 01ba22c commit 6353eb4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,14 @@ var uploadCmd = &cobra.Command{
opts.Content = content

// upload file
_, _, err = c.Repositories.CreateFile(ctx, repo.Owner, repo.Repository, repo.Path, opts)
cr, _, err := c.Repositories.CreateFile(ctx, repo.Owner, repo.Repository, repo.Path, opts)

return err
if err != nil {
return err
}

fmt.Println(*cr.SHA)

return nil
},
}

0 comments on commit 6353eb4

Please sign in to comment.