Get-GitHubPullRequests¶
SYNOPSIS¶
Gets pull request information from a given GitHub repository.
SYNTAX¶
Get-GitHubPullRequests -Token <String> [-RepositoryOwner] <String> [-RepositoryName] <String>
[[-State] <GitHubIssueState>] [<CommonParameters>]
DESCRIPTION¶
This cmdlet will return a list of pull requests from a given GitHub repository.
You are able to get both open and closed pull requests.
EXAMPLES¶
Example 1: Open Pull Requests¶
Get-GitHubPullRequests -GitHubToken $MyToken -GitHubOrg "Brownserve-UK" -RepoName "Brownserve.PSTools" -State Open
This would return all open pull requests from the Brownserve-UK/Brownserve.PSTools repository
Example 2: Closed Pull Requests¶
Get-GitHubPullRequests -GitHubToken $MyToken -GitHubOrg "Brownserve-UK" -RepoName "Brownserve.PSTools" -State Closed
This would return all closed/merged pull requests from the Brownserve-UK/Brownserve.PSTools repository
Example 3: All Pull Requests¶
Get-GitHubPullRequests -GitHubToken $MyToken -GitHubOrg "Brownserve-UK" -RepoName "Brownserve.PSTools" -State All
This would return all open, closed and merged pull requests from the Brownserve-UK/Brownserve.PSTools repository
PARAMETERS¶
-RepositoryName¶
The name of the repository to check for pull requests
Type: String
Parameter Sets: (All)
Aliases: GitHubRepo, RepoName
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-RepositoryOwner¶
The owner of the repository that you want to check for pull requests
Type: String
Parameter Sets: (All)
Aliases: GitHubOrganisation, GitHubOrganization, GitHubOrg
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-State¶
The type of pull requests to retrieve
Type: GitHubIssueState
Parameter Sets: (All)
Aliases:
Accepted values: Open, Closed, All
Required: False
Position: 3
Default value: Open
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Token¶
The GitHub token to use for authentication
Type: String
Parameter Sets: (All)
Aliases: GitHubToken, GitHubPAT
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.