Age | Commit message (Collapse) | Author |
|
Eliminate `.unwrap()` by returning a `Result`. The
`JsonValue::take_string`s return `Options`, so if they're `None`, just
fill the struct with the default for `String`, which is `""` empty
string.
|
|
I had originally written this method to parse the payload from the
`PushEvent` GitHub webhook, but I now decided that I'd rather listen to
the `PullRequestEvent` webhook. It'll mean less traffic and eliminates
the work of updating GitHub commit statuses when they're not really
going to be seen.
|
|
This field stores the "owner" of the commit on GitHub, in other words, a
user or organisation. Storing that information in this struct makes it
easier to pass around.
|
|
I had forgotten I needed to make the struct and its fields public. We
need this to be able to use it outside of the module.
|
|
The test now passes, and we create our `CommitRef` struct using actual
values from the parsed JSON.
In order to get the branch name, we need the part after the last "/" in
the "ref" key.
There are a ton of `unwrap`s here, but at least it's a start and it's
working now.
|
|
Non-working app code, but the test tries to check that we get a
structure with the right data given a JSON payload coming from the
GitHub PushEvent webhook (copied from
https://developer.github.com/v3/activity/events/types/#pushevent).
|
|
Empty stub modules that will be filled in with the communication code.
|