Github3.py Versions Save

Hi, I'm a library for interacting with GItHub's REST API in a convenient and ergonomic way. I work on Python 3.6+.

3.0.0

2 years ago

Backwards Incompatible Changes

  • :meth:~github3.repos.branch.Branch.protect has been updated to reflect the GitHub API

Features Added

  • Add maintainer_can_modify parameter to :meth:~github3.repos.repo.Repository.create_pull

  • Add :attr:~github3.repos.branch.BranchProtection.required_linear_history, :attr:~github3.repos.branch.BranchProtection.allow_force_pushes, :attr:~github3.repos.branch.BranchProtection.allow_deletions, and :attr:~github3.repos.branch.BranchProtection.required_conversation_resolution.

  • Add support for blocking users to :class:~github3.github.GitHub and :class:~github3.orgs.Organization.

    • :meth:~github3.github.GitHub.blocked_users
    • :meth:~github3.github.GitHub.block
    • :meth:~github3.github.GitHub.is_blocking
    • :meth:~github3.github.GitHub.unblock
    • :meth:~github3.orgs.Organization.blocked_users
    • :meth:~github3.orgs.Organization.block
    • :meth:~github3.orgs.Organization.is_blocking
    • :meth:~github3.orgs.Organization.unblock
  • Add support for beta branch synchronization endpoint :meth:~github3.repos.branch.Branch.sync_with_upstream

  • :class:~github3.users.Stargazer was added to give access to the starred_at value when listing stargazers on a Repository object.

2.0.0

2 years ago

Features Added

  • Add support to Python 3.8 and 3.9.
  • Remove support to Python versions that reached end-of-life (2, 3.4 and 3.5).
  • Update CI/CD to thoroughly test all supported version.
  • Remove compatibility imports for Python 2.
  • Remove dev-dependency for mock.

Bugs Fixed

  • Key errors on Gist.history.

Removals

  • Removal of legacy unicode future imports.

  • Removal of already deprecated code on version 1.x:

  • github3.api.all_events use github.GitHub.all_events
  • github3.api.all_repositories use github.GitHub.all_repositories
  • github3.api.all_users use github.GitHub.all_users
  • github3.api.authorize use github.GitHub.authorize
  • github3.api.create_gist use github.GitHub.create_gist
  • github3.api.emojis
  • github3.api.followed_by use github.GitHub.followed_by
  • github3.api.followers_of use github.GitHub.followers_of
  • github3.api.gist use github.GitHub.gist
  • github3.api.gists_by use github.GitHub.gists_by
  • github3.api.gitignore_template use github.GitHub.gitignore_template
  • github3.api.gitignore_templates use github.GitHub.gitignore_templates
  • github3.api.issue use github.GitHub.issue
  • github3.api.issues_on use github.GitHub.issues_on
  • github3.api.markdown use github.GitHub.markdown
  • github3.api.octocat use github.GitHub.octocat
  • github3.api.organization
  • github3.api.organizations_with use github.GitHub.organizations_with
  • github3.api.public_gists use github.GitHub.public_gists
  • github3.api.pull_request use github.GitHub.pull_request
  • github3.api.rate_limit
  • github3.api.repositories_by use github.GitHub.organizations_with
  • github3.api.repository
  • github3.api.search_code use github.GitHub.search_code
  • github3.api.search_issues use github.GitHub.search_issues
  • github3.api.search_repositories use github.GitHub.search_repositories
  • github3.api.search_users use github.GitHub.search_users
  • github3.api.starred_by use github.GitHub.starred_by
  • github3.api.subscriptions_for use github.GitHub.subscriptions_for
  • github3.api.user
  • github3.api.zen use github.GitHub.zen
  • Git#Blob.decoded use Git#Blob.decode_content
  • Team#is_member use Login#is_member
  • Team#add_member use Team#add_or_update_membership
  • Team#invite use Team#add_or_update_membership
  • Team#remove_member use Team#add_or_update_membership
  • Organization#add_member add username to team.
  • Organization#events use Organization#public_events
  • Issue#assign use issues.issue.Issue.add_assignees

1.3.0

2 years ago

Features Added

  • Add partial support for the Checks API:

    • Add support for listing check runs via check_runs and check suites via check_suites methods to RepoCommit, MiniCommit and ShortCommit classes

    • CheckRun.update to update the check run

    • CheckSuite.check_runs to retrieve the check runs for this suite

    • CheckRunOutput.annotations class to retrieve the annotations for a check run

  • Add unignore method to unignore notifications from repository for the user, to Repository and ShortRepository classes.

  • Add unsubscribe method to unsubscribe the user to repository's notifications, to Repository and ShortRepository classes.

  • Add support for webhooks in an organization by adding:

    • OrganizationHook class

    • create_hook, hook, and hooks methods to ShortOrganization and Organization classes

  • A Project.retrieve_issue_from_content method was added to retrieve an Issue from the content url.

  • A Project.retrieve_pull_request_from_content method was added to retrieve a PullRequest from the content url.

  • Add support for Parent/Child teams via the hellicat-preview API preview type.

  • Add support for specifying merge commit titles when merging a Pull Request.

Bugs Fixed

  • Stop hard-coding GitHub url that breaks work with a GitHub Enterprise instance.

  • Set default connect and read timeouts in GitHubSession to avoid hangs.

.. links .. _Checks API: https://developer.github.com/v3/orgs/checks/

.. _Webhooks API: https://developer.github.com/v3/orgs/hooks/

1.2.0

2 years ago

This is a larger release with some enhancements and bug fixes.

Features Added

  • Partial GitHub Apps support. We added the following:

    • GitHub.login_as_app to login using JWT as an Application

    • GitHub.login_as_app_installation to login using a token obtained from an App's JWT

    • GitHub.app to retrieve an application by its "slug"

    • GitHub.app_installation to retrieve a specific installation by its ID

    • GitHub.app_installations to retrieve all of an App's installations

    • GitHub.app_installation_for_organization to retrieve an organization's installation of an App

    • GitHub.app_installation_for_repository to retrieve an installation for a specific repository

    • GitHub.app_installation_for_user to retrieve an installation for a specific user

    • GitHub.authenticated_app to retrieve the metadata for a specific App

    • Not supported as of this release:

      • Installations API_

      • List installations for user_

      • User-to-server OAuth access token_

  • Organization Invitations Preview API is now supported. This includes an additional Invitation object. This is the result of hard work by Hal Wine.

  • A ShortLabel class was added to represent the shorter (description-less) representation of labels returned by the API.

  • The branch protections API is now completely represented in github3.py.

  • We now support the GPG Keys API.

  • We now support the Commit Search API.

  • We now support Repository Invitations.

  • We now have assign and unassign methods that support assigning and unassigning multiple users at once.

  • We now support review requests on Pull Requests.

  • We now support the ability for a user to activate their membership in an Organization.

  • We now support recurisvely traverse a tree via the API.

  • We now support enabling or disabling projects on a Repository.

  • We now support editing and reading Repository topics.

  • We now support Repository Pull Request merge settings.

Bugs Fixed

  • No longer require a Gist to have an owner.

  • Branch.latest_sha() now returns text (unicode) as documented.

Special Thanks

A great deal of the exception feature work done above was performed by the newest team member of the github3.py project: Jacopo Notarstefano (a.k.a, @jacquerie on GitHub). This project has had new life breathed into it thanks to Jacopo.

.. links .. _Installations API: https://developer.github.com/v3/apps/installations/

.. _List installations for user: https://developer.github.com/v3/apps/#list-installations-for-user

.. _User-to-server OAuth access token: https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site

1.1.0

2 years ago

This is a small release with some enhancements.

Features Added

  • Repository collaborators now returns a users.Collaborator object, instead of a users.ShortUser object. This is to support collaborator affiliations. A refresh call of this object (and users.Contributor) will result in a full users.User object.

  • The call to iterate collaborators of a repository (Repository#collaborators) can now take an affiliation filter with options of outside, direct, and all. The default is all, which preserves the previous behavior of this method.

Bugs Fixed

  • Parse certain attributes on IssueEvent into objects (again, this was a regression in 1.0)

  • Handle older GitHub Enterprise responses for authenticated user objects

  • Handle large file pull request responses not including a patch attribute

1.0.2

6 years ago

Bugs Fixed


- Handle 304s from users passing etag
- Generate _api object for ShortBranch objects
- Require auth for creating gists
- Ensure only desired auth scheme is used with requests
- Handle older GitHub Enterprise responses for repository objects

0.9.3

9 years ago

v0.7.1

10 years ago
  • 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_url on Pull Requests courtesy of @rogerhu.
  • Remove expecter as a test dependency courtesy of @esacteksab.
  • Fixed issue #141 trying to find an Event that doesn't exist.