You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use AskUserQuestion with Yes/Cancel options before proceeding.
55
+
56
+
**Monorepo handling**: If the root README is sparse (under 200 characters or contains no keyboard-related keywords), check for a nested README by searching common subdirectory patterns:
57
+
58
+
```bash
59
+
gh api repos/owner/repo/contents | jq '[.[] | select(.type=="dir") | .name]'
60
+
```
61
+
62
+
If a relevant subdirectory exists (e.g., matches the repo name, or contains `keyboard`/`pcb`/`case`), fetch its README too:
63
+
64
+
```bash
65
+
gh api repos/owner/repo/contents/{subdir}/README.md --jq '.content'| base64 -d
66
+
```
67
+
68
+
Use whichever README has richer content.
69
+
70
+
**Extract from the results**:
33
71
34
72
- Repository name (clean it up: replace hyphens/underscores with spaces, title case)
35
-
- Repository description from the About section
36
-
-GitHub topics/tags
37
-
-First significant image URL from README (look for ` ` markdown images and `<img src="...">` tags. Collect up to 3 candidates, filtering out badges (shields.io, badge URLs, tiny images) and favoring `.jpg`, `.png`, `.gif`, `.webp`. Resolve relative paths to raw GitHub URLs using the default branch:
Generate tags from the fetched data by normalizing raw mentions to canonical tags. Cross-reference against the existing tag list — prefer an existing tag spelling over inventing a new variant.
106
+
107
+
Also include any relevant GitHub topics from Step 3a.
45
108
46
109
**Tag normalization rules**:
47
110
48
-
-`qmk`, `zmk`, `vial`- use as-is (lowercase)
49
-
-`pcb`- if KiCad or PCB mentioned
50
-
-`case`- if STL, 3MF, or case files mentioned
51
-
-`40%`, `60%`, `65%`, `75%`, `tkl`, `3x5`, `4x6`- use as-is (lowercase)
52
-
-`alice`- use for both Alice and Arisu layouts
53
-
-`choc`, `mx`, `low profile`, `hotswap`- use as-is (lowercase)
**Aliases** (convert raw mentions to these canonical tags):
58
121
@@ -63,7 +126,7 @@ Generate tags from the fetched data by normalizing raw mentions to canonical tag
63
126
64
127
Format as comma-separated string (e.g., "split, choc, pcb, case, display").
65
128
66
-
### Step 5: Determine Category
129
+
### Step 6: Determine Category
67
130
68
131
Use AskUserQuestion to let the user select the category:
69
132
@@ -77,17 +140,17 @@ Options:
77
140
- other: Numpad, macropad, or unique design
78
141
```
79
142
80
-
### Step 6: Generate Description
143
+
### Step 7: Generate Description
81
144
82
145
Create a concise description (max 500 characters) from:
83
146
84
147
- Repository description
85
148
- First paragraph of README
86
149
- Key features detected
87
150
88
-
The description should explain what makes this keyboard interesting or unique.
151
+
The description should explain what makes this keyboard interesting or unique. If none of the above yield meaningful content, omit the `description` field rather than writing a generic filler sentence.
89
152
90
-
### Step 7: Preview Entry
153
+
### Step 8: Preview Entry
91
154
92
155
Show the user a concise preview:
93
156
@@ -111,7 +174,7 @@ Options:
111
174
112
175
If "Let me edit" is selected, ask which field to modify and get the new value.
113
176
114
-
### Step 8: Create the File
177
+
### Step 9: Create the File
115
178
116
179
Generate a filename slug from the keyboard name (lowercase, hyphens, no special chars).
117
180
@@ -128,7 +191,9 @@ image: "[image URL]"
128
191
---
129
192
```
130
193
131
-
### Step 9: Confirm Success
194
+
Omit `description` and/or `image` if they have no value.
0 commit comments