Skip to content

Commit 1c330e2

Browse files
committed
nicer suffix order
1 parent e884bc2 commit 1c330e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/backfill-tags.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,11 @@ jobs:
124124
// Suffix maker: 0 -> "", 1 -> "-a", 2 -> "-b", ..., 26 -> "-z", 27 -> "-aa", etc.
125125
function letterSuffix(n) {
126126
if (n <= 0) return "";
127+
// shift everything up by one: 1 => b, 2 => c, ...
128+
n++;
127129
let s = "";
128130
while (n > 0) { n--; s = String.fromCharCode(97 + (n % 26)) + s; n = Math.floor(n / 26); }
129-
return "-" + s;
131+
return s;
130132
}
131133
132134
// Find the next free name considering BOTH local tags and what's already planned in this run.

0 commit comments

Comments
 (0)