@@ -2,32 +2,34 @@ Set-StrictMode -Version latest
2
2
3
3
. " $PSScriptRoot /common/test-utils.ps1"
4
4
5
- function NonBotCommits ([ Parameter ( Mandatory = $true )][ string ] $branch )
5
+ foreach ( $repoUrl in @ ( ' https://github.com/getsentry/github-workflows ' , ' [email protected] :getsentry/github-workflows.git' ) )
6
6
{
7
- $result = & " $PSScriptRoot /../scripts/nonbot-commits.ps1" `
8
- - RepoUrl ' https://github.com/getsentry/github-workflows' - MainBranch ' main' - PrBranch $branch
9
- if (-not $? )
7
+ function NonBotCommits ([Parameter (Mandatory = $true )][string ] $branch )
10
8
{
11
- throw $result
9
+ $result = & " $PSScriptRoot /../scripts/nonbot-commits.ps1" - RepoUrl $repoUrl - MainBranch ' main' - PrBranch $branch
10
+ if (-not $? )
11
+ {
12
+ throw $result
13
+ }
14
+ elseif ($LASTEXITCODE -ne 0 )
15
+ {
16
+ throw " Script finished with exit code $LASTEXITCODE "
17
+ }
18
+ $result
12
19
}
13
- elseif ($LASTEXITCODE -ne 0 )
14
- {
15
- throw " Script finished with exit code $LASTEXITCODE "
16
- }
17
- $result
18
- }
19
20
20
- RunTest ' empty-if-all-commits-by-bot' {
21
- $commits = NonBotCommits ' deps/updater/tests/sentry-cli.properties'
22
- AssertEqual ' ' " $commits "
23
- }
21
+ RunTest ' empty-if-all-commits-by-bot' {
22
+ $commits = NonBotCommits ' deps/updater/tests/sentry-cli.properties'
23
+ AssertEqual ' ' " $commits "
24
+ }
24
25
25
- RunTest ' empty-if-branch-doesnt-exist' {
26
- $commits = NonBotCommits ' non-existent-branch'
27
- AssertEqual ' ' " $commits "
28
- }
26
+ RunTest ' empty-if-branch-doesnt-exist' {
27
+ $commits = NonBotCommits ' non-existent-branch'
28
+ AssertEqual ' ' " $commits "
29
+ }
29
30
30
- RunTest ' non-empty-if-changed' {
31
- $commits = NonBotCommits ' test/nonbot-commits'
32
- AssertEqual ' 0b7d9cc test: keep this branch' " $commits "
33
- }
31
+ RunTest ' non-empty-if-changed' {
32
+ $commits = NonBotCommits ' test/nonbot-commits'
33
+ AssertEqual ' 0b7d9cc test: keep this branch' " $commits "
34
+ }
35
+ }
0 commit comments