* Add initial support for Check Suites
* Add API call detail in CheckSuite.rerequest
* Update Accept header with general instead of preview
* Add 'get check runs' endpoint for CheckSuite with stubs
* Add create check suite endpoint with stub
* Update CheckSuite tests with creat check suite endpoint
* Add update check suites preferences endpoint
* Add repository preferences object and stub file
* Add update check suite preferences tests
Needed for #1621
Co-authored-by: Raju Subramanian <coder@mahesh.net>
* Add missing preview features of Deployment and Deployment Statuses API
- Enable support for deployment status states in_progress and queued
- Add arguments production_environment and transient_environment to Repository.create_deployment()
- Add attributes production_environment and transient_environment to Deployment
- Use correct type in assertion for Deployment.payload
- Fix incorrect assertion for description in Deployment.create_status()
- Add arguments environment, environment_url, auto_inactive to Deployment.create_status()
- Add attribute environment_url to DeploymentStatus
* Add CheckRun object and stub file
* Add list of check runs endpoint for Commit
* Add get check run endpoint for Repository
* Add CheckRun test file and replay data files
* Add CheckRunAnnotation object and stub file
* Add create CheckRun API endpoint to Repository
* Update and add new tests for CheckRun endpoint:
There are two get_installation() methods in MainClass, with different
arguments. get_installation(owner, repo) is documented and tested, and
get_installation(id) is neither. Remove it to avoid confusion.
Black is very opinionated, but sometimes those opinions change. Run the
new black version across the codebase, and lock down the version used by
pre-commit so we don't get surprised like this again.
When calculating totalCount for PaginatedList, if the links data does
not contain a last page, we can't know how many elements are contained
in the list. Set it to 0 in that case.
Fixes#1614
It turns out if an argument is optional for an overloaded method, the
type hints require the default argument specified to successfully match
against the correct signature. Furthermore, the second kind of
create_pull() does not support the draft argument at all, so remove it.
Fixes#1634
There is a bunch of repeated code checking reactions which has the issue
that it can easily get out of date with what GitHub accepts. Drop the
check, and rely on GitHub returning an error.
Fixes#1554
To build on the previous work supporting querying Workflows for GitHub
Actions, add a class and relevant methods to support querying runs of a
workflow.
The typing information for Repository.create_pull did no type checking
of the arguments at all. Using the overload functionality, specify both
styles of create_pull(). Drive-by a nearby function from using a generic
dict to Dict[str, str].
Use typing.overload for MainClass.get_user() since it can return two
disparate types. Correct the docstring for it, as well as locking down
Sphinx to <3 due to built docs issue and drive-by link correction.
Fixes#1550
The typing information for the update_file() method's content parameter
states it will only accept str, whereas it will accept both str and
bytes.
Fixes#1542
When Workflow support was added, the method calls were not added to
the typing file for Repository, and somehow the class name for the
Workflow typing file was incorrect.