Skip to content

Get GitHubIssue

Howard Wolosky edited this page Oct 5, 2020 · 1 revision

Get-GitHubIssue

SYNOPSIS

Retrieve Issues from GitHub.

SYNTAX

Elements (Default)

Get-GitHubIssue [-OwnerName <String>] [-RepositoryName <String>] [-OrganizationName <String>]
 [-RepositoryType <String>] [-Issue <Int64>] [-IgnorePullRequests] [-Filter <String>] [-State <String>]
 [-Label <String[]>] [-Sort <String>] [-Direction <String>] [-Since <DateTime>] [-MilestoneType <String>]
 [-MilestoneNumber <Int64>] [-AssigneeType <String>] [-Assignee <String>] [-Creator <String>]
 [-Mentioned <String>] [-MediaType <String>] [-AccessToken <String>] [<CommonParameters>]

Uri

Get-GitHubIssue -Uri <String> [-OrganizationName <String>] [-RepositoryType <String>] [-Issue <Int64>]
 [-IgnorePullRequests] [-Filter <String>] [-State <String>] [-Label <String[]>] [-Sort <String>]
 [-Direction <String>] [-Since <DateTime>] [-MilestoneType <String>] [-MilestoneNumber <Int64>]
 [-AssigneeType <String>] [-Assignee <String>] [-Creator <String>] [-Mentioned <String>] [-MediaType <String>]
 [-AccessToken <String>] [<CommonParameters>]

DESCRIPTION

Retrieve Issues from GitHub.

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

EXAMPLES

EXAMPLE 1

Get-GitHubIssue -OwnerName microsoft -RepositoryName PowerShellForGitHub -State Open

Gets all the currently open issues in the microsoft\PowerShellForGitHub repository.

EXAMPLE 2

Get-GitHubIssue -OwnerName microsoft -RepositoryName PowerShellForGitHub -State All -Assignee Octocat

Gets every issue in the microsoft\PowerShellForGitHub repository that is assigned to Octocat.

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

-Assignee

Only issues assigned to this user will be returned.

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

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

-AssigneeType

If specified, indicates who Issues must be assigned to in order to be returned: specific: Only issues assigned to the user specified by the Assignee parameter will be returned. all: Issues assigned to any user will be returned. none: Only issues without an assigned user will be returned.

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

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

-Creator

Only issues created by this specified user will be returned.

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

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

-Direction

The direction of the sort.

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

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

-Filter

Indicates the type of Issues to return: assigned: Issues assigned to the authenticated user. created: Issues created by the authenticated user. mentioned: Issues mentioning the authenticated user. subscribed: Issues the authenticated user has been subscribed to updates for. all: All issues the authenticated user can see, regardless of participation or creation.

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

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

-IgnorePullRequests

GitHub treats Pull Requests as Issues. Specify this switch to skip over any Issue that is actually a Pull Request.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Issue

The number of specific Issue to retrieve. If not supplied, will return back all Issues for this Repository that match the specified criteria.

Type: System.Int64
Parameter Sets: (All)
Aliases: IssueNumber

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

-Label

The label (or labels) that returned Issues should have.

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

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

-MediaType

The format in which the API will return the body of the issue.

Raw - Return the raw markdown body. Response will include body. This is the default if you do not pass any specific media type. Text - Return a text only representation of the markdown body. Response will include body_text. Html - Return HTML rendered from the body's markdown. Response will include body_html. Full - Return raw, text and HTML representations. Response will include body, body_text, and body_html.

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

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

-Mentioned

Only issues that mention this specified user will be returned.

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

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

-MilestoneNumber

Only issues with this milestone will be returned.

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

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

-MilestoneType

If specified, indicates what milestone Issues must be a part of to be returned: specific: Only issues with the milestone specified via the Milestone parameter will be returned. all: All milestones will be returned. none: Only issues without milestones will be returned.

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

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

-OrganizationName

The organization whose issues should be retrieved.

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

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
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: Elements
Aliases:

Required: False
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: Elements
Aliases:

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

-RepositoryType

all: Retrieve issues across owned, member and org repositories ownedAndMember: Retrieve issues across owned and member repositories

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

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

-Since

If specified, returns only issues updated at or after this time.

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

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

-Sort

The property to sort the returned Issues by.

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

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

-State

Indicates the state of the issues to return.

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

Required: False
Position: Named
Default value: Open
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: Uri
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

GitHub.User

OUTPUTS

GitHub.Issue

NOTES

RELATED LINKS

PowerShellForGitHub

Docs

PowerShellForGitHub

Functions

Clone this wiki locally