Skip to content

Commit a467130

Browse files
committed
Properly handle GitHub username starting with digit
1 parent 9f332cc commit a467130

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## `2.2.3` - 2025-12-13
4+
5+
### Fixes
6+
7+
- Fixed a crash caused by the use of a GitHub username starting with a digit.
8+
39
## `2.2.2` - 2025-10-27
410

511
### Changes

copier.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ github_user:
2525
{%- import "macros/validators.jinja" as validators -%}
2626
{{- validators.not_empty(github_user) -}}
2727
28+
sanitized_github_user:
29+
when: false
30+
default: |
31+
{%- set v = github_user|lower|replace('-', '_') -%}
32+
{{- '_'~v if v[0].isdigit() else v -}}
33+
2834
github_repo:
2935
type: str
3036
help: GitHub repository name
@@ -33,7 +39,7 @@ github_repo:
3339
java_package:
3440
type: str
3541
help: Base Java package (eg. net.minecraft, at.petrak.hexcasting)
36-
default: "io.github.{{ github_user|lower|replace('-', '_') }}.{{ modid }}"
42+
default: "io.github.{{ sanitized_github_user }}.{{ modid }}"
3743
validator: |
3844
{%- import "macros/validators.jinja" as validators -%}
3945
{{- validators.not_empty(java_package) -}}

ctt.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ mappings_name = "Mojmap"
1212

1313
[output.".ctt/yarn"]
1414
mappings_name = "Yarn"
15+
16+
[output.".ctt/leading_number_username"]
17+
mappings_name = "Mojmap"
18+
github_user = "1leadingnum"

0 commit comments

Comments
 (0)