@@ -8,13 +8,13 @@ function Repair-PullRequestTest {
8
8
and replaces failing tests with working versions from the Development branch, then runs
9
9
Update-PesterTest to migrate them properly.
10
10
11
- . PARAMETER PRNumber
11
+ . PARAMETER PullRequest
12
12
Specific PR number to process. If not specified, processes all open PRs with failures.
13
13
14
14
. PARAMETER AutoCommit
15
15
If specified, automatically commits the fixes made by the repair process.
16
16
17
- . PARAMETER MaxPRs
17
+ . PARAMETER Limit
18
18
Maximum number of PRs to process. Default: 5
19
19
20
20
. PARAMETER BuildId
@@ -41,19 +41,19 @@ function Repair-PullRequestTest {
41
41
Checks all open PRs and fixes failing tests using Claude.
42
42
43
43
. EXAMPLE
44
- PS C:\> Repair-PullRequestTest -PRNumber 9234 -AutoCommit
44
+ PS C:\> Repair-PullRequestTest -PullRequest 9234 -AutoCommit
45
45
Fixes failing tests in PR #9234 and automatically commits the changes.
46
46
47
47
. EXAMPLE
48
- PS C:\> Repair-PullRequestTest -PRNumber 9234 -BuildId 12345
48
+ PS C:\> Repair-PullRequestTest -PullRequest 9234 -BuildId 12345
49
49
Fixes failing tests in PR #9234 using AppVeyor build #12345 instead of the latest build.
50
50
51
51
. EXAMPLE
52
52
PS C:\> Repair-PullRequestTest -BuildId 12345
53
53
Fixes failing tests from AppVeyor build #12345 across all relevant PRs.
54
54
55
55
. EXAMPLE
56
- PS C:\> Repair-PullRequestTest -PRNumber 9234 -Pattern "Remove-Dba"
56
+ PS C:\> Repair-PullRequestTest -PullRequest 9234 -Pattern "Remove-Dba"
57
57
Fixes failing tests in PR #9234, but only processes failures matching "Remove-Dba".
58
58
59
59
. EXAMPLE
@@ -62,9 +62,9 @@ function Repair-PullRequestTest {
62
62
#>
63
63
[CmdletBinding (SupportsShouldProcess )]
64
64
param (
65
- [int ]$PRNumber ,
65
+ [int ]$PullRequest ,
66
66
[switch ]$AutoCommit ,
67
- [int ]$MaxPRs = 5 ,
67
+ [int ]$Limit = 5 ,
68
68
[int ]$BuildId ,
69
69
[switch ]$CopyOnly ,
70
70
[string ]$Pattern
@@ -120,10 +120,10 @@ function Repair-PullRequestTest {
120
120
Write-Verbose " Fetching open pull requests..."
121
121
Write-Progress - Activity " Repairing Pull Request Tests" - Status " Fetching open PRs..." - PercentComplete 0
122
122
123
- if ($PRNumber ) {
124
- $prsJson = gh pr view $PRNumber -- json " number,title,headRefName,state,statusCheckRollup,files" 2> $null
123
+ if ($PullRequest ) {
124
+ $prsJson = gh pr view $PullRequest -- json " number,title,headRefName,state,statusCheckRollup,files" 2> $null
125
125
if (-not $prsJson ) {
126
- throw " Could not fetch PR #$PRNumber "
126
+ throw " Could not fetch PR #$PullRequest "
127
127
}
128
128
$prs = @ ($prsJson | ConvertFrom-Json )
129
129
} else {
@@ -136,7 +136,7 @@ function Repair-PullRequestTest {
136
136
$prs = @ ($currentBranchPR | ConvertFrom-Json )
137
137
} else {
138
138
Write-Verbose " No PR found for current branch, fetching all open PRs"
139
- $prsJson = gh pr list -- state open -- limit $MaxPRs -- json " number,title,headRefName,state,statusCheckRollup" 2> $null
139
+ $prsJson = gh pr list -- state open -- limit $Limit -- json " number,title,headRefName,state,statusCheckRollup" 2> $null
140
140
$prs = $prsJson | ConvertFrom-Json
141
141
142
142
# For each PR, get the files changed (since pr list doesn't include files)
@@ -175,7 +175,7 @@ function Repair-PullRequestTest {
175
175
176
176
# Use the first PR for branch operations (or current branch if no PR specified)
177
177
$selectedPR = $prs | Select-Object - First 1
178
- if (-not $selectedPR -and -not $PRNumber ) {
178
+ if (-not $selectedPR -and -not $PullRequest ) {
179
179
# No PR context, stay on current branch
180
180
$selectedPR = @ {
181
181
number = " current"
0 commit comments