This change adds or update a swath of tests to push method code coverage numbers up.
Yes, method coverage is not super meaningful, but it is one metric that we can use to
ensure at least minimal coverage of this library.
Almost no product changes in here.
While still no recommended, these methods are more recommended than
users creating their own. These will continue to work even when
internals change, whereas user configured readers or writers may not.
Here we have another example of trying to do something clever when simplicity is the better choice.
Rather than trying to guess the rate limit record for a request based on the url path,
I added an enumeration which can be set on the request to say which rate limit record to applies.
This is simpler, safer, and faster than trying to guess the rate limit from the url path.
Jenkins Blue Ocean made interesting design choices relating github-api interactions.
They mostly reused the existing API and OM, but in a few places they chose to
implement their own object mapping independent of this project. This is fine
as long as nothing in this project ever changes, including internals such
as ObjectMapper configuration or behavior.
Recent release have made changes to those internals which break assumptions made
in Blue Ocean.
This change exposes this project's MappingReader and MappingWriter to allow
for a fix to Blue Ocean requiring only minimal changes.
This doesn't prevent future changes from breaking Blue Ocean but at least makes
them much less likely.
Fixes#780
Added back the extends Assert to the wiremock test base class so that I am not making a massive change and potentially breaking inflight work people are doing
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.
Created GHRateLimit.Record
Add the four rate limit records to GHRateLimit
Moved getLimt(), getRemaining(), and so on to point to core record for ease of use.
Fixed update check for header to not replace existing with older when remaining count is lower.
NOTE: Did not expose records other than core and did not resolve header update behavior to respect non-core records.