Commit Graph
1938 Commits
Author SHA1 Message Date
Steve Kowalik e0acd8f466 Test repr() for PublicKey (#1879)
The new PublicKey tests did not test the repr() method, increase
coverage by doing so.
2021-03-22 13:07:22 +11:00
Steve Kowalik 696793dea7 Add support for deleting repository secrets (#1868)
When a previous commit added support for creating secrets on repository
objects, support was not added to also remove them. Since the GitHub API
does support that, add a method to do so.
2021-03-17 16:02:57 +11:00
Steve Kowalik aa24030471 Switch repository secrets to using f-strings (#1867)
New code written before we switched to f-strings need to get updated to
using them, so do so.
2021-03-08 15:11:38 +11:00
karsten-wagnerandSteve Kowalik b2232c89fb Manually fixing paths for codecov.io to cover all project files (#1813)
* Manually fixing paths for codecov.io to cover all project files

* Update codecov.yml

Fixes #1812

Co-authored-by: Steve Kowalik <steven@wedontsleep.org>
2021-03-08 14:14:03 +11:00
Sorin Sbarnea 64f532aecc Add missing links to project metadata (#1789)
Fixes: #1788
2021-03-08 14:12:51 +11:00
Steve Kowalik 55d98373d8 No longer show username and password examples (#1866)
With GitHub moving away from allowing authentication to the API using an
username and password, update our documentation to remove it and rely on
tokens. Perhaps we should link to how to create an API token, but that
can be addressed later.

Fixes #1851
2021-03-08 13:13:22 +11:00
Chris KeatingandLiuyang Wan c90c050ef1 Adding github actions secrets (#1681)
* Fixed pre-commit issues

* Fixed mypy linting error

* Fix flake8 error

* Update PublicKey.py

* Update PublicKey.py

* Update setup.py

* Update setup.py

* Update requirements.txt

Co-authored-by: Liuyang Wan <tsfdye@gmail.com>

Co-authored-by: Liuyang Wan <tsfdye@gmail.com>
2021-03-07 05:40:52 +08:00
Yuya Nakamura 7db1b0c924 fix get_user_issues (#1842)
AuthenticatedUser.get_user_issues() calls the wrong API endpoint.

Fixes #1841
2021-03-05 15:27:34 +11:00
Steve Kowalik 290b62726f Switch all string addition to using f-strings (#1774)
Now that we no longer support Python 3.5, stop using string addition
everywhere it makes sense, and move to the best feature 3.6+ gives us,
f-strings!
2021-03-03 14:50:57 +11:00
Jimmy Zelinskie 6900f187b5 Merge pull request #1818 from apahim/define_pool_size
Make requests pool_size configurable
2021-02-06 21:48:20 -05:00
Amador Pahim a77d4f48cb Enabling connetion pool_size definition
requests has a default connections pool of 10. Creating multiple threads
will consume from that same pool, since the underlying implementation of
the requests pool is a singletown.

Let's make the pool_size configurable, so clients can set the proper
number for their use case when running multiple threads.

Signed-off-by: Amador Pahim <apahim@redhat.com>
2021-01-08 11:55:36 +00:00
Amador Pahim aaec0a0f0f Always define the session adapter
This represents no change of behaviour, but it enables us to set more
options to the adapter.

Signed-off-by: Amador Pahim <apahim@redhat.com>
2021-01-08 11:55:36 +00:00
Steve Kowalik 34d097ce47 Publish version 1.54.1 2020-12-24 15:11:01 +11:00
Edouard Benauw 31a1c00780 Pin pyjwt version (#1797)
* Pin pyjwt version

Pyjwt version is not fixed, which can cause syntax error for user since the release of breaking changes from pyjwt (https://pypi.org/project/PyJWT/#history)

* Update setup.py

Fixes #1796
2020-12-24 15:09:32 +11:00
Steve Kowalik f299699ccd Ignore pyupgrade commit for git blame (#1785)
Since the pyupgrade commit makes a large amount of changes, ignore the
commit by default with git blame.
2020-12-15 14:13:05 +11:00
Steve Kowalik e113e37de1 Add pyupgrade to pre-commit configuration (#1783)
To help us switch to f-strings and other 3.6+ changes, add pyupgrade to
our pre-commit configuration to keep the codebase clean.
2020-12-15 14:07:33 +11:00
Pascal Hofmann 2432cffd3b Merge pull request #1733 from dubois/main
Fix #1731: Incorrect annotation
2020-12-03 13:32:53 +01:00
Paul Du Bois 82c349ce3e Fix #1731: Incorrect annotation 2020-12-02 18:12:41 -08:00
Steve Kowalik 63e4fae997 Drop support for Python 3.5 (#1770)
In preperation for starting to use 3.6+ only features, stop testing
Python 3.5 in our CI, and bump our minimum required version.
2020-12-02 14:47:45 +11:00
Sébastien Besson a806b5233f Revert "Pin requests to <2.25 as well (#1757)" (#1763)
* Revert "Pin requests to <2.25 as well (#1757)"
* Ensure httpretty is more recent than 1.0.3

This reverts commit d159425f36.
2020-12-01 10:17:18 +11:00
Pascal Hofmann 9ee3afb171 Merge pull request #1767 from pascal-hofmann/fix-repository-stubs
Fix stubs file for Repository
2020-11-30 12:27:48 +01:00
Pascal Hofmann fab682a5cc Fix stubs file for Repository 2020-11-30 08:53:59 +01:00
Steve Kowalik 951fcdf23f Publish version 1.54 2020-11-30 16:43:49 +11:00
Dhruv ManilawalaandRaju Subramanian 6d501b286e Add support for Check Suites (#1764)
* 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>
2020-11-30 16:03:07 +11:00
Pascal Hofmann 197e065372 Add missing preview features of Deployment and Deployment Statuses API (#1674)
* 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
2020-11-30 15:47:54 +11:00
Steve KowalikandRaju Subramanian fcdd9eae2f Correct typing for Commit.get_comments() (#1765)
Commit.get_comments() returns a PaginatedList of CommitComment
instances, not commits.

Co-Authored-By: Raju Subramanian <coder@mahesh.net>
2020-11-26 16:32:17 +11:00
Steve Kowalik d159425f36 Pin requests to <2.25 as well (#1757)
requests 2.26 and its requirements break httpretty (see
gabrielfalcao/HTTPretty#409), so pin for the time being. Thanks to
Sébastien Besson and Dhruv Manilawala for the debugging assistance.
2020-11-19 21:48:10 +11:00
Dhruv Manilawala c77c06760e Add Support for Check Runs (#1727)
* 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:
2020-11-19 14:29:04 +11:00
Steve Kowalik 19e46bbf90 Remove older MainClass.get_installation() (#1738)
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.
2020-11-11 18:14:55 +11:00
Omar Brikaa 4cfc9912c0 Added a method for getting a user by their id (#1691)
* Added a method for getting a user by their id

* Added get_user_by_id to MainClass stubs

Fixes #1615
2020-11-10 14:52:58 +11:00
Huw Jones 546f6495b7 Fix #1742 - incorrect typehint for Installation.id (#1743)
* Fix #1742
2020-11-06 15:44:14 +11:00
Steve Kowalik e690adf3ff List new project in introduction (#1739)
Fixes #1677
2020-11-04 14:45:57 +11:00
Steve Kowalik 09f49c7849 Add py39 env to tox (#1740)
An earlier commit added Python 3.9 support to CI, but neglected to
change tox.ini to support an environment, do so here.
2020-11-04 14:45:09 +11:00
Yannick Jadoul 78a29a7ce0 Add WorkflowRun.workflow_id (#1737)
Add the missing attribute WorkflowRun.workflow_id
2020-11-04 14:12:17 +11:00
Steve Kowalik 1bb18ab52e Add support for Python 3.9 (#1735)
With Python 3.9 released, we should support it. A later commit will
remove support for Python 3.5.
2020-11-03 16:39:06 +11:00
Victor Zeng 24251f4b0f Added support for the Self-Hosted actions runners API (#1684)
* Added data model for Self-Hosted Actions Runner

* Added function for getting self-hosted runners
2020-10-28 15:53:33 +11:00
Steve Kowalik 8880084447 Fix Branch protection status in the examples (#1729)
A long time ago when branch protection was changed, the example of
checking if a branch is protected wasn't changed in the examples.

Fixes #1724
2020-10-28 15:18:27 +11:00
Steve Kowalik 23f475393d Filter the DeprecationWarning in Team tests (#1728)
With 1c55be5174 merged, Team.set_repo_permission() now raises a
DeprecationWarning, so filter it until the method is removed.
2020-10-28 15:03:46 +11:00
latacora-daniel b42fb244f2 Added get_installations() to Organizations (#1695)
* Added get_installations() to Organizations

Fixes #1694
2020-10-28 14:00:47 +11:00
Andy Grunwald 1c55be5174 Fix #1507: Add new Teams: Add or update team repository endpoint (#1509)
* Add new Team.update_team_repository()

* Mark Team.set_repo_permission() as deprecated

 Fixes #1507
2020-10-28 13:43:35 +11:00
Victor Zeng c23564ddbd Added support for Repository.get_workflow_runs parameters (#1682)
* Added support for `Repository.get_workflow_runs` parameters

* Added anchor tag to docstring link

* Tests
2020-10-28 13:37:59 +11:00
Florent Clarret ee4c7a7e9e feat(pullrequest): add the rebaseable attribute (#1690) 2020-10-26 16:44:31 +11:00
Huan-Cheng Chang f7d203c083 Add support for deleting reactions (#1708)
* Delete comment reactions

* Add test case

* update ignore-word-list

* Delete issue reactions

* Delete issue comment reactions

* Delete pull request comment reactions

* check status
2020-10-26 16:40:46 +11:00
Pascal Hofmann 3ec145f221 Merge pull request #1712 from s-t-e-v-e-n-k/inputgittreeelement-typing
Correct type hint for InputGitTreeElement.sha
2020-10-02 07:52:06 +02:00
Steve Kowalik 08b72b48af Correct type hint for InputGitTreeElement.sha
InputGitTreeElement.sha was previously updated to accept None to allow
files to be deleted, but the type hint was not updated.

Fixes #1707
2020-10-02 15:13:13 +10:00
Steve Kowalik 7ec4f155af Ignore new black formatting commit for git blame (#1680)
To make git blame tagging easier to follow, ignore the commit that made
sweeping changes with the new black version.
2020-09-02 15:53:27 +10:00
Steve Kowalik 07e29fe014 Format with new black (#1679)
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.
2020-09-02 14:59:09 +10:00
Neil Williams 6bc9ecc8c8 Add get_timeline() to Issue's type stubs (#1663)
Add get_timeline() to Issue's type stubs
2020-08-28 14:20:12 +10:00
Steve Kowalik 743f5a58b0 Publish version 1.53 2020-08-18 18:15:44 +10:00
Steve Kowalik 2646a98c31 Test Organization.get_hook() (#1660)
Add a testcase for Organization.get_hook()
2020-08-18 18:14:20 +10:00