Changelog
Unreleased
Add
gidgethub.HTTPException.headersattribute (PR #227)Add a trailing
/to url and remove any leading/in base_url forgidgethub.sansio.format_url()(PR #234)
5.4.0
Make
gidgethub.abc.GitHubAPI.getiter()be iterative instead of recursive (PR #219)gidgethub.apps.get_jwt()now accepts anexpirationparameter to configure JWT token expiration time (PR #215)Add support for Python 3.12-3.13 and drop EOL Python 3.7 (PR #209)
5.3.0
5.2.1
5.2.0
Make the minimum version of PyJWT be v2.4.0.
5.1.0
Use
X-Hub-Signature-256header for webhook validation when available. (PR #160).The documentation is now built using Sphinx v>= 4.0.0. (Issue #143)
gidgethub.abc.GitHubAPI.getiter()now acceptsiterable_keyparameter in order to support the Checks API. (Issue #164)Accept HTTP 202 ACCEPTED as successful. (PR #174)
5.0.1
Drop the
machine-man-previewheader fromgidgethub.apps.get_installation_access_token()because it is out of preview. Themachine-man-previewis no longer required as of August 20, 2020.
5.0.0
Add
gidgethub.routing.Router.fetch()for obtaining a frozenset of functions registered to the router that the event would be called on. (Issue #74).Add support for GitHub Actions Environment Files with
gidgethub.actions.setenv()andgidgethub.actions.addpath(). (Issue #137).Make router callback execution order non-deterministic to avoid relying on registration order. (Issue #74).
Fix mypy errors in
gidgethub.httpx.GitHubAPI._request(Issue #133).Make the minimum version of PyJWT be v2.0.0.
4.2.0
gidgethub.abc.GitHubAPI.post()now acceptscontent_typeparameter. If supplied, thecontent_typevalue will be used in the request headers, and the raw form of the data will be passed to the request. If not supplied, by default the data will be parsed as JSON, and the “application/json” content type will be used. (Issue #115).
4.1.1
Fix
gidgethub.abc.GitHubAPI.graphql()to accept response content types lacking spaces; affects GitHub Enterprise (Issue #122)Specify PyJWT[crypto] as a dependency, and dropped the explicit dependency to
cryptography(Issue #116).
4.1.0
Introduce
gidgethub.apps.Introduce
gidgethub.apps.get_installation_access_token()for obtaining an installation access token that can be used to authenticate as a GitHub App installation. (Issue #71).Introduce
gidgethub.apps.get_jwt()for constructing the JSON Web Token that can be used to access endpoints that require it.
4.0.0
Add
gidgethub.abc.GitHubAPI.graphql()and related exceptions.Add
gidgethub.BadRequestUnknownErrorwhen something other than JSON is returned for a 422 response.Remove gidgethub.treq; tests were not passing and a request for help on Twitter came back with no response (happy to add back if someone steps forward to help out).
Remove gidgethub.test from the distribution.
Introduce
gidgethub.actions.Add
gidgethub.ValidationErrorfor when the HTTP response is a 422 but not field-related. (#83; thanks John Hossler)Allow GitHub Enterprise users to specify a base URL, by passing in base_url to the
gidgethub.abc.GitHubAPI()constructor.
3.3.0
Adapt to the new
httpxAPI to support versions >= 0.11.0 (thanks Dave Hirschfeld)
3.2.0
Fix mypy warnings about the
typing.Dictandtyping.Mappinggeneric types lacking type parameters.Add
gidgethub.httpxbackend.Add a
py.typedfile to mark the project as fully typed.
3.1.0
gidgethub.abc.GitHubAPI.getiter()now works with GitHub’s search API (thanks Pablo Galindo).
3.0.0
gidgethub.sansio.RateLimit.from_http()returnsNoneif ratelimit is not found in the headers.Allow authenticating as a GitHub App by using JSON web token.
gidgethub.sansio.create_headers()now acceptsjwtargument.gidgethub.abc.GitHubAPI._make_request,gidgethub.abc.GitHubAPI.getitem(),gidgethub.abc.GitHubAPI.getiter(),gidgethub.abc.GitHubAPI.post(),gidgethub.abc.GitHubAPI.patch(),gidgethub.abc.GitHubAPI.put(), andgidgethub.abc.GitHubAPI.delete()now acceptjwtandoauth_tokenarguments.gidgethub is now packaged using flit.
2.5.0
Tighten type hints for parameters that have a default of
Nonebut were not typed astyping.Optional.Tweak code to not change semantics but reach 100% coverage.
Provide a human-readable string representation of
gidgethub.sansio.RateLimit.Use the
messagedata as the error message if theerrorsobject was not returned.Add the data keyword argument to
gidgethub.abc.GitHubAPI.delete().
2.4.1
Tighten up protections against caching ineligible responses.
2.4.0
2.3.0
Add support for
application/x-www-form-urlencodedwebhook event payloads. (This also allows for API calls to return this content type, although GitHub currently does not do that.)Introduce
gidgethub.routingto help route webhook events to registered asynchronous callbacks.Add type hints.
Add a cache argument to
gidgethub.abc.GitHubAPI.
2.2.0
Introduce
gidgethub.tornadoto support Tornado (thanks to Matthias Bussonnier and A. Jesse Jiryu Davis for the PR reviews).
2.1.0
The default value for the data argument of
gidgethub.abc.GitHubAPI.put()was changed from""tob"".All type hints were removed (due to mypy not supporting yield in an async function, they were not being tested as being valid).
2.0.0
Renamed
gidgethub.abc.GitHubAPI._sleep()tosleep()to make the method public.Renamed the “test” extra to “tests” and added the “dev” extra.
Introduced the
gidgethub.RateLimitExceededexception.Methods on
gidgethub.abc.GitHubAPIno longer automatically sleep when it’s possible that the call will exceed the user’s rate limit (it’s now up to the user to prevent from going over the rate limit).Made the
[treq]install extra depend onTwisted[tls].
1.2.0
gidgethub.sansio.Event.from_http()raises agidgethub.BadRequestof415instead of400when a content-type other thanapplication/jsonis provided.More robustly decode the body in
gidgethub.sansio.Event.from_http()(i.e. if thecontent-typedoesn’t specifycharset, assumeUTF-8).Changed the signature of
gidgethub.sansio.Eventto accepttyping.Anyfor the data argument.Fixed signature verification.
1.1.0
Introduced
gidgethub.treq(thanks to Cory Benfield).
1.0.0
Initial release.