Skip to content

Commit

Permalink
Adding support for Pull Request API (#102)
Browse files Browse the repository at this point in the history
* Adding support for Pull Request API

* Updating version, tags and change log.
  • Loading branch information
brianschmitt authored and DarqueWarrior committed Sep 26, 2018
1 parent 3c09630 commit 3864fb5
Show file tree
Hide file tree
Showing 12 changed files with 661 additions and 8 deletions.
77 changes: 77 additions & 0 deletions .docs/Get-VSTeamPullRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!-- #include "./common/header.md" -->

# Get-VSTeamPullRequest

## SYNOPSIS

<!-- #include "./synopsis/Get-VSTeamWorkItem.md" -->

## SYNTAX

## DESCRIPTION

<!-- #include "./synopsis/Get-VSTeamWorkItem.md" -->

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------

```PowerShell
PS C:\> Get-VSTeamPullRequest
```

This command returns all the open pull requests for your TFS or Team Services account.

### -------------------------- EXAMPLE 2 --------------------------

```PowerShell
PS C:\> Get-VSTeamPullRequest -ProjectName Demo
```

This command returns all the open pull requests for the Demo team project.

### -------------------------- EXAMPLE 3 --------------------------

```PowerShell
PS C:\> Get-VSTeamPullRequest -Id 123
```

This command gets the pull request with an Id of 123.

## PARAMETERS

### -ProjectName

Specifies the team project for which this function operates.

You can tab complete from a list of available projects.

You can use Set-VSTeamDefaultProject to set a default project so
you do not have to pass the ProjectName with each call.

```yaml
Type: String
Required: false
Position: 0
Accept pipeline input: true (ByPropertyName)
```
### -Id
Specifies the pull request by ID.
```yaml
Type: String
Aliases: PullRequestId
Accept pipeline input: true (ByPropertyName)
```
## INPUTS
## OUTPUTS
## NOTES
## RELATED LINKS
[Show-VSTeamPullRequest](Show-VSTeamPullRequest.md)
58 changes: 58 additions & 0 deletions .docs/Show-VSTeamPullRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!-- #include "./common/header.md" -->

# Show-VSTeamPullRequest

## SYNOPSIS

<!-- #include "./synopsis/Show-VSTeamPullRequest.md" -->

## SYNTAX

## DESCRIPTION

<!-- #include "./synopsis/Show-VSTeamPullRequest.md" -->

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------

```PowerShell
PS C:\> Show-VSTeamPullRequest 3
```

This command will open a web browser with the pull request id of 3.

### -------------------------- EXAMPLE 2 --------------------------

```PowerShell
PS C:\> Show-VSTeamPullRequest -Id 3
```

This command will open a web browser with the pull request id of 3.

## PARAMETERS

### -PullRequestId

Specifies pull request by ID.

```yaml
Type: Int32
Aliases: PullRequestId
Required: True
Accept pipeline input: true (ByPropertyName)
```
## INPUTS
## OUTPUTS
### Team.Release
## NOTES
You can pipe the pull request ID to this function.
## RELATED LINKS
[Get-VSTeamPullRequest](Get-VSTeamPullRequest.md)
1 change: 1 addition & 0 deletions .docs/synopsis/Get-VSTeamPullRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Returns one or more open pull requests from your team, project, or Id.
1 change: 1 addition & 0 deletions .docs/synopsis/Show-VSTeamPullRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Opens the pull request in the default browser.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 4.0.9

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/102) from [Brian Schmitt](https://github.com/brianschmitt) which included the following:

- Get-VSTeamPullRequest
- Show-VSTeamPullRequest

## 4.0.8

Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/93) from [Kai Walter](https://github.com/KaiWalter) which included the following:
Expand Down
22 changes: 14 additions & 8 deletions VSTeam.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
RootModule = ''

# Version number of this module.
ModuleVersion = '4.0.8'
ModuleVersion = '4.0.9'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -58,7 +58,7 @@
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
ScriptsToProcess = @('src\teamspsdrive.ps1')
ScriptsToProcess = @('src\teamspsdrive.ps1')

# Type files (.ps1xml) to be loaded when importing this module
TypesToProcess = @('types\Approvals.ps1xml',
Expand All @@ -74,7 +74,8 @@
'types\teams.ps1xml',
'types\tfvc.ps1xml',
'types\users.ps1xml',
'types\workitems.ps1xml')
'types\workitems.ps1xml',
'types\pullrequest.ps1xml')

# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = @('formats\Approvals.format.ps1xml',
Expand Down Expand Up @@ -114,7 +115,8 @@
'src\users.psm1',
'src\workitemTypes.psm1',
'src\workitems.psm1',
'.\src\feeds.psm1')
'src\feeds.psm1',
'src\pullrequest.psm1')

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @('Add-VSTeamAzureRMServiceEndpoint',
Expand Down Expand Up @@ -210,7 +212,9 @@
'Get-VSTeamFeed',
'Add-VSTeamFeed',
'Show-VSTeamFeed',
'Remove-VSTeamFeed')
'Remove-VSTeamFeed',
'Get-VSTeamPullRequest',
'Show-VSTeamPullRequest')

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
# CmdletsToExport = @()
Expand Down Expand Up @@ -321,7 +325,9 @@
'Get-Feed',
'Add-Feed',
'Show-Feed',
'Remove-Feed')
'Remove-Feed',
'Get-PullRequest',
'Show-PullRequest')

# DSC resources to export from this module
# DscResourcesToExport = @()
Expand All @@ -338,7 +344,7 @@
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = @('VSTS', 'TFS', 'DevOps', 'VisualStudio', 'TeamServices', 'Team', 'AzureDevOps')
Tags = @('VSTS', 'TFS', 'DevOps', 'VisualStudio', 'TeamServices', 'Team', 'AzureDevOps', 'Pipelines', 'Boards', 'Artifacts', 'Test Plans', 'Repos')

# If you use this you don't need SHiPS in your private repository but the user
# has to install SHiPS manually. If you don't add this SHiPS will be installed
Expand All @@ -349,7 +355,7 @@
# LicenseUri = ''

# A URL to the main website for this project.
ProjectUri = 'https://github.com/DarqueWarrior/vsteam'
ProjectUri = 'https://github.com/DarqueWarrior/vsteam'

# A URL to an icon representing this module.
# IconUri = ''
Expand Down
8 changes: 8 additions & 0 deletions docs/Team.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ Returns the saved profiles.

Returns a list of projects in the Team Services or Team Foundation Server account.

### [Get-VSTeamPullRequest](Get-VSTeamPullRequest.md)

Returns one or more open pull requests from your team, project, or Id.

### [Get-VSTeamQueue](Get-VSTeamQueue.md)

Gets a agent queue.
Expand Down Expand Up @@ -343,6 +347,10 @@ Opens the Git repository in the default browser.

Opens the project in the default browser.

### [Show-VSTeamPullRequest](Show-VSTeamPullRequest.md)

Opens the pull request in the default browser.

### [Show-VSTeamRelease](Show-VSTeamRelease.md)

Opens the release summary in the default browser.
Expand Down
8 changes: 8 additions & 0 deletions docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ Returns the saved profiles.

Returns a list of projects in the Team Services or Team Foundation Server account.

### [Get-VSTeamPullRequest](Get-VSTeamPullRequest.md)

Returns one or more open pull requests from your team, project, or Id.

### [Get-VSTeamQueue](Get-VSTeamQueue.md)

Gets a agent queue.
Expand Down Expand Up @@ -348,6 +352,10 @@ Opens the Git repository in the default browser.

Opens the project in the default browser.

### [Show-VSTeamPullRequest](Show-VSTeamPullRequest.md)

Opens the pull request in the default browser.

### [Show-VSTeamRelease](Show-VSTeamRelease.md)

Opens the release summary in the default browser.
Expand Down
Loading

0 comments on commit 3864fb5

Please sign in to comment.