-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add make_latest to GitRelease.update_release
#2788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #2788 +/- ##
==========================================
- Coverage 96.73% 96.72% -0.02%
==========================================
Files 139 139
Lines 14185 14188 +3
==========================================
+ Hits 13722 13723 +1
- Misses 463 465 +2
☔ View full report in Codecov by Sentry. |
|
can you also update document link in docstring? current link is out of data. |
|
@fb929 I was just about to submit a PR to do exactly this. |
EnricoMi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you are here, can you please add discussion_category_name as well?
| "prerelease": prerelease, | ||
| } | ||
| if make_latest is not NotSet: | ||
| assert isinstance(make_latest, bool), make_latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documentation says, this is a string
| assert isinstance(make_latest, bool), make_latest | |
| assert make_latest in ["true", "false", "legacy"], make_latest |
|
Looks like |
| message: str, | ||
| draft: bool = False, | ||
| prerelease: bool = False, | ||
| make_latest: Opt[bool] = NotSet, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this here may break user code, can you add this at the end of the argument list?
make_latest to GitRelease.update_release
|
I tackled the PR review of this PR in the linked PR. @trim21 and @EnricoMi feel free to review.
we already send/post that as Lines 204 to 210 in 7e7653f
|
PyGithub#2788 make_latest is string
|
You are welcome @pfarrell. Feel free to test the coding and comment if it worked for you! Helps the PR getting merged :-) |
|
Closed in favour of #2888. |
### The problem: - def "update_release" can not make release as "latest" ### How solving the problem: - adding optional parameter "make_latest", from original api doc: https://docs.github.com/en/free-pro-team@latest/rest/releases/releases?apiVersion=2022-11-28#update-a-release--code-samples ### additions - documentation URL has changed - `discussion_category_name` has been added superseds #2788 --------- Co-authored-by: Grigory Efimov <grigory.efimov@gmail.com> Co-authored-by: Enrico Minack <github@enrico.minack.dev>
The problem:
def "update_release" can not make release as "latest"
How solving the problem:
adding optional parameter "make_latest", from original api doc: https://docs.github.com/en/free-pro-team@latest/rest/releases/releases?apiVersion=2022-11-28#update-a-release--code-samples