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 support to get release by id #664

Closed
wants to merge 2 commits into from

Conversation

derklaro
Copy link

Add support to get a release by its id: https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-a-release

Tested by getting the 1.79.0 release from the rust repo:

let release = octocrab.repos("rust-lang", "rust")
  .releases()
  .get_by_id(160301961)
  .await?;

Closes #663

/// # Ok(())
/// # }
/// ```
pub async fn get_by_id(&self, release_id: u64) -> crate::Result<models::repos::Release> {
Copy link
Owner

Choose a reason for hiding this comment

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

I think this can be called just get to match the convention elsewhere.

@derklaro
Copy link
Author

just saw: this was already done in #666

@derklaro derklaro closed this Jul 29, 2024
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.

[Feature request] Get release by its id
2 participants