Skip to content

Get GitHubMilestone

Howard Wolosky edited this page Oct 5, 2020 · 2 revisions

Get-GitHubMilestone

SYNOPSIS

Get the milestones for a given GitHub repository.

SYNTAX

RepositoryElements (Default)

Get-GitHubMilestone -OwnerName <String> -RepositoryName <String> [-State <String>] [-Sort <String>]
 [-Direction <String>] [-AccessToken <String>] [<CommonParameters>]

MilestoneElements

Get-GitHubMilestone -OwnerName <String> -RepositoryName <String> -Milestone <Int64> [-AccessToken <String>]
 [<CommonParameters>]

RepositoryUri

Get-GitHubMilestone -Uri <String> [-State <String>] [-Sort <String>] [-Direction <String>]
 [-AccessToken <String>] [<CommonParameters>]

MilestoneUri

Get-GitHubMilestone -Uri <String> -Milestone <Int64> [-AccessToken <String>] [<CommonParameters>]

DESCRIPTION

Get the milestones for a given GitHub repository.

The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub

EXAMPLES

EXAMPLE 1

Get-GitHubMilestone -OwnerName microsoft -RepositoryName PowerShellForGitHub
Get the milestones for the microsoft\PowerShellForGitHub project.

EXAMPLE 2

Get-GitHubMilestone -Uri 'https://github.com/PowerShell/PowerShellForGitHub' -Milestone 1
Get milestone number 1 for the microsoft\PowerShellForGitHub project.

PARAMETERS

-AccessToken

If provided, this will be used as the AccessToken for authentication with the REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Direction

How to list the results. Ignored without the sort parameter.

Type: System.String
Parameter Sets: RepositoryElements, RepositoryUri
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Milestone

The number of a specific milestone to get. If not supplied, will return back all milestones for this repository.

Type: System.Int64
Parameter Sets: MilestoneElements, MilestoneUri
Aliases: MilestoneNumber

Required: True
Position: Named
Default value: 0
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-OwnerName

Owner of the repository. If not supplied here, the DefaultOwnerName configuration property value will be used.

Type: System.String
Parameter Sets: RepositoryElements, MilestoneElements
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RepositoryName

Name of the repository. If not supplied here, the DefaultRepositoryName configuration property value will be used.

Type: System.String
Parameter Sets: RepositoryElements, MilestoneElements
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Sort

How to sort the results.

Type: System.String
Parameter Sets: RepositoryElements, RepositoryUri
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-State

Only milestones with this state are returned.

Type: System.String
Parameter Sets: RepositoryElements, RepositoryUri
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Uri

Uri for the repository. The OwnerName and RepositoryName will be extracted from here instead of needing to provide them individually.

Type: System.String
Parameter Sets: RepositoryUri, MilestoneUri
Aliases: RepositoryUrl

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

GitHub.Branch

GitHub.Content

GitHub.Event

GitHub.Issue

GitHub.IssueComment

GitHub.Label

GitHub.Milestone

GitHub.PullRequest

GitHub.Project

GitHub.ProjectCard

GitHub.ProjectColumn

GitHub.Reaction

GitHub.Release

GitHub.ReleaseAsset

GitHub.Repository

OUTPUTS

GitHub.Milestone

NOTES

RELATED LINKS

PowerShellForGitHub

Docs

PowerShellForGitHub

Functions

Clone this wiki locally