The API docs for Repository.get_git_tree specify that the URL parameter
for fetching a tree recursively should be ?recursive=1, not a truthy
value. To not change the API we present, check if it is True before
setting it to 1. Change another callsite of Repository.get_git_tree to
specify recursive=False to make sure it doesn't appear in the query
string.
Fixes#560
Add create_review_request() and delete_review_request() methods to
PullRequest, as well as renaming get_reviewer_requests() to
get_review_requests() and cleaning up its return value to firstly respect
teams, and secondly to cut out the middleman of PullRequestReviewerRequests,
which has been removed.
Fixes#597
Clean up some of the issue methods in PullRequest to make use of the
issue_url property, rather than chopping pieces off the URL to replace
/pulls/ with /issues/.
* works (but tests fail)
* Refactor to use python requests rather than httplib
* add requests dependency in setup.py
* touch so travis-ci will run
* clean up some unused comments
* Handle HTTP vs HTTPS; handle custom base_url
* Use requests session
* Don't use a persistent session in tests (which don't use the real requests library)
* Use an older version of requests for python 3.2
Requests dropped support for Python 3.2 in the 2.10 series (though it
didn't detect this until 2.11).
PyGithub probably doesn't need to support Python 3.2 at all; it's quite
old, with negligably few users, but that should be addressed elsewhere.
* Revert "Use an older version of requests for python 3.2"
This reverts commit fb0367614f5413968eeab98f4094e710aa1bc2d1.
* Improve readability
* Update requirements.txt
* Disable custom proxy handling code (unneeded and broken); use requests'
* Remove comment and superflous code
* Fix iteritems() removal from Python3
* pin requests to 2.14.0 or greater in prep for no_proxy
* pin requests to 2.14.0 or greater in prep for no_proxy
The Github API docs for PullRequests say to make use of the Issues API
to add, remove, set and query labels. This means that we need to make
use of the issue_url property for the PullRequest, not its own URL.
PullRequests can also have labels attached to them, like Issues or
Milestones. Extend PullRequest to also export them if they are present,
as well as adding methods to add, remove and set labels.
* Add methods add_to_members(), has_in_pending_members(), and remove_from_membership() methods to Organization class.
* Add scrubbed replay files used for testing
* More massaging of test data
* Fix URL to remove organization membership
* Remove `has_in_pending_members()` method
* Add team privacy and add additional parameter to test. Still requires replaydata
* Reorder parameters to not break existing code
* Update tests for #702
The description attribute handling requirement is
a custom media type in the Accept header:
application/vnd.github.symmetra-preview+json
Limitation: Repository.get_labels does not report description,
possibly something has changed in the preview API.
# The problems I attempt to solve
- `RepositoryKey.created_at` is available on the Github API, but not in
PyGithub
- `RepositoryKey.edit()` is not supported anymore by the Github API,
see https://developer.github.com/v3/repos/keys/#edit-a-deploy-key
# How I went about solving the problem
I added myself a new deploy key to one of my repositories, and recorded
the existing tests using my account.
I could not keep the existing test data as the specified key does not
exist anymore, I added a comment for the next contributor to help him
figure out how to record new tests.
To compare PullRequestReview objects, they need to have the 'url'
attribute because the CompletableGithubObject expects to be able to
inspect a '_url' attribute on objects when testing for equality.
* Added is_draft and is_prerelease property to GitRelease
* Added target_commitish option to Repository.create_git_release()
* Added test for Repository.create_git_release()
* Renamed attr of GitRelease: is_draft, is_prerelease -> draft, prerelease
* Add hook support for organizations
Specifically, the create_hook, get_hook, and get_hooks calls
* Added support for the edit and delete hook functions
* Added support for newer commit search API endpoint
* Added tests for new commit search method on main Github class
* Fixed sort parameter of search_commits
* 'watching' != 'staring'
The functionality was completely broken - api endpoints were wrong/didn't work. Tested by logging in as an authenticated user - verified listing watches, add watch, and remove watch.
* fix unit tests
* Add __eq__ and __hash__ to NamedUser
* Remove extra outer brackets from __eq__ in NamedUser
* Add unit tests for __eq__ and __hash__
* Remove redundant brackets in __eq__ : NamedUser
* Add flag for maintainer can modify when creating pull requests
* Change default to be None to let github decide the behaviour
* Update docstring
* Follow conventions from other functions