Documentation ¶
Index ¶
- Variables
- func GetCommits(context context.Context, client *pending_review.Client, file string, count int) ([]*github.RepositoryCommit, error)
- func GetDataFile(context context.Context, client *pending_review.Client, file string) (*github.RepositoryContent, error)
- func GetFileAtRef(context context.Context, client *pending_review.Client, file string, ...) (*github.RepositoryContent, error)
- func GetJSONFile(context context.Context, client *pending_review.Client, file string, ...) error
- func MakeClient(context context.Context, token string, target pending_review.WorkingRepository) (*pending_review.Client, error)
- func UpdateDataFile(context context.Context, client *pending_review.Client, file string, ...) (bool, error)
- func UpdateFileAtRef(context context.Context, client *pending_review.Client, file string, ...) (bool, error)
- func UpdateJSONFile(context context.Context, client *pending_review.Client, file string, ...) (bool, error)
Constants ¶
This section is empty.
Variables ¶
var ErrRateLimitReached = errors.New("current login has exceed it's limit for requests that can be made")
ErrRateLimitReached by the client's login
Functions ¶
func GetCommits ¶
func GetCommits(context context.Context, client *pending_review.Client, file string, count int) ([]*github.RepositoryCommit, error)
GetCommits returns a list of of number from the raw-data branch
func GetDataFile ¶
func GetDataFile(context context.Context, client *pending_review.Client, file string) (*github.RepositoryContent, error)
GetDataFile returns the content of file from the root directory of the raw-data branch
func GetFileAtRef ¶
func GetFileAtRef(context context.Context, client *pending_review.Client, file string, sha string) (*github.RepositoryContent, error)
GetFileAtRef returns the content of file from the root directory from a commit sha
func GetJSONFile ¶
func GetJSONFile(context context.Context, client *pending_review.Client, file string, content interface{}) error
GetJSONFile returns the JSON structure of file from the root directory of the raw-data branch
func MakeClient ¶
func MakeClient(context context.Context, token string, target pending_review.WorkingRepository) (*pending_review.Client, error)
func UpdateDataFile ¶
func UpdateDataFile(context context.Context, client *pending_review.Client, file string, content []byte) (bool, error)
UpdateDataFile commits the new content to `raw-data` if it's different. It returns if the modification took place and any error encountered.
func UpdateFileAtRef ¶
func UpdateFileAtRef(context context.Context, client *pending_review.Client, file string, branch string, content []byte) (bool, error)
UpdateDataFileAtRef commits the new content if it's different. It returns if the modification took place and any error encountered.
func UpdateJSONFile ¶
func UpdateJSONFile(context context.Context, client *pending_review.Client, file string, content interface{}) (bool, error)
UpdateJSONFile commits the new content if it's different. It returns if the modification took place and any error encountered.
Types ¶
This section is empty.