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

[ feature request ] list repos for organization #734

Open
yonas opened this issue Nov 18, 2024 · 0 comments
Open

[ feature request ] list repos for organization #734

yonas opened this issue Nov 18, 2024 · 0 comments

Comments

@yonas
Copy link

yonas commented Nov 18, 2024

List all forks of an organization owned by the currently authenticated user.

For example, in

use octocrab::Octocrab;

#[tokio::main]
async fn main() -> octocrab::Result<()> {
    let token = std::env::var("GITHUB_TOKEN").expect("GITHUB_TOKEN env variable is required");

    let octocrab = Octocrab::builder().personal_token(token).build()?;

    let my_repos = octocrab
        .current()
        .list_repos_for_authenticated_user()
        .type_("owner")
        .sort("updated")
        .per_page(100)
        .send()
        .await?;

    for repo in my_repos {
        println!("{}", repo.name);
    }

    Ok(())
}

I would like to replace list_repos_for_authenticated_user() with something like list_repos_for_authenticated_user("myorg").

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

No branches or pull requests

1 participant