Commit Graph
53 Commits
Author SHA1 Message Date
Yossarian King faca4ce1c0 Add support for projects (#854)
Initial solution for [PyGithub support for projects](https://github.com/PyGithub/PyGithub/issues/606) (#606). Adds comprehensive project querying API.

Currently does not support for modifying projects, columns or cards. (I only need this interface for reporting purposes. Of course once I'm done others are more than welcome to add additional features!)

API that was integrated:
https://developer.github.com/v3/projects
https://developer.github.com/v3/projects/columns
https://developer.github.com/v3/projects/cards

Note that the Github project API is in preview mode - it requires a special header in order for requests to be processed, and the API is subject to change without notice.

## Summary
- new classes: Project, ProjectColumn, ProjectCard
- add Organization.get_projects method
- add Repository.get_projects method
- add MainClass.get_project method
- add test cases to exercise all new classes and methods and verify attributes are as expected; replay data is included, recorded (mostly) from my fork of PyGithub
- updated add_attribute script to:
  - use makeXXXAttribute API
  - be able to add to the end of the current set of properties
  - handle both Completable and NonCompletable class types correctly

## Checklist
Not to be merged until these are done:

- [x] remaining Project properties
- [x] remaining ProjectColumn properties
- [x] remaining ProjectCard properties
- [x] support for archived_state parameter when getting cards: all,archived, or not_archived
- [x] get issue from card, not just pull request ("get_content" method?)
- [x] centralize header management for "preview" access to projects API
- [x] add test for retrieving organization projects
- [x] add test for getting issue / pull request content from card
2018-09-11 13:05:16 +08:00
Wan Liuyang 3f0caa4057 Sync copyright header 2018-08-19 10:47:41 +08:00
Steve Kowalik 171cc567ae Update Branch Protection to current GitHub API
The Branch protection API has been radically changed by GitHub, add new
methods to Branch reflecting it. Branch protection methods are now
called on the Branch object itself, rather than awkwardly hanging off
the Repository object and requiring branch names to be passed in.

This adds an over-arching methods to get, edit and remove protection
entirely, as well as fine-grained methods for getting, setting and
dropping certain aspects of branch protection, as well as three new
objects to encompass querying those aspects.

This also destroys Repository.protect_branch(), the endpoint has been
removed. The old-style protection attributes on Branch have also been
removed to force users onto the new API, since they are still sent, but
no longer populated.

Fixes #586
2018-08-15 12:45:47 +10:00
sfdye e9e09b9dda Include GitReleaseAsset test, closes #778 2018-05-01 09:40:08 +08:00
Steve Kowalik e2e29918ea Re-work PullRequest reviewer request (#765)
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
2018-04-23 14:22:51 +08:00
Wan Liuyang b54ccc784e Implement License API (#734)
* Implement License API

* Update copyright
2018-04-06 09:17:19 +08:00
Shinichi TAMURA 6bf2acc74d Added Issue.as_pull_request() and PullReqest.as_issue() (#630) 2018-03-26 10:25:45 +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
sfdye 365a0a24d3 Apply fix_headers script to update copyright info 2018-03-17 20:06:16 +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
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
Aaron Levine b6b127d732 Updates to API and changes to resolve testing issues. 2017-03-24 14:45:04 -06:00
Aaron Levine 7a0fcb27b7 Add testing for Pull Request Reviews and Review Requests 2017-03-21 13:00:11 -06:00
Matthew Neal 0154c6b0d5 Support HTTP 302 redirect in Organization.has_in_members 2017-01-18 22:13:14 -06:00
Sam Corbett 8ab9082cff Encode GithubObject repr values in utf-8 when using Python2 2016-11-30 10:15:51 +00:00
Peter Buckley cb0cf0a680 update doc url everywhere (#420) 2016-07-12 16:38:02 -04:00
John Eskew 5823ed7d42 Add:
- CommitCombinedStatus class
  - get_combined_status() to Commit class to return combined status
  - Add test for combined status.
2016-01-25 17:57:21 -05:00
Ed Holland 906d8d8ed2 Add support for github releases. Includes methods for creating + getting releases, but no support for assests yet 2015-04-24 10:15:18 +01:00
Vincent Jacques aadc286839 Work-around Issue278 2014-10-07 18:45:30 -07:00
Vincent Jacques abca7a026e pep8
This is strange, maybe Cygwin's version is stricter.
No time to investigate.
2014-05-04 12:54:05 -07:00
Vincent Jacques 07c026742c Restore coverage for several previous PRs 2014-03-02 20:48:13 -08:00
Vincent Jacques 411262d289 Merge branch 'develop' 2013-12-23 19:32:28 -08:00
Vincent Jacques 6767e75c52 Fix #216: handle 'Link' header
Headers with capitals are returned by http.client (replacing httplib in Python 3)
2013-12-23 19:25:11 -08:00
David Farr ce3fb533e0 adding the tests for issue 214 2013-12-16 16:24:24 -08:00
Vincent Jacques d626f21484 Implement equality comparison of CompletableGithubObject (#201) 2013-11-10 16:28:52 -08:00
Vincent Jacques 072bf24277 Raise exception only when user *accesses* an attribute with a bad value (#195) 2013-09-12 11:45:29 +02:00
Vincent Jacques c0dae31a97 Add many missing attributes 2013-09-06 17:14:59 +02:00
Vincent Jacques d102f358be Homogenize AllTests.py 2013-09-06 14:21:42 +02:00
Vincent Jacques a6b4165d6c ./manage.sh fix_headers 2013-09-06 11:39:12 +02:00
Vincent Jacques 8f4a309c0e Github.get_rate_limit 2013-09-06 11:38:20 +02:00
Vincent Jacques c819580ce8 Get status of Github API (#188) 2013-09-06 11:01:33 +02:00
Vincent Jacques 3fe9edf087 Implement object persistence
This follows my proposal for #193.
Largely inspired by AKFish's work.
2013-09-04 23:28:44 +02:00
AKFish c7593e84c4 Add test case for conditional request 2013-08-22 10:20:10 +08:00
Vincent Jacques 06a3d87098 Change source file header format 2013-07-13 19:03:53 +02:00
Vincent Jacques 6306f798fd Add test for pull request #174 2013-06-18 22:12:15 +02:00
Vincent Jacques 79365fe4bc De-activate our only intergration test, to pass on Travis-CI 2013-05-17 14:09:36 +02:00
Vincent Jacques 97af2b6da2 Fix pagination with secret-key authentication (issue #158) 2013-04-25 14:31:51 +02:00
Vincent Jacques db5560bd65 Add a script to check copyrights with git log. And fix copyrights. 2013-03-29 16:54:15 +01:00
Vincent Jacques 2defd7b818 Expose raw data of objects (Issue #144) 2013-03-14 12:29:54 +01:00
Vincent Jacques 0ddb34d987 Fix decoding on Python3 (bytes instead of str) (Issue #142) 2013-03-03 18:32:10 +01:00
Vincent Jacques 7a415fda66 Change home page 2013-02-16 21:19:49 +01:00
Vincent Jacques 04adab121e Implement Repository.get_dir_contents (issue #140) 2013-02-16 19:09:25 +01:00
Vincent Jacques f533731151 Add a test showing the silly bug described in issue #139 2013-02-08 08:29:18 +01:00
Vincent Jacques 092e4a4b76 Add a test reproducing issue #131 2013-02-03 17:53:11 +01:00
Vincent Jacques 921ba8df1e Reproduce issue #134 2013-01-29 19:23:15 +01:00
Vincent Jacques a280518835 Add a failing test for pull #133 2013-01-29 18:47:46 +01:00
Zearin 4c6a70c24a Add encoding comment to source files
This is a minor thing.  It’s a convention, not a rule (obviously)—but it’s also a best practice.

Many text editors look for this kind of comment as the first line—or second line, if there is a shebang (the `#!/usr/bin/env python`, or whatever else)—and make use of this to determine the file’s encoding.
2012-11-01 11:43:56 -04:00
Vincent Jacques cc6d7f1ec3 Fix test when run on Linux with source tree on case-insensitive filesystem 2012-10-28 09:54:07 +01:00
Vincent Jacques 6ed11d0136 Add test showing error described in issue #87 2012-09-17 20:48:16 +02:00