- Backport of
PullRequest#create_review_commentby Adrian Moisey - Backport of
PullRequest#review_commentsby Adrian Moisey - Backport of a fix that allows authenticated users to download Release Assets. Original bug reported by Eugene Fidelin in issue #288.
- Documentation typo fix by Marc Abramowitz
- Updates for new team management API changes
- Add
Team#invite,Team#membership_for, andTeam#revoke_membership - Deprecate
Team#add_member,Team#remove_member, andOrganization#add_member. - Update payload handler for
TeamAddEvent.
- Add
- Correct Repository attribute
fork_countshould beforks_count
- Add Deployments API
- Add Pages API
- Add support so applications can revoke a single authorization or all authorizations created by the application
- Add the ability for users to ping hooks
- Allow users to list a Repository's collaborators
- Allow users to create an empty blob on a Repository
- Update how users can list issues and pull requests. See:
http://developer.github.com/changes/2014-02-28-issue-and-pull-query-enhancements/
This includes breaking changes to
Repository#iter_pulls. - Update methods to handle the pagination changes.
- Fix typo stargarzers_url
- Add
assetsattribute toReleaseobject. - Fix wrong argument to
Organization#create_team(permissionsversuspermission) - Fix Issue Search Result's representation and initialization
- Fix Repository Search Result's initialization
- Allow users to pass a two-factor authentication callback to
GitHub#authorize.
- Fix bug in
GitHub#search_users(andgithub3.search_users). Thanks @abesto - Expose the stargazers count for repositories. Thanks @seveas
- Add documentation for using Two Factor Authentication
- Fix oversight where
github3.logincould not be used for 2FA
Breaking Change Remove legacy search API
I realize this should have been scheduled for 1.0 but I was a bit eager to remove this.
Use Betamax to start recording integration tests
Add support for Releases API
Add support for Feeds API
Add support for Two-Factor Authentication via the API
Add support for New Search API
- Add
github3.search_code,github3.search_issues,github3.search_repositories,github3.search_users - Add
GitHub#search_code,GitHub#search_issues,GitHub#search_repositories,GitHub#search_users
- Add
Switch to requests >= 2.0
Totally remove all references to the Downloads API
Fix bug in
Repository#update_filewherebranchwas not being sent to the API. Thanks @tpetr!Add
GitHub#rate_limitto return all of the information from the/rate_limitendpoint.Catch missing attributes --
diff_hunk,original_commit_id-- onReviewComment.Add support for the Emojis endpoint
Note deprecation of a few object attributes
Add support for the
ReleaseEventAdd
GitHub#iter_user_teamsto return all of the teams the authenticated user belongs to
- Add dependency on uritemplate.py to add URITemplates to different classes. See the documentation for attributes which are templates.
- Fixed issue trying to parse
html_urlon Pull Requests courtesy of @rogerhu. - Remove
expecteras a test dependency courtesy of @esacteksab. - Fixed issue #141 trying to find an Event that doesn't exist.
Fix
Issue.close,Issue.reopen, andIssue.assign. (Issue #106)Add
check_authorizationto theGitHub classto cover the new part of the API.Add
create_file,update_file,delete_file,iter_contributor_statistics,iter_commit_activity,iter_code_frequencyandweekly_commit_countto theRepositoryobject.Add
updateanddeletemethods to theContentsobject.Add
is_followingto theUserobject.Add
head,baseparameters toRepository.iter_pulls.The signature of
Hook.edithas changed since that endpoint has changed as well. See: github/developer.github.com@b95f291a47954154a6a8cd7c2296cdda9b610164github3.GitHubcan now be used as a context manager, e.g.,with github.GitHub() as gh: u = gh.user('sigmavirus24')
- Add equality for labels courtesy of Alejandro Gomez (@alejandrogomez)
- Add
sortandorderparameters togithub3.GitHub.search_usersandgithub3.GitHub.search_repos. - Add
iter_commitstogithub3.gists.Gistas a means of re-requesting just the history from GitHub and iterating over it. - Add minimal logging (e.g.,
logging.getLogger('github3')) - Re-organize the library a bit. (Split up repos.py, issues.py, gists.py and a few others into sub-modules for my sanity.)
- Calling
refresh(True)on agithub3.structs.GitHubIteratoractually works as expected now. - API
iter_methods now accept theetagargument as theGitHub.iter_methods do. - Make
github3.octocatandgithub3.github.GitHub.octocatboth support sending messages to make the Octocat say things. (Think cowsay) - Remove vendored dependency of PySO8601.
- Split
GitHub.iter_reposintoGitHub.iter_user_reposandGitHub.iter_repos. As a consequencegithub3.iter_reposis nowgithub3.iter_user_repos IssueComment.updatewas corrected to match GitHub's documentationgithub3.loginnow accepts an optionalurlparameter for users of theGitHubEnterpriseAPI, courtesy of Kristian Glass (@doismellburning)- Several classes now allow their instances to be compared with
==and!=. In most cases this will check the unique id provided by GitHub. In others, it will check SHAs and any other guaranteed immutable and unique attribute. The class doc-strings all have information about this and details about how equivalence is determined.
- Add missing optional parameter to Repository.contents. Thanks @tpetr
- Stop trying to decode the byte strings returned by
b64decode. Fixes #72
- Hot fix an issue when a user doesn't have a real name set
100% (mock) test coverage
Add support for conditional refreshing, e.g.,
import github3 u = github3.user('sigmavirus24') # some time later u.refresh() # Will ALWAYS send a GET request and lower your ratelimit u.refresh(True) # Will send the GET with a header such that if nothing # has changed, it will not count against your ratelimit # otherwise you'll get the updated user object.Add support for conditional iterables. What this means is that you can do:
import github3 i = github3.iter_all_repos(10) for repo in i: # do stuff i = github3.iter_all_repos(10, etag=i.etag)And the second call will only give you the new repositories since the last request. This mimics behavior in pengwynn/octokit
Add support for sortable stars.
In github3.users.User,
iter_keysnow allows you to iterate over any user's keys. No name is returned for each key. This is the equivalent of visiting: github.com/:user.keysIn github3.repos.Repository,
pubsubhubbubhas been removed. Use github3.github.Github.pubsubhubbub insteadIn github3.api,
iter_repo_issues's signature has been corrected.Remove
list_{labels, comments, events}methods from github3.issues.IssueRemove
list_{comments, commits, files}methods from github3.pulls.PullRequestIn github3.gists.Gist:
- the
userattribute was changed by GitHub and is now theownerattribute - the
publicattribute and theis_publicmethod return the same information. The method will be removed in the next version. - the
is_starredmethod now requires authentication - the default
refreshmethod is no longer over-ridden. In a change made in before, a genericrefreshmethod was added to most objects. This was overridden in the Gist object and would cause otherwise unexpected results.
- the
github3.events.Event.is_public()andgithub3.events.Event.publicnow return the same information. In the next version, the former will be removed.In github3.issues.Issue
add_labelsnow returns the list of Labels on the issue instead of a boolean.remove_labelnow retuns a boolean.remove_all_labelsandreplace_labelsnow return lists. The former should return an empty list on a successful call. The latter should return a list ofgithub3.issue.Labelobjects.
Now we won't get spurious GitHubErrors on 404s, only on other expected errors whilst accessing the json in a response. All methods that return an object can now actually return None if it gets a 404 instead of just raising an exception. (Inspired by #49)
GitHubStatus API now works.
- In github3.legacy.LegacyRepo
has_{downloads,issues,wiki}are now attributes.is_private()and theprivateattribute return the same thingis_private()will be deprecated in the next release.
- In github3.repos.Repository
is_fork()is now deprecated in favor of theforkattributeis_private()is now deprecated in favor of theprivateattribute
- In github3.repos.Hook
is_active()is now deprecated in favor of theactiveattribute
- In github3.pulls.PullRequest
is_mergeable()is now deprecated in favor of themergeableattribute
- In github3.notifications.Thread
is_unread()is now deprecated in favor of theunread
pubsubhubbub()is now present on theGitHubobject and will be removed from theRepositoryobject in the next release- 70% test coverage
In github3.repos.Repository
- is_fork() and fork return the same thing
- is_private() and private return the same thing as well
- has_downloads, has_issues, has_wiki are now straight attributes
In github3.repos.Hook
- is_active() and active return the same value
In github3.pulls.PullRequest
- is_mergeable() and mergeable are now the same
- repository now returns a tuple of the login and name of the repository it belongs to
In github3.notifications.Thread
- is_unread() and unread are now the same
In github3.gists
- GistFile.filename and GistFile.name return the same information
- Gist.history now lists the history of the gist
- GistHistory is an object representing one commit or version of the history
- You can retrieve gists at a specific version with GistHistory.get_gist()
github3.orgs.Organization.iter_repos now accepts all types
list_* methods on Organization objects that were missed are now deleted
Some objects now have
__str__methods. You can now do things like:import github3 u = github3.user('sigmavirus24') r = github3.repository(u, 'github3.py')And
import github3 r = github3.repository('sigmavirus24', 'github3.py') template = """Some kind of template where you mention this repository {0}""" print(template.format(r)) # Some kind of template where you mention this repository # sigmavirus24/github3.pyCurrent list of objects with this feature:
- github3.users.User (uses the login name)
- github3.users.Key (uses the key text)
- github3.users.Repository (uses the login/name pair)
- github3.users.RepoTag (uses the tag name)
- github3.users.Contents (uses the decoded content)
60% test coverage with mock
Upgrade to requests 1.0.x
- MAJOR API CHANGES:
GitHub.iter_subscribed-->GitHub.iter_subscriptions- Broken
list_*functions in github3.api have been renamed to the correctiter_*methods onGitHub. - Removed
list_*functions fromRepository,Gist,Organization, andUserobjects
- Added zen of GitHub method.
- More tests
- Changed the way
Repository.editworks courtesy of Kristian Glass (@doismellburning) - Changed
Repository.contentsbehaviour when acting on a 404. - 50% test coverage via mock tests
- Add API for GitHub Enterprise customers.
- Handle 500 errors better, courtesy of Kristian Glass (@doismellburning)
- Handle sending json with % symbols better, courtesy of Kristian Glass
- Correctly handle non-GitHub committers and authors courtesy of Paul Swartz (@paulswartz)
- Correctly display method signatures in documentation courtesy of (@seveas)
- unit tests implemented using mock instead of hitting the GitHub API (#37)
- removed
list_*functions from GitHub object - Notifications API coverage
- Support for the complete GitHub API (accomplished)
- Now also includes the Statuses API
- Also covers the auto_init parameters to the Repository creation methodology
- Limited implementation of iterators in the place of list functions.
- 98% coverage by unit tests