Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing Dynamic parameters #275

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
33fe74a
Add parameter classes
Jan 20, 2020
95860f6
import classes via PSD1, add exportFunctions list
Jan 20, 2020
a265bc7
Replace dynamic parameters with clasess
Jan 20, 2020
a42840a
Move _Supports* functionality into calling fn
Jan 21, 2020
da9245e
remove _isonwindows
Jan 21, 2020
2beaa35
remove _applyTypes
Jan 21, 2020
978e0cc
fix break of Add-VSteamWorkItem, improve build
Jan 21, 2020
1fd09ed
Merge remote-tracking branch 'upstream/master'
jhoneill Feb 27, 2020
c27dc5f
Use Invoke-VSTeamRequest externally and make _callApi Private again
jhoneill Feb 28, 2020
688bdf4
Auto-update of md help with 6.4.4 changes
Feb 28, 2020
e2bb372
Allow $env:testing to bypass validation checks
Feb 28, 2020
3467ddd
fix issue Getting build artifacts with no properties field
Feb 28, 2020
427114f
Fix regressions and modify mocking in tests to work with new classes
jhoneill Mar 1, 2020
d1bc72f
ensure validator doesn't break tests fix a couple more regressions & …
jhoneill Mar 1, 2020
99871e2
Merge remote-tracking branch 'upstream/master'
jhoneill Mar 1, 2020
7af8dab
Merge remote-tracking branch 'upstream/master'
jhoneill Mar 1, 2020
2fab630
Tidy class loading - Merge classes to PSM1 file.
Mar 17, 2020
51d9b49
Merge remote-tracking branch 'upstream/master'
jhoneill Mar 17, 2020
9d53c00
fix ProcessCompleter
Mar 17, 2020
e990b83
fix ProcessCompleter
Mar 17, 2020
80fcb5f
Merge branch 'master' of https://github.com/jhoneill/vsteam
jhoneill Mar 17, 2020
2608b10
Fixed tests to not mix source & built files.
Mar 18, 2020
fed84c4
Re-introduced a mockable to help one test (CI has 3 param not founds …
jhoneill Mar 19, 2020
abdb3a1
Fix build when file encodings are mixed
jhoneill Mar 31, 2020
2dea841
Merge remote-tracking branch 'upstream/master'
jhoneill Apr 7, 2020
615f08e
Merge remote-tracking branch 'upstream/master'
jhoneill Apr 28, 2020
bc18fa0
Meged update up to #283 from Upstream
jhoneill Apr 28, 2020
8a2ee54
Remove strict mode see DarqueWarrior/vsteam # 296
Apr 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
224 changes: 112 additions & 112 deletions .docs/Get-VSTeamBuildTimeline.md
Original file line number Diff line number Diff line change
@@ -1,113 +1,113 @@
<!-- #include "./common/header.md" -->

# Get-VSTeamBuildTimeline

## SYNOPSIS

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

## SYNTAX

## DESCRIPTION

The Get-VSTeamBuildTimeline function gets the timelines for a build.

With just a project name and the build id, this function gets all the timelines of a build for that team project.

You can also specify a particular timeline by ID to get .

## EXAMPLES

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

```PowerShell
PS C:\> Get-VSTeamBuildTimeline -ProjectName demo -BuildId 1 | Format-List *
```

This command gets a list of all timelines of thr build with Id 1 in the demo project.

The pipeline operator (|) passes the data to the Format-List cmdlet, which
displays all available properties (*) of the timeline objects.

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

```PowerShell
PS C:\> Get-VSTeamBuildTimeline -ProjectName demo -BuildId 1 -Id 595dac0c-0f1a-4bfd-a35f-e5a838ac71d7 -ChangeId 2 -PlanId 356de525-47a9-4251-80c6-d3849a9d6382
```

This command gets the timelines with ID 1 and timeline id 595dac0c-0f1a-4bfd-a35f-e5a838ac71d7. It is filtered with the change ID and plan ID.

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

```PowerShell
PS C:\> Get-VSTeamBuildTimeline -ProjectName demo -BuildId 1 -ID @(1,2)
```

This command gets timelines with IDs 1 and 2 by using the ID parameter.

## PARAMETERS

<!-- #include "./params/projectName.md" -->

### -BuildId

Build id where you get the time line from

```yaml
Type: int[]
Parameter Sets: ByID
```

### -Id

Returns the timelines with the given timeline id.

```yaml
Type: Guid
Aliases: TimelineId
Parameter Sets: ByID
```

### -ChangeId

Returns the timelines with the given change id.

```yaml
Type: Int32
Parameter Sets: ByID
```

### -PlanId

Returns the timelines with the given plan id.

```yaml
Type: Guid
Parameter Sets: ByID
```

<!-- #include "./params/BuildIds.md" -->

## INPUTS

## OUTPUTS

### Team.Build

## NOTES

This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets builds.

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.

You can pipe build IDs to this function.

## RELATED LINKS

[Set-VSTeamAccount](Set-VSTeamAccount.md)

[Set-VSTeamDefaultProject](Set-VSTeamDefaultProject.md)

<!-- #include "./common/header.md" -->
# Get-VSTeamBuildTimeline
## SYNOPSIS
<!-- #include "./synopsis/Get-VSTeamBuildTimeline.md" -->
## SYNTAX
## DESCRIPTION
The Get-VSTeamBuildTimeline function gets the timelines for a build.
With just a project name and the build id, this function gets all the timelines of a build for that team project.
You can also specify a particular timeline by ID to get .
## EXAMPLES
### -------------------------- EXAMPLE 1 --------------------------
```PowerShell
PS C:\> Get-VSTeamBuildTimeline -ProjectName demo -BuildId 1 | Format-List *
```
This command gets a list of all timelines of thr build with Id 1 in the demo project.
The pipeline operator (|) passes the data to the Format-List cmdlet, which
displays all available properties (*) of the timeline objects.
### -------------------------- EXAMPLE 2 --------------------------
```PowerShell
PS C:\> Get-VSTeamBuildTimeline -ProjectName demo -BuildId 1 -Id 595dac0c-0f1a-4bfd-a35f-e5a838ac71d7 -ChangeId 2 -PlanId 356de525-47a9-4251-80c6-d3849a9d6382
```
This command gets the timelines with ID 1 and timeline id 595dac0c-0f1a-4bfd-a35f-e5a838ac71d7. It is filtered with the change ID and plan ID.
### -------------------------- EXAMPLE 3 --------------------------
```PowerShell
PS C:\> Get-VSTeamBuildTimeline -ProjectName demo -BuildId 1 -ID @(1,2)
```
This command gets timelines with IDs 1 and 2 by using the ID parameter.
## PARAMETERS
<!-- #include "./params/projectName.md" -->
### -BuildId
Build id where you get the time line from
```yaml
Type: int[]
Parameter Sets: ByID
```
### -Id
Returns the timelines with the given timeline id.
```yaml
Type: Guid
Aliases: TimelineId
Parameter Sets: ByID
```
### -ChangeId
Returns the timelines with the given change id.
```yaml
Type: Int32
Parameter Sets: ByID
```
### -PlanId
Returns the timelines with the given plan id.
```yaml
Type: Guid
Parameter Sets: ByID
```
<!-- #include "./params/BuildIds.md" -->
## INPUTS
## OUTPUTS
### Team.Build
## NOTES
This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets builds.
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.
You can pipe build IDs to this function.
## RELATED LINKS
[Set-VSTeamAccount](Set-VSTeamAccount.md)
[Set-VSTeamDefaultProject](Set-VSTeamDefaultProject.md)
[Get-VSTeamBuild](Get-VSTeamBuild.md)
3 changes: 0 additions & 3 deletions .editorconfig

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Source/Classes/vsteam.classes.ps1
/dist
test-results.xml
coverage.xml
.editorconfig
.vscode/settings.json
.DS_Store
._.DS_Store
**/.DS_Store
Expand Down
19 changes: 5 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,9 @@
"vssgp",
"vssps"
],
"workbench.colorCustomizations": {
"activityBar.background": "#007699",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#ff80e2",
"activityBarBadge.foreground": "#15202b",
"titleBar.activeBackground": "#004f66",
"titleBar.inactiveBackground": "#004f6699",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveForeground": "#e7e7e799",
"statusBar.background": "#004f66",
"statusBarItem.hoverBackground": "#007699",
"statusBar.foreground": "#e7e7e7"
}
"terminal.integrated.commandsToSkipShell": [
"PowerShell.RunSelection",
"workbench.action.files.save",
"workbench.action.files.newUntitled"
]
}
26 changes: 17 additions & 9 deletions Build-Module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,22 @@ if ($buildHelp.IsPresent) {
}

Write-Output 'Publishing about help files'
Copy-Item -Path ./Source/en-US -Destination "$output/" -Recurse -Force
Copy-Item -Path ./Source/VSTeam.psm1 -Destination "$output/VSTeam.psm1" -Force
Copy-Item -Path ./Source/en-US -Destination "$output/" -Recurse -Force
Copy-Item -Path ./Source/VSTeam.psd1 -Destination "$output/VSTeam.psd1" -Force

Write-Output 'Updating Functions To Export'

Get-Content -Path ./Source/VSTeam.psm1 | Out-File -Append -FilePath "$output/VSTeam.psm1" -Encoding ascii
<#Write-Output 'Updating Functions To Export'
$newValue = ((Get-ChildItem -Path "./Source/Public" -Filter '*.ps1').BaseName |
ForEach-Object -Process { Write-Output "'$_'" }) -join ','
#>

(Get-Content "./Source/VSTeam.psd1") -Replace ("FunctionsToExport.+", "FunctionsToExport = ($newValue)") | Set-Content "$output/VSTeam.psd1"
$PSDsettings = Import-PowerShellDataFile -path "./Source/VSTeam.psd1"
Write-Output 'Updating Functions To Export'
$FunctionsToExport = @()
$FunctionsToExport += $PSDsettings.FunctionsToExport.where({$_ -like "_*"})
$FunctionsToExport += (Get-ChildItem -Path "./Source/Public" -Filter '*.ps1').BaseName
Update-ModuleManifest -Path "$output/VSTeam.psd1" -FunctionsToExport $FunctionsToExport

Write-Output "Publish complete to $output"

Expand All @@ -100,19 +108,19 @@ if ($ipmo.IsPresent -or $runTests.IsPresent) {
if ((Get-Module VSTeam)) {
Remove-Module VSTeam
}

Import-Module "$output/VSTeam.psd1" -Force
$env:testing = $true
Import-Module "$output/VSTeam.psd1" -Global -Force
Set-VSTeamAlias
}

# run the unit tests with Pester
if ($runTests.IsPresent) {
if ($null -eq $(Get-Module -Name Pester)) {
if ($null -eq $(Get-Module -ListAvailable Pester)) {
Install-Module -Name Pester -Repository PSGallery -Force -Scope CurrentUser -AllowClobber -SkipPublisherCheck
}

$pesterArgs = @{
Script = '.\unit'
Script = '.\unit'
OutputFile = 'test-results.xml'
OutputFormat = 'NUnitXml'
Show = 'Fails'
Expand All @@ -136,7 +144,7 @@ if ($runTests.IsPresent) {
$pesterArgs.PassThru = $true
}

Invoke-Pester @pesterArgs
Invoke-Pester @pesterArgs
}

# Run this last so the results can be seen even if tests were also run
Expand Down
Loading