getRepositories

Note: The data source will return a maximum of 1000 repositories as documented in official API docs. Use this data source to retrieve a list of GitHub repositories using a search query.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = github.getRepositories({
query: "org:hashicorp language:Go",
includeRepoId: true,
});
import pulumi
import pulumi_github as github
example = github.get_repositories(query="org:hashicorp language:Go",
include_repo_id=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = Github.GetRepositories.Invoke(new()
{
Query = "org:hashicorp language:Go",
IncludeRepoId = true,
});
});
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := github.GetRepositories(ctx, &github.GetRepositoriesArgs{
Query: "org:hashicorp language:Go",
IncludeRepoId: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetRepositoriesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = GithubFunctions.getRepositories(GetRepositoriesArgs.builder()
.query("org:hashicorp language:Go")
.includeRepoId(true)
.build());
}
}
variables:
example:
fn::invoke:
function: github:getRepositories
arguments:
query: org:hashicorp language:Go
includeRepoId: true

Return

A collection of values returned by getRepositories.

Parameters

argument

A collection of arguments for invoking getRepositories.


suspend fun getRepositories(includeRepoId: Boolean? = null, query: String, resultsPerPage: Int? = null, sort: String? = null): GetRepositoriesResult

Return

A collection of values returned by getRepositories.

Parameters

includeRepoId

Returns a list of found repository IDs

query
resultsPerPage

Set the number of repositories requested per API call. Can be useful to decrease if requests are timing out or to increase to reduce the number of API calls. Defaults to 100.

sort

Sorts the repositories returned by the specified attribute. Valid values include stars, fork, and updated. Defaults to updated.

See also


Return

A collection of values returned by getRepositories.

Parameters

argument

Builder for com.pulumi.github.kotlin.inputs.GetRepositoriesPlainArgs.

See also