Skip to content
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

Add MakeLatest parameter to support explicitly setting latest release #2594

Merged
merged 3 commits into from
Dec 8, 2022
Merged

Add MakeLatest parameter to support explicitly setting latest release #2594

merged 3 commits into from
Dec 8, 2022

Conversation

chrisgrautealium
Copy link
Contributor

Fixes: #2593

This adds support for the make_latest parameter added to the GitHub repositories API for setting explicit releases.

https://github.blog/changelog/2022-10-21-explicitly-set-the-latest-release/
https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#update-a-release

GitHub recently changed the way the latest version can be managed, to
allow explicitly setting the latest release. Previously, the latest
release would be the most recently created non-pre-release.

https://github.blog/changelog/2022-10-21-explicitly-set-the-latest-release/

In the web UI, this shows up as two checkboxes. In the API, this is set
using the make_latest parameter, which defaults to true for newly
created releases.

https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#update-a-release

#2593
https://github.com/google/go-github/blob/153bbc2620f5693e42fb1ae5b80d86c611bc6727/CONTRIBUTING.md#submitting-a-patch

Ran,

```
go generate github.com/google/go-github/...
go test github.com/google/go-github/...
go vet github.com/google/go-github/...
```
@codecov
Copy link

codecov bot commented Dec 7, 2022

Codecov Report

Merging #2594 (05df1a3) into master (153bbc2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 05df1a3 differs from pull request most recent head 5f4e651. Consider uploading reports for the commit 5f4e651 to get more accurate results

@@           Coverage Diff           @@
##           master    #2594   +/-   ##
=======================================
  Coverage   97.98%   97.99%           
=======================================
  Files         126      126           
  Lines       10895    10897    +2     
=======================================
+ Hits        10676    10678    +2     
  Misses        150      150           
  Partials       69       69           
Impacted Files Coverage Δ
github/repos_releases.go 89.45% <100.00%> (+0.08%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @chrisgrautealium !

github/repos_releases.go Show resolved Hide resolved
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @chrisgrautealium !
LGTM.
Merging.

@gmlewis gmlewis merged commit 44d91eb into google:master Dec 8, 2022
@chrisgrautealium chrisgrautealium deleted the make-latest branch December 8, 2022 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for explicitly setting the latest release
2 participants