Skip to content

Commit 2206ac3

Browse files
committed
Run CleanupCode on full branch
1 parent 9a5372f commit 2206ac3

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -256,19 +256,19 @@ jobs:
256256
- name: Restore packages
257257
run: |
258258
dotnet restore
259-
- name: CleanupCode (on PR diff)
260-
if: github.event_name == 'pull_request'
261-
shell: pwsh
262-
run: |
263-
# 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.
264-
# 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.
265-
$headCommitHash = git rev-parse HEAD
266-
$baseCommitHash = git rev-parse HEAD~1
267-
268-
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
269-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
259+
# - name: CleanupCode (on PR diff)
260+
# if: github.event_name == 'pull_request'
261+
# shell: pwsh
262+
# run: |
263+
# # 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.
264+
# # 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.
265+
# $headCommitHash = git rev-parse HEAD
266+
# $baseCommitHash = git rev-parse HEAD~1
267+
#
268+
# Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
269+
# dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
270270
- name: CleanupCode (on branch)
271-
if: github.event_name == 'push' || github.event_name == 'release'
271+
# if: github.event_name == 'push' || github.event_name == 'release'
272272
shell: pwsh
273273
run: |
274274
Write-Output "Running code cleanup on all files."

0 commit comments

Comments
 (0)