Turns out I do care about formatting a little. We have a lot of builders and chained methods.
I think it is easier to follow long chains when lined up veritcally.
This may be controversial but it we're doing it. Having code formatting needs to be consistent
and a non-issue during code review. I'm willing modify the configuration if people see a strong
need, but formatting needs to be present and enforced.
- When we receive events from a webhook, it is non-trivial to determine which GitHub instance the event came from
or for that matter even if the event actually came from GitHub or GitHub Enterprise.
- In order to ensure that the logic for parsing events does not get replicated in clients, we need to be
able to call GitHub.parseEventPayload(Reader,Class) without knowing which GitHub the event originates from
and without the resulting objects triggering API calls back to a GitHub
- Thus we add GitHub.offline() to provide an off-line connection
- Thus we modify some of the object classes to return best-effort objects when off-line
- Add support for more of the event types into GHEventPayload
- Add tests of the event payload and accessing critical fields when using GitHub.offline()
I was trying to add the flavor of the retrieve method that reads into an existing instance, when I realized that there are just too many orthogonal axes here to rely on overloaded methods.
That calls for a builder pattern, which we already have --- it's called Poster, but it can actually already handle GET and other HTTP requests.
So I'm retiring the retrieveXYZ methods and moving the code into Poster. This is the first step.