From c214a53c4a1f93860863bfc8404d4fed787fdbc9 Mon Sep 17 00:00:00 2001 From: michael webber Date: Tue, 2 Apr 2024 17:09:39 -0400 Subject: [PATCH] add comment --- packages/core/src/auto.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/src/auto.ts b/packages/core/src/auto.ts index e83318454..c7253ebca 100644 --- a/packages/core/src/auto.ts +++ b/packages/core/src/auto.ts @@ -1311,6 +1311,9 @@ export default class Auto { if (!pr || !build) { const sha = await this.git.getSha(); + // If the commit sha is a 7 digit number starting with zero + // SemVer will reject the version. Include enough of the sha + // to include at least one letter in that case. const endIndex = /^0\d{6}/.test(sha) ? sha.search(/[a-zA-Z]/) + 1 : 7;