1. Packages
  2. Github Provider
  3. API Docs
  4. getRepositoryMilestone
GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi

github.getRepositoryMilestone

Explore with Pulumi AI

GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi

Use this data source to retrieve information about a specific GitHub milestone in a repository.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

const example = github.getRepositoryMilestone({
    owner: "example-owner",
    repository: "example-repository",
    number: 1,
});
Copy
import pulumi
import pulumi_github as github

example = github.get_repository_milestone(owner="example-owner",
    repository="example-repository",
    number=1)
Copy
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.LookupRepositoryMilestone(ctx, &github.LookupRepositoryMilestoneArgs{
			Owner:      "example-owner",
			Repository: "example-repository",
			Number:     1,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;

return await Deployment.RunAsync(() => 
{
    var example = Github.GetRepositoryMilestone.Invoke(new()
    {
        Owner = "example-owner",
        Repository = "example-repository",
        Number = 1,
    });

});
Copy
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.GetRepositoryMilestoneArgs;
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.getRepositoryMilestone(GetRepositoryMilestoneArgs.builder()
            .owner("example-owner")
            .repository("example-repository")
            .number(1)
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: github:getRepositoryMilestone
      arguments:
        owner: example-owner
        repository: example-repository
        number: 1
Copy

Using getRepositoryMilestone

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getRepositoryMilestone(args: GetRepositoryMilestoneArgs, opts?: InvokeOptions): Promise<GetRepositoryMilestoneResult>
function getRepositoryMilestoneOutput(args: GetRepositoryMilestoneOutputArgs, opts?: InvokeOptions): Output<GetRepositoryMilestoneResult>
Copy
def get_repository_milestone(number: Optional[int] = None,
                             owner: Optional[str] = None,
                             repository: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetRepositoryMilestoneResult
def get_repository_milestone_output(number: Optional[pulumi.Input[int]] = None,
                             owner: Optional[pulumi.Input[str]] = None,
                             repository: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryMilestoneResult]
Copy
func LookupRepositoryMilestone(ctx *Context, args *LookupRepositoryMilestoneArgs, opts ...InvokeOption) (*LookupRepositoryMilestoneResult, error)
func LookupRepositoryMilestoneOutput(ctx *Context, args *LookupRepositoryMilestoneOutputArgs, opts ...InvokeOption) LookupRepositoryMilestoneResultOutput
Copy

> Note: This function is named LookupRepositoryMilestone in the Go SDK.

public static class GetRepositoryMilestone 
{
    public static Task<GetRepositoryMilestoneResult> InvokeAsync(GetRepositoryMilestoneArgs args, InvokeOptions? opts = null)
    public static Output<GetRepositoryMilestoneResult> Invoke(GetRepositoryMilestoneInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRepositoryMilestoneResult> getRepositoryMilestone(GetRepositoryMilestoneArgs args, InvokeOptions options)
public static Output<GetRepositoryMilestoneResult> getRepositoryMilestone(GetRepositoryMilestoneArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: github:index/getRepositoryMilestone:getRepositoryMilestone
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Number This property is required. int
The number of the milestone.
Owner This property is required. string
Owner of the repository.
Repository This property is required. string
Name of the repository to retrieve the milestone from.
Number This property is required. int
The number of the milestone.
Owner This property is required. string
Owner of the repository.
Repository This property is required. string
Name of the repository to retrieve the milestone from.
number This property is required. Integer
The number of the milestone.
owner This property is required. String
Owner of the repository.
repository This property is required. String
Name of the repository to retrieve the milestone from.
number This property is required. number
The number of the milestone.
owner This property is required. string
Owner of the repository.
repository This property is required. string
Name of the repository to retrieve the milestone from.
number This property is required. int
The number of the milestone.
owner This property is required. str
Owner of the repository.
repository This property is required. str
Name of the repository to retrieve the milestone from.
number This property is required. Number
The number of the milestone.
owner This property is required. String
Owner of the repository.
repository This property is required. String
Name of the repository to retrieve the milestone from.

getRepositoryMilestone Result

The following output properties are available:

Description string
Description of the milestone.
DueDate string
The milestone due date (in ISO-8601 yyyy-mm-dd format).
Id string
The provider-assigned unique ID for this managed resource.
Number int
Owner string
Repository string
State string
State of the milestone.
Title string
Title of the milestone.
Description string
Description of the milestone.
DueDate string
The milestone due date (in ISO-8601 yyyy-mm-dd format).
Id string
The provider-assigned unique ID for this managed resource.
Number int
Owner string
Repository string
State string
State of the milestone.
Title string
Title of the milestone.
description String
Description of the milestone.
dueDate String
The milestone due date (in ISO-8601 yyyy-mm-dd format).
id String
The provider-assigned unique ID for this managed resource.
number Integer
owner String
repository String
state String
State of the milestone.
title String
Title of the milestone.
description string
Description of the milestone.
dueDate string
The milestone due date (in ISO-8601 yyyy-mm-dd format).
id string
The provider-assigned unique ID for this managed resource.
number number
owner string
repository string
state string
State of the milestone.
title string
Title of the milestone.
description str
Description of the milestone.
due_date str
The milestone due date (in ISO-8601 yyyy-mm-dd format).
id str
The provider-assigned unique ID for this managed resource.
number int
owner str
repository str
state str
State of the milestone.
title str
Title of the milestone.
description String
Description of the milestone.
dueDate String
The milestone due date (in ISO-8601 yyyy-mm-dd format).
id String
The provider-assigned unique ID for this managed resource.
number Number
owner String
repository String
state String
State of the milestone.
title String
Title of the milestone.

Package Details

Repository
GitHub pulumi/pulumi-github
License
Apache-2.0
Notes
This Pulumi package is based on the github Terraform Provider.
GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi