Commit Graph

952 Commits

Author SHA1 Message Date
Kohsuke Kawaguchi
1c162c6390 Merge pull request #304 2016-11-16 18:19:26 -08:00
Kohsuke Kawaguchi
def3a28fb5 Restoring backward compatibility of names 2016-11-16 18:18:45 -08:00
Kohsuke Kawaguchi
d1378a0236 Merge pull request #306 from stephenc/offline-support
Add offline support to the API to make parsing events easier
2016-11-16 18:12:39 -08:00
Stephen Connolly
e544c7a65a Fix the push event payload 2016-11-14 12:52:22 +00:00
Kanstantsin Shautsou
24f48f668c Add portion of auth/application API. (#307)
* Add portion of auth/application API.

Signed-off-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>

* fixup
2016-11-11 15:56:03 +01:00
Stephen Connolly
9988a090ac Add some more tests 2016-11-11 14:27:09 +00:00
Stephen Connolly
d36e145d06 Need to be able to tell if this is a creation / deletion of a ref for multibranch projects 2016-11-11 14:18:47 +00:00
Stephen Connolly
498d63ea00 Typos spotted by Jesse 2016-11-08 15:48:39 +00:00
Stephen Connolly
7dc620a3ba More details emerge on the PingEvent payload 2016-11-08 15:29:27 +00:00
Stephen Connolly
66145e1d23 Seems there is an undocumented but important PING event used by github-plugin 2016-11-08 15:26:33 +00:00
Stephen Connolly
7bf8621afe Need the pusher details for github-plugin 2016-11-08 15:14:42 +00:00
Stephen Connolly
ce3f74232e Ensure a use case required by github-plugin is valid 2016-11-08 15:11:35 +00:00
Stephen Connolly
5b92d4b88c Fix findbugs false alarms 2016-11-08 15:04:02 +00:00
Stephen Connolly
4daf6ba057 Add offline support to the API to make parsing events easier
- 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()
2016-11-08 12:56:52 +00:00
Jason Song
955e9899af Fix fields of GHRepository 2016-11-04 00:09:59 +08:00
Kohsuke Kawaguchi
fa3d0887ef [maven-release-plugin] prepare for next development iteration 2016-10-24 19:23:18 -07:00
Kohsuke Kawaguchi
5d5c6cf71c [maven-release-plugin] prepare release github-api-1.79 github-api-1.79 2016-10-24 19:23:14 -07:00
Kohsuke Kawaguchi
89aac45f41 Merge pull request #299 2016-10-24 19:15:46 -07:00
Kohsuke Kawaguchi
4965fd5f4c Noting possible TODO for the future 2016-10-24 19:15:38 -07:00
Kohsuke Kawaguchi
87fbb8ec98 Copy/paste error 2016-10-24 19:07:32 -07:00
Kohsuke Kawaguchi
0d92d4ba61 [maven-release-plugin] prepare for next development iteration 2016-10-24 14:10:35 -07:00
Kohsuke Kawaguchi
b0df93bbcb [maven-release-plugin] prepare release github-api-1.78 github-api-1.78 2016-10-24 14:10:30 -07:00
Kohsuke Kawaguchi
290d0b226a Merge pull request #295 from jglick/pageSize
Use maximum permitted page size
2016-10-24 14:04:05 -07:00
Kohsuke Kawaguchi
8b3469610c Merge pull request #300 from stephenc/commit-dates
Expose the commit dates
2016-10-24 14:03:14 -07:00
Stephen Connolly
50b47fb73b Expose the commit dates 2016-10-24 21:12:56 +01:00
Ben Sheats
5334cb8688 url encode hashes in ref names 2016-10-21 11:40:01 -04:00
Jesse Glick
38983df42d If we are a returning a collection of all things, we might as well use the maximum page size to minimize HTTP requests. 2016-09-19 09:48:23 -07:00
Kohsuke Kawaguchi
df963cb71c [maven-release-plugin] prepare for next development iteration 2016-08-05 21:32:15 -07:00
Kohsuke Kawaguchi
e9368fb04e [maven-release-plugin] prepare release github-api-1.77 github-api-1.77 2016-08-05 21:32:10 -07:00
Kohsuke Kawaguchi
e2a1630cf4 findbug taming 2016-08-05 21:28:54 -07:00
Kohsuke Kawaguchi
4f15b7c9fa NPE fix. type can be null 2016-08-05 21:19:32 -07:00
Kohsuke Kawaguchi
63f500ad7f Fixed issue #286
List commit API (https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository) already populates short info, and so populate() call could be excessive.

 It's possible that the short info is always available and therefore there's never a need to call populate(), but that assumption is hard to test, so I'm leaving that in
2016-08-05 21:11:00 -07:00
Kohsuke Kawaguchi
a9fb4546e1 Constants for preview media types 2016-08-05 20:56:11 -07:00
Kohsuke Kawaguchi
cabbbf7f02 Handle 404 that represents "no license" 2016-08-05 20:50:39 -07:00
Kohsuke Kawaguchi
59324b0082 Add preview media type header explicitly 2016-08-05 20:47:08 -07:00
Kohsuke Kawaguchi
6a356c82a5 Fixed up tests 2016-08-05 20:44:45 -07:00
Kohsuke Kawaguchi
70f0f5714a While a use of custom HttpConnector is clever, it doesn't fit the current idiom of this library. 2016-08-05 20:44:10 -07:00
Kohsuke Kawaguchi
07b527a0f2 Enumeration in GitHub should be PagedIterable 2016-08-05 20:40:34 -07:00
Kohsuke Kawaguchi
80aa75aab1 Added the wrap() method for a backpointer 2016-08-05 20:40:23 -07:00
Kohsuke Kawaguchi
0cf4211aa5 Merged GHLicense & GHLicenseBase
Elsewhere in this library, whenever there are multiple forms of the same
object, we map that to the same class and use lazy data retrieval to
fill missing fields.
2016-08-05 20:36:46 -07:00
Kohsuke Kawaguchi
1de02a5099 Added a marker for preview APIs 2016-08-05 20:19:36 -07:00
Duncan Dickinson
bb1cecb95b PR-284: license API support
Had to do git-diff | git-apply to avoid whitespe changes to GHRepository
2016-08-05 20:11:33 -07:00
Kohsuke Kawaguchi
d82397a173 doc fix 2016-08-05 20:00:05 -07:00
Kohsuke Kawaguchi
856cf5e568 Better type safety by splitting RateLimitHandler and AbuseLimitHandler
While the signature is the same, headers that they expect are different,
so any non-trivial logic cannot be reused.
2016-08-05 19:58:04 -07:00
Matt Mitchell
9f5a6ee549 Implement an abuse handler
If too many requests are made within X amount of time (not the traditional hourly rate limit), github may begin returning 403.  Then we should wait for a bit to attempt to access the API again.  In this case, we parse out the Retry-After field returned and sleep until that (it's usually 60 seconds)
2016-07-22 13:16:12 -07:00
Kohsuke Kawaguchi
a2f0837d14 Issue #279: added another overload that takes permission 2016-06-03 20:56:17 -07:00
Kohsuke Kawaguchi
c7f6889534 Issue #258: updated OkHttp that handles Cache control headers better 2016-06-03 20:31:12 -07:00
Kohsuke Kawaguchi
0415326d09 Issue #261: handle 204 no content correctly 2016-06-03 20:27:29 -07:00
Kohsuke Kawaguchi
16a0f8ece0 [maven-release-plugin] prepare for next development iteration 2016-06-03 00:19:15 -07:00
Kohsuke Kawaguchi
5d1ef296b3 [maven-release-plugin] prepare release github-api-1.76 github-api-1.76 2016-06-03 00:19:09 -07:00