Commit Graph
843 Commits
Author SHA1 Message Date
Wan Liuyang 722f253429 Remove edit for UserKey as it's immutable now 2018-04-05 10:23:01 +08:00
Mateusz Loskot 42e7593871 Labels API: support description (#738)
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.
2018-03-29 18:16:20 +08:00
Shinichi TAMURA 6bf2acc74d Added Issue.as_pull_request() and PullReqest.as_issue() (#630) 2018-03-26 10:25:45 +08:00
Wan Liuyang ae261c821e Fix a bug for test recording when input is None 2018-03-22 16:38:19 +08:00
Ben Yohay 612c35007e Add support for getting PR single review's comments. (#670) 2018-03-21 20:50:56 +08:00
Laurent Raufaste 5e8c683261 Update the RepositoryKey class (#530)
# 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.
2018-03-21 15:09:31 +08:00
Matt Babineau d85082858e adding since to PR review comments get (#577) 2018-03-21 14:44:10 +08:00
Wan Liuyang 566b28d3fa Remove some duplicate attributes introduced in #522 2018-03-21 14:34:57 +08:00
Daniel Kesler c76e67b737 added tarball_url, zipball_url, prerelease and draft property (#522)
* added tarball_url, zipball_url, prerelease and draft property to GitRelease

* Add tests for new attributes
2018-03-21 14:23:56 +08:00
Hayden Fuss 864c663a16 Source Import API (#673)
* add import source

* add import header

* create/get source import for repo, SourceImport class

* Corrected use_lfs, not considered completed with creation

* vcs creds optional

* SourceImport test, removed unneeded attributes

* create/get source import tests for repo

* Encoding and copyright comment

* styling fixes

* Update SourceImport.py

* Update SourceImport.py

* Update SourceImport.py
2018-03-21 14:04:46 +08:00
Gilad Shefer 162f0397bc Added option to create review for Pull request (#662)
* Added option to create review for Pull request

* Fix tests
2018-03-20 22:28:39 +08:00
Wan Liuyang 3cd176e3c3 Depreciate legacy search API 2018-03-20 20:27:27 +08:00
Michał Górny 10ee17a25c Filter team members by role (#491)
* Team: support filtering members by role

* Team: support adding membership with role
2018-03-17 22:05:13 +08:00
sfdye 365a0a24d3 Apply fix_headers script to update copyright info 2018-03-17 20:06:16 +08:00
Darragh Bailey 0fb176fd71 Add url attribute to PullRequestReview object (#731)
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.
2018-03-16 22:49:01 +08:00
Shinichi TAMURA 0f0a7d4e68 Added target_commitish option to Repository.create_git_release() (#625)
* 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
2018-03-15 11:17:04 +08:00
sfdye 58e1ef9ccb Fix copyright formatting 2018-03-13 22:30:47 +08:00
sfdye 020c136a40 Update doc link in copyright text 2018-03-13 22:07:38 +08:00
Wan Liuyang a32a17bf81 Fix broken Github reference link in class docstrings 2018-03-13 15:07:07 +08:00
Anton Nguyen c7f6563c34 Add hook support for organizations (#729)
* Add hook support for organizations
Specifically, the create_hook, get_hook, and get_hooks calls

* Added support for the edit and delete hook functions
2018-03-12 23:02:52 +08:00
Isuru Fernando d9c5a07fcf Get organization from the team (#590)
* Get organization from the team

* Fix ReplayData for Team
2018-03-10 20:13:44 +08:00
Agor Maxime aa556f85a1 Finished search_commits PR (#727)
* 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
2018-03-09 08:00:47 +08:00
Victor Granic f8b23505da Collaborator site admin (#719)
* Add admin_user property to NamedUser

* Fix type from string to bool for site_admin property

* Add a test for site_admin
2018-03-06 10:35:11 +08:00
bryanhuntesl 6109eb3c2b Fix add_to_watched for AuthenticatedUser (#716)
* '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
2018-03-03 12:02:41 +08:00
Wan Liuyang 8daae1375e Update doc link for PyPI 2018-03-02 11:37:27 +08:00
namc 8a13b27476 Add __eq__ and __hash__ to NamedUser (#706)
* 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
2018-02-21 14:40:01 +08:00
Raihaan 0e5a1d1d53 Add maintainer can modify flag to create pull request (#703)
* 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
2018-02-15 10:07:26 +08:00
James D'Amato 01ab4cc6ae Add role parameter to Team.add_membership method (#638) 2018-02-07 01:25:24 -08:00
James D'Amato 5a1424bbc4 Add add_membership testcase (#637) 2018-02-07 01:17:30 -08:00
John Hui 167f85efcd Add collaborator permission support (#699) 2018-02-07 00:27:11 -08:00
Brian Torres-Gil cef98416f4 Use datetime object in create_milestone (#698)
Method create_milestone now uses datetime object to fit better with v3 API using ISO8601.

Date object still allowed for backward compatibility.
2018-02-06 22:44:57 -08:00
Michael Behrisch e671fdd035 Fix date format for milestone creation (#593) 2018-02-06 14:21:51 -08:00
R1kk3r cbfe8d0f62 Remove the default "null" input send during GET request (#691)
* Remove the default "null" input send during GET request

* Remove the 'null' value from all tests
2018-01-31 16:16:11 -08:00
Gilad Shefer 5c9c2f7523 Updated PullRequest reviewer request according to API changes (#690)
https://developer.github.com/changes/2018-01-24-end-thor-preview/
2018-01-26 19:06:09 -08:00
edquist 2f9b1e018a make created_at/published_at attrs available for Release objects (#689) 2018-01-26 11:59:30 -08:00
Ilya Konstantinov 3baa682cf8 Add committer/author to Repository.delete_file (#678) 2018-01-16 14:17:47 -08:00
Andrew Smith 45d18436fd Add method to get latest release of a repository (#609) 2018-01-16 13:57:24 -08:00
Iraquitan Cordeiro Filho 6cfe46b712 Add permissions field to NamedUser (#676) 2018-01-16 13:52:52 -08:00
Simon 6bc804dc15 ♻️ Fix all pep8 coding conventions 2018-01-16 13:41:02 -08:00
Simon 89834a9b77 Add new params for /users/:user/repos endpoint 2018-01-16 13:41:02 -08:00
Thibault Jamet 3f77e53725 Add support for changing PR head commit (#632)
* Add support for changing PR head commit

Signed-off-by: Thibault Jamet <tjamet@users.noreply.github.com>

* Add support for custom commit arguments

Add commit_title, merge_method and sha arguments to the pull request
merge method

Signed-off-by: Thibault Jamet <tjamet@users.noreply.github.com>
2018-01-16 13:26:38 -08:00
Hugo 6735be4933 Drop support for EOL Python 2.5-2.6 and 3.2-3.3 (#674) 2017-12-20 22:52:00 -08:00
Nicolas Agustín Torres ba50af53a0 Add Reactions feature (#671)
* List reactions of issue

* Create issue reaction

* List reactions of an issue comment

* Create a reaction on an issue comment

* List reactions of a commit comment

*  Create a reaction on a commit comment

* List reactions of a pull request review comment

* Create a reaction on a pull request review comment

* Delete reaction

* Renames IssueReaction to Reaction

* Fixes docstring in Reaction class

* Removes issue_url on Reaction class

* Fixes string concatenation that does not work on python 2.6
2017-12-14 19:23:33 -08:00
Wan Liuyang 6169d8eaa2 Add ping_url and ping to Hook (#669) 2017-12-10 14:57:28 -08:00
Andreas Lutro 35333e0390 Add Repository.archived property (#657) 2017-12-10 14:52:23 -08:00
Wan Liuyang e5bfdbeb06 Add unit test for tree attribute of GitCommit (#668) 2017-12-10 14:46:57 -08:00
Jimmy Zelinskie dbc6f5abf0 Add read_only attribute to Deploy Keys (#570) 2017-12-07 20:11:10 -08:00
Ben Firshman 317079efff Fix uploading binary files on Python 3 (#621)
There is a bit of logic for Python 2 that detects if you're
uploading string or bytes, but this is missing for Python 3.
2017-11-27 15:26:18 -08:00
Colin Hoglund 84b43da76c Decode jwt bytes object in Python 3 (#633) 2017-11-27 14:59:38 -08:00
Balázs Rostás 5c41120a8a Added missing parameters for repo creation (#623)
* Added missing parameters to organisation repo creation

* team_id should already be an id not a team object

* Name arguments in the test

* Fixed assertion check

* Added missing parameters to user repo creation

* Fixed comments
2017-11-27 14:25:00 -08:00