Commit Graph
33 Commits
Author SHA1 Message Date
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
Mikhail f. Shiryaevandgreen-green-avk 7cf3dfc18e Continue the PR #1899 (#2386)
* A property to access the `assets` field of release (#1898)

... in order to avoid extra requests.

<https://github.com/PyGithub/PyGithub/issues/1898>

* Remove comment to comply the review

* Add tests for GitRelease.assets

---------

Co-authored-by: green-green-avk <45503261+green-green-avk@users.noreply.github.com>
2023-01-31 07:44:16 +08:00
Mark Walker ab36b89aa5 Fixed links to github docs. [#2009] 2021-07-31 02:34:34 +01:00
Steve Kowalik babcbcd04f Update most URLs to docs.github.com (#1896)
Now that GitHub have moved their documentation from
developer.github.com, we should update our links. I have also tried to
update the call strings to their new format, but since it was done via
regex, some of them may not match exactly.
2021-03-26 20:43:48 +11:00
Steve Kowalik 290b62726f Switch all string addition to using f-strings (#1774)
Now that we no longer support Python 3.5, stop using string addition
everywhere it makes sense, and move to the best feature 3.6+ gives us,
f-strings!
2021-03-03 14:50:57 +11:00
Steve Kowalik e113e37de1 Add pyupgrade to pre-commit configuration (#1783)
To help us switch to f-strings and other 3.6+ changes, add pyupgrade to
our pre-commit configuration to keep the codebase clean.
2020-12-15 14:07:33 +11:00
Jesse Li a778639362 upload_asset with data in memory (#1601)
* Expose upload from memory functionality
* Upload from memory basic test
* Test for custom file like object
* Reorganized existing release tests
* Remove docstrings & comments from tests
* Modify logic
* Explain why encode ignores its argument

Fixes #1140
2020-08-03 18:42:06 +10:00
Steve Kowalik 83bef0f7b2 Correct typos found with codespell (#1467)
Correct misspellings and typos located using the codespell tool. Add
codespell to pre-commit to avoid further regressions.

Fixes #1459
2020-04-16 13:25:01 +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
Steve Kowalik b7894ea00c Drop Python 2 support (#1329)
With the Python 2 deadline gone, it's time to move with the times and
switch to Python 3 only.
2020-01-06 18:01:38 +11:00
Wan Liuyang 540a085001 Fix isort - add known first and third party 2019-12-11 00:54:59 +08:00
Wan Liuyang 6ceb9e9a15 Apply black to whole codebase (#1303) 2019-12-10 17:14:33 +08:00
Steve Kowalik dc2f2ad8cb Switch to using six (#1189)
With the Python 2.7 deadline fast approaching, modernize the codebase
making use of the modernize module to switch to using six, as well as
other upcoming features, such as absolute imports . Stop using 2to3
for Travis, yay!
2019-08-05 14:06:19 +10:00
Steve Kowalik 8d2a6b534d Allow name to be specified for upload_asset (#1151)
GitRelease.upload_asset() calculates the name based on the filename, and
doesn't allow it to be overridden. Add a new name argument that is used
if it is set. Drive by changing the default of the content_type argument
to NotSet.

Closes #1095
2019-06-24 15:14:23 +08:00
Ggicci aca50a7581 Change type of GitRelease.author to NamedUser (#969)
Github's release object in the API response contains an `author` field having a value much more like a `NamedUser` but not `GitAuthor`.

e.g. https://api.github.com/repos/edhollandAL/PyGithub/releases/1210902

```
{
  "id": 1210902,
  "author": {
    "login": "edhollandAL",
    "id": 11922660,
    "node_id": "MDQ6VXNlcjExOTIyNjYw",
    "avatar_url": "https://avatars1.githubusercontent.com/u/11922660?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/edhollandAL",
    "html_url": "https://github.com/edhollandAL",
    "followers_url": "https://api.github.com/users/edhollandAL/followers",
    "following_url": "https://api.github.com/users/edhollandAL/following{/other_user}",
    "gists_url": "https://api.github.com/users/edhollandAL/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/edhollandAL/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/edhollandAL/subscriptions",
    "organizations_url": "https://api.github.com/users/edhollandAL/orgs",
    "repos_url": "https://api.github.com/users/edhollandAL/repos",
    "events_url": "https://api.github.com/users/edhollandAL/events{/privacy}",
    "received_events_url": "https://api.github.com/users/edhollandAL/received_events",
    "type": "User",
    "site_admin": false
  },
  // (ignored)
}
```
2018-11-25 09:56:38 +08:00
Wan Liuyang 3f0caa4057 Sync copyright header 2018-08-19 10:47:41 +08:00
nurupo 790f7daeb8 Add tag_name and target_commitish arguments to GitRelease.update_release (#834)
Fixes #833
2018-07-10 22:58:08 +08:00
Kuba e389396405 GitRelease methods documentation (#821)
Hi, here's my small contribution to the documentation in relation to #819 

Few things:
* the `delete_release` method always returns `True` so not sure if the return type is truly valid - potentially a bug
* I've tried generating the documentation locally to check if formatting is ok but failed - is there a guide to it?   I followed the read the docs starter guide but that didn't seem to reflect the way it's done here
2018-06-20 10:39:06 +08:00
Maarten Fonville ba5bf2d76a Include target_commitish in GitRelease (#788) 2018-05-21 17:20:18 +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
sfdye 365a0a24d3 Apply fix_headers script to update copyright info 2018-03-17 20:06:16 +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
edquist 2f9b1e018a make created_at/published_at attrs available for Release objects (#689) 2018-01-26 11:59:30 -08:00
Simon 6bc804dc15 ♻️ Fix all pep8 coding conventions 2018-01-16 13:41:02 -08:00
Chris McBride 52449649a4 Add ability to access github Release Asset API. (#525)
* Add ability to access github Release Asset API.
See: https://developer.github.com/v3/repos/releases
2017-11-27 10:01:03 -06:00
Benjamin Whitney ec633aab5e add html_url to GitRelease 2016-10-20 23:51:51 -04:00
Jannis Gebauer 8571d87c77 adds a nicer __repr__ 2016-09-08 10:25:48 +02:00
Peter Buckley cb0cf0a680 update doc url everywhere (#420) 2016-07-12 16:38:02 -04: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