Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelRyanWebber committed Apr 2, 2024
1 parent d511a2e commit c214a53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/auto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c214a53

Please sign in to comment.