You will need an access token from azure devops. Get yours here. This script will need contributor access to the project in question.
# populate user map in Map-IssueToWorkitem| [Reflection.Assembly]::Load(“Microsoft.TeamFoundation.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); | |
| [Reflection.Assembly]::Load(“Microsoft.TeamFoundation.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); | |
| [Reflection.Assembly]::Load(“Microsoft.TeamFoundation.Lab.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); | |
| [Reflection.Assembly]::Load(“Microsoft.TeamFoundation.Lab.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); | |
| [Reflection.Assembly]::Load(“Microsoft.TeamFoundation.VersionControl.Client, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”); | |
| $tfsCollectionUrl = New-Object System.URI("http://TFSServer:8080/tfs/CollectionName/"); | |
| $tfsCollection = [Microsoft.TeamFoundation.Client.TfsTeamProjectCollectionFactory]::GetTeamProjectCollection($tfsCollectionUrl); | |
| $versionControl = $tfsCollection.GetService([Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer]); |
| properties { | |
| $dir = @{ | |
| base = (Get-Item -Path $psake.build_script_dir).FullName; | |
| src = (Get-Item -Path (Join-Path -Path $psake.build_script_dir -ChildPath '..\')).FullName; | |
| bin = Join-Path -Path $psake.build_script_dir -ChildPath "bin"; | |
| } | |
| [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseDeclaredVarsMoreThanAssignments", "")] | |
| $tool = @{ | |
| mstest = (Get-Item -Path "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MSTest.exe").FullName; | |
| } |
| function Add-HostFileEntry { | |
| [OutputType([String])] | |
| [CmdletBinding( | |
| SupportsShouldProcess=$true, | |
| ConfirmImpact="Medium")] | |
| param ( | |
| [Parameter(Position=1, Mandatory=$true)] | |
| [ValidateNotNullOrEmpty()] | |
| [ValidatePattern("(?# Valid IP Address range 1.1.1.1 - 255.255.255.255)\A(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\z")] |
| Include ".\references.ps1" | |
| properties { | |
| $dir = @{ | |
| msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319"; | |
| src = (Join-Path -Path $psake.build_script_dir -ChildPath '..' | Get-Item).FullName; | |
| } | |
| [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseDeclaredVarsMoreThanAssignments", "")] | |
| $tool = @{ | |
| msbuild = (Join-Path -Path 'C:\Program Files (x86)\MSBuild\14.0\Bin' -ChildPath 'MSBuild.exe' | Get-Item).FullName; |
| function Test-TimedProcessFunction { | |
| [OutputType([String])] | |
| [CmdletBinding( | |
| SupportsShouldProcess=$true, | |
| ConfirmImpact="None" | |
| )] | |
| param ( | |
| [Parameter(Position=1, Mandatory=$true, ValueFromPipeline=$true)] | |
| [ValidateNotNullOrEmpty()] | |
| [string]$Name, |
| function Test-Function { | |
| [OutputType([String])] | |
| [CmdletBinding( | |
| SupportsShouldProcess=$true, | |
| ConfirmImpact="None" | |
| )] | |
| param ( | |
| [Parameter(Position=1, Mandatory=$true, ValueFromPipeline=$true)] | |
| [ValidateNotNullOrEmpty()] | |
| [string]$Name |
You will need an access token from azure devops. Get yours here. This script will need contributor access to the project in question.
# populate user map in Map-IssueToWorkitem| # Outside of shell | |
| # - Create project directory | |
| # - git init | |
| # - open in vs code >code . | |
| # - Using remote container extensions create new development container | |
| # - Using dotnet core 3.1 or later container template | |
| # - Re-open in container and run the script below | |
| dotnet new sln | |
| dotnet new xunit -n Application.IntegrationTests -o ./tests/Application.IntegrationTests |
This took me a while to get going to pass the "api-version": "2025-01-01-preview" and then I kept hitting MAX TOKEN LENGTH issues when using a smaller model.
opencode.json file:
"I did this is my WSL instance"
mkdir -p ~/.config/opencode/
touch ~/.config/opencode/opencode.json
code ~/.config/opencode/opencode.json