Skip to content

Commit 20a8ad4

Browse files
committed
Update max commit message length to 200 as it was too close to the limit previously.
1 parent 0c3c7da commit 20a8ad4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

eng/pipelines/templates/jobs/workload-build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ jobs:
4141
# Keep only valid characters. Invalid characters include: " / : < > \ | ? @ *
4242
# Also, strip any trailing '.' characters as those are invalid too.
4343
$commitMessage = "$(git log -1 --pretty=%s)".Trim() -replace '["\/:<>\\|?@*]|\.{1,}$', ''
44-
# Lastly, truncate to 255 max characters: 255 - 29 - 14 = 212
45-
# 29: for (potential) workloads version and delimiters, ex: 10.0.101-servicing.25563.1
44+
# Lastly, truncate to 255 max characters: 255 - 32 - 14 - 9 = 200
45+
# 32: for (potential) workloads version and delimiters (last numeric value can be 2 digits long), ex: 10.0.101-servicing.0.25571.3
4646
# 14: for build number and delimiter, ex: 20250910.13 •
47-
$commitMessage = $commitMessage.Substring(0, [Math]::Min($commitMessage.Length, 212))
47+
# 9: just a fudge factor to be safe (and make the result an even 200).
48+
$commitMessage = $commitMessage.Substring(0, [Math]::Min($commitMessage.Length, 200))
4849
# If the build does not succeed, the run name will contain to what is set below.
4950
# If the build does succeed, Workloads.NET.Workloads.csproj will recreate the run name using OfficialBuildId, WorkloadsVersion, and SourceBranchCommitMessage.
5051
Write-Host "##vso[task.setvariable variable=SourceBranchCommitMessage]$commitMessage"

0 commit comments

Comments
 (0)