1. Packages
  2. GitHub
  3. API Docs
  4. RepositoryMilestone
GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi

github.RepositoryMilestone

Explore with Pulumi AI

github logo
GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi

    Provides a GitHub repository milestone resource.

    This resource allows you to create and manage milestones for a GitHub Repository within an organization or user account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    // Create a milestone for a repository
    const example = new github.RepositoryMilestone("example", {
        owner: "example-owner",
        repository: "example-repository",
        title: "v1.1.0",
    });
    
    import pulumi
    import pulumi_github as github
    
    # Create a milestone for a repository
    example = github.RepositoryMilestone("example",
        owner="example-owner",
        repository="example-repository",
        title="v1.1.0")
    
    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 {
    		// Create a milestone for a repository
    		_, err := github.NewRepositoryMilestone(ctx, "example", &github.RepositoryMilestoneArgs{
    			Owner:      pulumi.String("example-owner"),
    			Repository: pulumi.String("example-repository"),
    			Title:      pulumi.String("v1.1.0"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a milestone for a repository
        var example = new Github.RepositoryMilestone("example", new()
        {
            Owner = "example-owner",
            Repository = "example-repository",
            Title = "v1.1.0",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.RepositoryMilestone;
    import com.pulumi.github.RepositoryMilestoneArgs;
    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) {
            var example = new RepositoryMilestone("example", RepositoryMilestoneArgs.builder()        
                .owner("example-owner")
                .repository("example-repository")
                .title("v1.1.0")
                .build());
    
        }
    }
    
    resources:
      # Create a milestone for a repository
      example:
        type: github:RepositoryMilestone
        properties:
          owner: example-owner
          repository: example-repository
          title: v1.1.0
    

    Create RepositoryMilestone Resource

    new RepositoryMilestone(name: string, args: RepositoryMilestoneArgs, opts?: CustomResourceOptions);
    @overload
    def RepositoryMilestone(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            description: Optional[str] = None,
                            due_date: Optional[str] = None,
                            owner: Optional[str] = None,
                            repository: Optional[str] = None,
                            state: Optional[str] = None,
                            title: Optional[str] = None)
    @overload
    def RepositoryMilestone(resource_name: str,
                            args: RepositoryMilestoneArgs,
                            opts: Optional[ResourceOptions] = None)
    func NewRepositoryMilestone(ctx *Context, name string, args RepositoryMilestoneArgs, opts ...ResourceOption) (*RepositoryMilestone, error)
    public RepositoryMilestone(string name, RepositoryMilestoneArgs args, CustomResourceOptions? opts = null)
    public RepositoryMilestone(String name, RepositoryMilestoneArgs args)
    public RepositoryMilestone(String name, RepositoryMilestoneArgs args, CustomResourceOptions options)
    
    type: github:RepositoryMilestone
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args RepositoryMilestoneArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RepositoryMilestoneArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RepositoryMilestoneArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RepositoryMilestoneArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RepositoryMilestoneArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    RepositoryMilestone Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The RepositoryMilestone resource accepts the following input properties:

    Owner string
    The owner of the GitHub Repository.
    Repository string
    The name of the GitHub Repository.
    Title string
    The title of the milestone.
    Description string
    A description of the milestone.
    DueDate string
    The milestone due date. In yyyy-mm-dd format.
    State string
    The state of the milestone. Either open or closed. Default: open
    Owner string
    The owner of the GitHub Repository.
    Repository string
    The name of the GitHub Repository.
    Title string
    The title of the milestone.
    Description string
    A description of the milestone.
    DueDate string
    The milestone due date. In yyyy-mm-dd format.
    State string
    The state of the milestone. Either open or closed. Default: open
    owner String
    The owner of the GitHub Repository.
    repository String
    The name of the GitHub Repository.
    title String
    The title of the milestone.
    description String
    A description of the milestone.
    dueDate String
    The milestone due date. In yyyy-mm-dd format.
    state String
    The state of the milestone. Either open or closed. Default: open
    owner string
    The owner of the GitHub Repository.
    repository string
    The name of the GitHub Repository.
    title string
    The title of the milestone.
    description string
    A description of the milestone.
    dueDate string
    The milestone due date. In yyyy-mm-dd format.
    state string
    The state of the milestone. Either open or closed. Default: open
    owner str
    The owner of the GitHub Repository.
    repository str
    The name of the GitHub Repository.
    title str
    The title of the milestone.
    description str
    A description of the milestone.
    due_date str
    The milestone due date. In yyyy-mm-dd format.
    state str
    The state of the milestone. Either open or closed. Default: open
    owner String
    The owner of the GitHub Repository.
    repository String
    The name of the GitHub Repository.
    title String
    The title of the milestone.
    description String
    A description of the milestone.
    dueDate String
    The milestone due date. In yyyy-mm-dd format.
    state String
    The state of the milestone. Either open or closed. Default: open

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RepositoryMilestone resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Number int
    The number of the milestone.
    Id string
    The provider-assigned unique ID for this managed resource.
    Number int
    The number of the milestone.
    id String
    The provider-assigned unique ID for this managed resource.
    number Integer
    The number of the milestone.
    id string
    The provider-assigned unique ID for this managed resource.
    number number
    The number of the milestone.
    id str
    The provider-assigned unique ID for this managed resource.
    number int
    The number of the milestone.
    id String
    The provider-assigned unique ID for this managed resource.
    number Number
    The number of the milestone.

    Look up Existing RepositoryMilestone Resource

    Get an existing RepositoryMilestone resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RepositoryMilestoneState, opts?: CustomResourceOptions): RepositoryMilestone
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            due_date: Optional[str] = None,
            number: Optional[int] = None,
            owner: Optional[str] = None,
            repository: Optional[str] = None,
            state: Optional[str] = None,
            title: Optional[str] = None) -> RepositoryMilestone
    func GetRepositoryMilestone(ctx *Context, name string, id IDInput, state *RepositoryMilestoneState, opts ...ResourceOption) (*RepositoryMilestone, error)
    public static RepositoryMilestone Get(string name, Input<string> id, RepositoryMilestoneState? state, CustomResourceOptions? opts = null)
    public static RepositoryMilestone get(String name, Output<String> id, RepositoryMilestoneState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    A description of the milestone.
    DueDate string
    The milestone due date. In yyyy-mm-dd format.
    Number int
    The number of the milestone.
    Owner string
    The owner of the GitHub Repository.
    Repository string
    The name of the GitHub Repository.
    State string
    The state of the milestone. Either open or closed. Default: open
    Title string
    The title of the milestone.
    Description string
    A description of the milestone.
    DueDate string
    The milestone due date. In yyyy-mm-dd format.
    Number int
    The number of the milestone.
    Owner string
    The owner of the GitHub Repository.
    Repository string
    The name of the GitHub Repository.
    State string
    The state of the milestone. Either open or closed. Default: open
    Title string
    The title of the milestone.
    description String
    A description of the milestone.
    dueDate String
    The milestone due date. In yyyy-mm-dd format.
    number Integer
    The number of the milestone.
    owner String
    The owner of the GitHub Repository.
    repository String
    The name of the GitHub Repository.
    state String
    The state of the milestone. Either open or closed. Default: open
    title String
    The title of the milestone.
    description string
    A description of the milestone.
    dueDate string
    The milestone due date. In yyyy-mm-dd format.
    number number
    The number of the milestone.
    owner string
    The owner of the GitHub Repository.
    repository string
    The name of the GitHub Repository.
    state string
    The state of the milestone. Either open or closed. Default: open
    title string
    The title of the milestone.
    description str
    A description of the milestone.
    due_date str
    The milestone due date. In yyyy-mm-dd format.
    number int
    The number of the milestone.
    owner str
    The owner of the GitHub Repository.
    repository str
    The name of the GitHub Repository.
    state str
    The state of the milestone. Either open or closed. Default: open
    title str
    The title of the milestone.
    description String
    A description of the milestone.
    dueDate String
    The milestone due date. In yyyy-mm-dd format.
    number Number
    The number of the milestone.
    owner String
    The owner of the GitHub Repository.
    repository String
    The name of the GitHub Repository.
    state String
    The state of the milestone. Either open or closed. Default: open
    title String
    The title of the milestone.

    Import

    A GitHub Repository Milestone can be imported using an ID made up of owner/repository/number, e.g.

    $ pulumi import github:index/repositoryMilestone:RepositoryMilestone example example-owner/example-repository/1
    

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    GitHub v6.1.0 published on Monday, Mar 11, 2024 by Pulumi