Commit Graph
39 Commits
Author SHA1 Message Date
Jirka Borovec 13e178a3ab Set line length to 120 characters (#2599) 2023-07-13 17:37:20 +02:00
Mauricio Alejandro Martínez PachecoandEnrico Minack 91b3f40f79 Add support for repo and org level actions variables (#2580)
Co-authored-by: Enrico Minack <github@enrico.minack.dev>
2023-07-07 15:29:30 +02:00
Felipe Peter 72840de4b3 Add more methods and attributes to Repository.pyi (#2581) 2023-07-04 12:48:17 +02:00
alson 0384e2fd13 Add support for environments (#2223) 2023-06-13 21:07:11 +02:00
Jonathan Leitschuh daf62bd461 Add support for new RepositoryAdvisories API 🎉 (#2483) 2023-06-09 13:42:18 -04:00
Trim21andEnrico Minack 9f52e9486a Add name filter to Repository.get_artifacts() (#2459)
Co-authored-by: Enrico Minack <github@enrico.minack.dev>
2023-06-01 14:32:55 +02:00
Jonathan Leitschuh b94a83cbf3 Add new create_fork arguments (#2493)
Adds support for new `create_fork` arguments:
 - `name` - To set the name of the fork on creation
 - `default_branch_only` - To only include the default branch

Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com>
2023-05-23 17:40:02 +02:00
Wojciech Barczyński 49b3ae16bf Add generate_release_notes parameter to create_git_release and create_git_tag_and_release (#2417) 2023-05-23 15:53:33 +02:00
Trim21 4fa0a5f3f0 fix: Repository.get_artifact() missing argument artifact_id (#2458) 2023-05-13 22:33:13 +02:00
Andrew Collington 600217f04f Fixes issue #2521 (#2529) 2023-05-12 09:47:15 -07:00
Mikhail f. Shiryaev 4198dbfbac Add parameters to Repository.get_workflow_runs (#2408) 2023-05-06 17:00:09 +08:00
Marco Köpcke 0fadd6be8e Add support for repository autolink references (#2016) 2022-10-29 09:03:57 +08:00
Sarah MountandLiuyang Wan db9337a4ee Fix/types for repo topic team (#2341)
Co-authored-by: Liuyang Wan <tsfdye@gmail.com>
2022-10-25 11:20:10 +08:00
Aleksei FedotovandAleksei Fedotov 437ff8452a Add class Artifact (#2313) (#2319)
Co-authored-by: Aleksei Fedotov <aleksei@fedotov.email>
2022-10-25 11:02:33 +08:00
Liuyang Wan 7e6333da1a Fix CI (#2330) 2022-10-13 08:56:18 +08:00
xmo-odoo 001970d4a8 Improve signature of Repository.create_repo (#2118)
The docstring stated that `"*"` and `"none"` were valid values for the
organization, but neither was actually supported (unless your
organization was called `"none"`).

Remove the misleading information from the docstring, and add support
for passing in an actual `Organization` object, for better typing and
reliability properties.

Fixes #2116
2021-12-20 18:27:19 +11:00
Steve Kowalik 6452ddfeb4 Add Repository.rename_branch method (#2089)
The GitHub API exposes an endpoint to rename a branch, so we should
support calling it. Sadly, there is not enough information to add
that method to the Branch class, so expose it in the Repository object.

Fixes #1901
2021-10-24 15:21:31 +11:00
Steve Kowalik 696793dea7 Add support for deleting repository secrets (#1868)
When a previous commit added support for creating secrets on repository
objects, support was not added to also remove them. Since the GitHub API
does support that, add a method to do so.
2021-03-17 16:02:57 +11:00
Chris KeatingandLiuyang Wan c90c050ef1 Adding github actions secrets (#1681)
* Fixed pre-commit issues

* Fixed mypy linting error

* Fix flake8 error

* Update PublicKey.py

* Update PublicKey.py

* Update setup.py

* Update setup.py

* Update requirements.txt

Co-authored-by: Liuyang Wan <tsfdye@gmail.com>

Co-authored-by: Liuyang Wan <tsfdye@gmail.com>
2021-03-07 05:40:52 +08:00
Pascal Hofmann fab682a5cc Fix stubs file for Repository 2020-11-30 08:53:59 +01:00
Dhruv ManilawalaandRaju Subramanian 6d501b286e Add support for Check Suites (#1764)
* Add initial support for Check Suites
* Add API call detail in CheckSuite.rerequest
* Update Accept header with general instead of preview
* Add 'get check runs' endpoint for CheckSuite with stubs
* Add create check suite endpoint with stub
* Update CheckSuite tests with creat check suite endpoint
* Add update check suites preferences endpoint
* Add repository preferences object and stub file
* Add update check suite preferences tests

Needed for #1621

Co-authored-by: Raju Subramanian <coder@mahesh.net>
2020-11-30 16:03:07 +11:00
Pascal Hofmann 197e065372 Add missing preview features of Deployment and Deployment Statuses API (#1674)
* Add missing preview features of Deployment and Deployment Statuses API
  - Enable support for deployment status states in_progress and queued
  - Add arguments production_environment and transient_environment to Repository.create_deployment()
  - Add attributes production_environment and transient_environment to Deployment
  - Use correct type in assertion for Deployment.payload
  - Fix incorrect assertion for description in Deployment.create_status()
  - Add arguments environment, environment_url, auto_inactive to Deployment.create_status()
  - Add attribute environment_url to DeploymentStatus
2020-11-30 15:47:54 +11:00
Dhruv Manilawala c77c06760e Add Support for Check Runs (#1727)
* Add CheckRun object and stub file
* Add list of check runs endpoint for Commit
* Add get check run endpoint for Repository
* Add CheckRun test file and replay data files
* Add CheckRunAnnotation object and stub file
* Add create CheckRun API endpoint to Repository
* Update and add new tests for CheckRun endpoint:
2020-11-19 14:29:04 +11:00
Victor Zeng 24251f4b0f Added support for the Self-Hosted actions runners API (#1684)
* Added data model for Self-Hosted Actions Runner

* Added function for getting self-hosted runners
2020-10-28 15:53:33 +11:00
Chris de Graaf f891bd6136 Fix Repository.create_repository_dispatch type signature (#1643)
* Fix Repository.create_repository_dispatch type signature

* Change from object to Any
2020-08-10 10:17:51 +10:00
Ethan Roy 15b5ae0c75 Add delete_branch_on_merge arg to Repository.edit type stub (#1639)
Add missing delete_branch_on_merge argument to Repository.edit() stub
2020-08-05 12:41:47 +10:00
Ethan Roy de386dfb15 Add type stub for Repository.create_fork (#1638)
Add type stub for Repository.create_fork()
2020-08-05 12:39:06 +10:00
Steve Kowalik 5ad091d018 Correct Repository.create_pull typing harder (#1635)
It turns out if an argument is optional for an overloaded method, the
type hints require the default argument specified to successfully match
against the correct signature. Furthermore, the second kind of
create_pull() does not support the draft argument at all, so remove it.

Fixes #1634
2020-08-04 17:49:49 +10:00
Steve Kowalik 4fb1d23f4d Add support for Workflow Runs (#1583)
To build on the previous work supporting querying Workflows for GitHub
Actions, add a class and relevant methods to support querying runs of a
workflow.
2020-06-26 20:47:42 +10:00
Steve Kowalik 4ed7aaf8e5 More precise typing for Repository.create_pull (#1581)
The typing information for Repository.create_pull did no type checking
of the arguments at all. Using the overload functionality, specify both
styles of create_pull(). Drive-by a nearby function from using a generic
dict to Dict[str, str].
2020-06-25 18:47:01 +10:00
Steve Kowalik 9fb8588b28 Repository.update_file() content also accepts bytes (#1543)
The typing information for the update_file() method's content parameter
states it will only accept str, whereas it will accept both str and
bytes.

Fixes #1542
2020-05-28 09:36:37 +10:00
Huw Jones b40b75f843 Fix Repository.get_issues stub (#1540)
Fixes #1539
2020-05-27 10:24:16 +10:00
Steve Kowalik f41c046f0e Correct Workflow typing (#1533)
When Workflow support was added, the method calls were not added to
the typing file for Repository, and somehow the class name for the
Workflow typing file was incorrect.
2020-05-23 16:04:06 +10:00
Steve Kowalik 53d58d2b07 Remove Repository.topics (#1505)
The topics attribute has been replaced by Repository.get_topics(). To
reduce user confusion, delete the attribute.

Fixes #1504
2020-05-15 10:49:15 +10:00
Michael Hirsch, Ph.D b5737d4103 correct Repository.stargazers_count return type to int (#1513)
It appears this was a type annotation typo, as the type of the stargazers_count property has been int for a long time.
2020-05-11 09:57:32 +10:00
Chris de Graaf ba9d59c209 Add create_repository_dispatch to typing files (#1502) 2020-05-04 09:47:05 +08:00
Emily 6eba4506d4 Improve type stubs (#1489)
* Add type stubs for GithubException subclasses

* Install type stubs per PEP 561

See https://mypy.readthedocs.io/en/stable/installed_packages.html#making-pep-561-compatible-packages.

* Make PaginatedList a generic type

* Add type stubs for __init__.py

* Add type stub for NamedUser.get_projects

* Add GithubObject superclasses to type stubs

Fixes #1490
2020-05-01 12:00:00 +10:00
ton-katsu 3ab97d6145 Add some attributes. (#1468)
* Add some attributes to Repository and Organization

* Format.

* small fix

* Add some test.
2020-04-21 11:49:32 +10:00
Alice GIRARDandLiuyang Wan 91433fe925 Type stubs for mypy (#1231)
* First attempt at stubs

* fix AuthenticatedUser.piy

* fix PullRequest.piy

* fix Authorization.piy

* fix Branch.piy

* fix Clones.piy

* fix Commit.piy

* fix CommitCombinedStatus.piy

* fix CommitComment.piy

* fix CommitStatus.piy

* fix ContentFile.piy

* fix Download.piy

* fix Event.piy

* fix File.piy

* fix Gist.piy

* fix GistComment.piy

* fix GistFile.piy

* fix GitAuthor.piy

* fix GitBlob.piy

* fix GitCommit.piy

* fix GitRef.piy

* fix GitRelease.piy

* renamed stubs into pyi files

* fix Notification

* fix Repository

* fix GitReleaseAsset

* fix GitTag

* fix GitTree

* fix GitTreeElement

* fix GithubException

* fix GithubObject

* fix GitignoreTemplate

* fix HookDescription

* fix HookResponse

* fix InputGitAuthor

* fix Installation

* fix InstallationAuthorization

* fix Invitation

* fix Issue

* fix IssueComment

* Fix random issues found while testing

* fix IssuePullRequest

* fix Label

* fix License

* fix Migration

* fix Milestone

* fix NamedUser

* fix NotificationSubject

* fix Organization

* fix PaginatedList

* fix Path

* fix Permissions

* fix Plan

* fix Project

* fix ProjectCard

* fix ProjectColumn

* fix PullRequestComment

* fix PullRequestMergeStatus

* fix PullRequestPart

* fix PullRequestReview

* fix Rate

* fix RateLimit

* fix Reaction

* fix Referrer

* fix RepositoryKey

* fix RequiredPullRequestReviews

* fix RequiredStatusChecks

* fix SourceImport

* fix Stargazer

* fix StatsCodeFrequency

* fix StatsCommitActivity

* fix StatsContributor

* fix Tag

* fix Team

* fix Topic

* fix UserKey

* fix MainClass

* fix Requester

* added stubs for View

* added stubs for Membership

* various syntax errors

* silence mypy noise

* keeping track of recent changes

* black + isort

Co-authored-by: Liuyang Wan <lwan@zendesk.com>
2020-03-22 19:33:23 +08:00