aboutsummaryrefslogtreecommitdiffstats
path: root/src/github.rs
AgeCommit message (Collapse)Author
2017-11-08github.rs: Fix compilation errors from e0dca75f9b2de9023ecb978a0f9c8a11bTeddy Wing
* Import 'reqwest' * Import `HashMap` * Insert `state` as string instead of `CommitStatus` (implement `fmt::Display` in order to do this) * Insert `description` as string instead of `Option` * Make test string arguments owned strings
2017-11-08Add rough code for `update_commit_status`Teddy Wing
This new function will make a request to the GitHub REST API to update the status of a commit using the given arguments. * Create a new `github` module for this to live in. * Uses `mockito` to check that the request was made. * The `API_URL` is necessary in order to set up 'mockito' to work properly. That pattern is lifted from an example in the crate's docs: http://lipanski.github.io/mockito/generated/mockito/index.html#example * Sort of make a POST request to the GitHub API to update the status. This doesn't actually work, though, of course, as it's incomplete. For one thing, we haven't even included the 'reqwest' library, and for another we need a way to get the GitHub owner name to build the API URL.