< Back

Get-GitHubIssue

Sat Jan 18, 2020 9:35 pm

NAME Get-GitHubIssue



SYNOPSIS

Retrieve Issues from GitHub.





SYNTAX

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>] [-Milestone <String>] [-AssigneeType

<String>] [-Assignee <String>] [-Creator <String>] [-Mentioned <String>] [-MediaType <String>] [-AccessToken

<String>] [-NoStatus] [-WhatIf] [-Confirm] [<CommonParameters>]



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>] [-Milestone <String>] [-AssigneeType <String>] [-Assignee

<String>] [-Creator <String>] [-Mentioned <String>] [-MediaType <String>] [-AccessToken <String>] [-NoStatus]

[-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Retrieve Issues from GitHub.



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





PARAMETERS

-OwnerName <String>

Owner of the repository.

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



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RepositoryName <String>

Name of the repository.

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



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Uri <String>

Uri for the repository.

The OwnerName and RepositoryName will be extracted from here instead of needing to provide

them individually.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OrganizationName <String>

The organization whose issues should be retrieved.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RepositoryType <String>

all: Retrieve issues across owned, member and org repositories

ownedAndMember: Retrieve issues across owned and member repositories



Required? false

Position? named

Default value All

Accept pipeline input? false

Accept wildcard characters? false



-Issue <Int64>

The number of specic Issue to retrieve. If not supplied, will return back all

Issues for this Repository that match the specified criteria.



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-IgnorePullRequests [<SwitchParameter>]

GitHub treats Pull Requests as Issues. Specify this switch to skip over any

Issue that is actually a Pull Request.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Filter <String>

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.



Required? false

Position? named

Default value Assigned

Accept pipeline input? false

Accept wildcard characters? false



-State <String>

Indicates the state of the issues to return.



Required? false

Position? named

Default value Open

Accept pipeline input? false

Accept wildcard characters? false



-Label <String[]>

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



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Sort <String>

The property to sort the returned Issues by.



Required? false

Position? named

Default value Created

Accept pipeline input? false

Accept wildcard characters? false



-Direction <String>

The direction of the sort.



Required? false

Position? named

Default value Descending

Accept pipeline input? false

Accept wildcard characters? false



-Since <DateTime>

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



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-MilestoneType <String>

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.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Milestone <String>

Only issues with this milestone will be returned.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AssigneeType <String>

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.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Assignee <String>

Only issues assigned to this user will be returned.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Creator <String>

Only issues created by this specified user will be returned.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Mentioned <String>

Only issues that mention this specified user will be returned.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-MediaType <String>

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.



Required? false

Position? named

Default value Raw

Accept pipeline input? false

Accept wildcard characters? false



-AccessToken <String>

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.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-NoStatus [<SwitchParameter>]

If this switch is specified, long-running commands will run on the main thread

with no commandline status update. When not specified, those commands run in

the background, enabling the command prompt to provide status information.

If not supplied here, the DefaultNoStatus configuration property value will be used.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-GitHubIssue -OwnerName Microsoft -RepositoryName PowerShellForGitHub -State Open



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









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-GitHubIssue -OwnerName Microsoft -RepositoryName PowerShellForGitHub -State All -Assignee Octocat



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











RELATED LINKS