You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write-Error "One or more projects failed code inspection."
194
-
}
195
-
}
192
+
if ($failed) {
193
+
Write-Error "One or more projects failed code inspection."
194
+
}
195
+
}
196
196
197
197
cleanup-code:
198
-
timeout-minutes: 60
199
-
strategy:
200
-
fail-fast: false
201
-
matrix:
202
-
os: [ubuntu-latest, windows-latest, macos-latest]
203
-
runs-on: ${{ matrix.os }}
204
-
steps:
205
-
- name: Git checkout
206
-
uses: actions/checkout@v3
207
-
with:
208
-
fetch-depth: 2
209
-
- name: Setup .NET
210
-
uses: actions/setup-dotnet@v3
211
-
with:
212
-
dotnet-version: 6.0.x
213
-
- name: Restore tools
214
-
run: |
215
-
dotnet tool restore
216
-
- name: Restore packages
217
-
run: |
218
-
dotnet restore
219
-
- name: CleanupCode (on PR diff)
220
-
if: github.event_name == 'pull_request'
221
-
shell: pwsh
222
-
run: |
223
-
# Not using the environment variables for SHAs, because they may be outdated. This may happen on force-push after the build is queued, but before it starts.
224
-
# The below works because HEAD is detached (at the merge commit), so HEAD~1 is at the base branch. When a PR contains no commits, this job will not run.
225
-
$headCommitHash = git rev-parse HEAD
226
-
$baseCommitHash = git rev-parse HEAD~1
198
+
timeout-minutes: 60
199
+
strategy:
200
+
fail-fast: false
201
+
matrix:
202
+
os: [ubuntu-latest, windows-latest, macos-latest]
203
+
runs-on: ${{ matrix.os }}
204
+
steps:
205
+
- name: Git checkout
206
+
uses: actions/checkout@v3
207
+
with:
208
+
fetch-depth: 2
209
+
- name: Setup .NET
210
+
uses: actions/setup-dotnet@v3
211
+
with:
212
+
dotnet-version: 6.0.x
213
+
- name: Restore tools
214
+
run: |
215
+
dotnet tool restore
216
+
- name: Restore packages
217
+
run: |
218
+
dotnet restore
219
+
- name: CleanupCode (on PR diff)
220
+
if: github.event_name == 'pull_request'
221
+
shell: pwsh
222
+
run: |
223
+
# Not using the environment variables for SHAs, because they may be outdated. This may happen on force-push after the build is queued, but before it starts.
224
+
# The below works because HEAD is detached (at the merge commit), so HEAD~1 is at the base branch. When a PR contains no commits, this job will not run.
225
+
$headCommitHash = git rev-parse HEAD
226
+
$baseCommitHash = git rev-parse HEAD~1
227
227
228
-
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
0 commit comments