gh-issue-kit 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TERUSI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,224 @@
1
+ # gh-issue-kit
2
+
3
+ A command line tool for setting up GitHub Issue templates and drafting issues from those templates.
4
+
5
+ `gh-issue-kit` helps you:
6
+
7
+ - initialize `.github/ISSUE_TEMPLATE`
8
+ - manage a local `.gh-issue/` workspace
9
+ - create Markdown issue drafts from installed templates
10
+ - send those drafts to GitHub Issues with `gh`
11
+
12
+ ## Requirements
13
+
14
+ - Node.js `>= 20`
15
+ - GitHub CLI `gh` for the `send` command
16
+
17
+ ## Authentication
18
+
19
+ Authenticate GitHub CLI before using `gh-issue-kit`:
20
+
21
+ ```sh
22
+ gh auth login
23
+ ```
24
+
25
+ This is required because `gh-issue-kit` uses `gh` to inspect repositories and create issues.
26
+
27
+ ## Installation
28
+
29
+ ### Global installation
30
+
31
+ If you want to run `gh-issue-kit` directly from your terminal, install it globally:
32
+
33
+ ```sh
34
+ npm install -g gh-issue-kit
35
+ ```
36
+
37
+ Or with pnpm:
38
+
39
+ ```sh
40
+ pnpm add -g gh-issue-kit
41
+ ```
42
+
43
+ ### Local installation
44
+
45
+ If you prefer to install it in a project:
46
+
47
+ ```sh
48
+ npm install gh-issue-kit
49
+ ```
50
+
51
+ Example `package.json` scripts:
52
+
53
+ ```json
54
+ {
55
+ "scripts": {
56
+ "gh-init": "gh-issue-kit init",
57
+ "gh-create": "gh-issue-kit create",
58
+ "gh-send": "gh-issue-kit send"
59
+ }
60
+ }
61
+ ```
62
+
63
+ ## Commands
64
+
65
+ ### `gh-issue-kit init`
66
+
67
+ Initialize the local `gh-issue` workspace.
68
+
69
+ What it does:
70
+
71
+ - creates `.gh-issue/`
72
+ - creates `.gh-issue/README.md`
73
+ - optionally creates issue templates in `.github/ISSUE_TEMPLATE/`
74
+
75
+ Behavior:
76
+
77
+ - if `.gh-issue/` already exists, initialization stops
78
+ - first asks whether issue templates should be created
79
+ - if you answer `no`, only `.gh-issue/` is prepared and the command exits with `All done!`
80
+ - if you answer `yes`, you can choose template types and languages before files are written
81
+
82
+ Example:
83
+
84
+ ```sh
85
+ gh-issue-kit init
86
+ ```
87
+
88
+ Generated template files are written under:
89
+
90
+ ```text
91
+ .github/ISSUE_TEMPLATE/
92
+ ```
93
+
94
+ The local draft workspace is:
95
+
96
+ ```text
97
+ .gh-issue/
98
+ ```
99
+
100
+ ### `gh-issue-kit create`
101
+
102
+ Create a Markdown issue draft from one of the installed issue templates.
103
+
104
+ This command:
105
+
106
+ - reads templates from `.github/ISSUE_TEMPLATE/`
107
+ - prompts you to choose a template
108
+ - prompts for the issue title and each field
109
+ - saves the result as a Markdown draft under `.gh-issue/`
110
+
111
+ Example:
112
+
113
+ ```sh
114
+ gh-issue-kit create
115
+ ```
116
+
117
+ #### `create` options
118
+
119
+ ##### `--vim`
120
+
121
+ Preselect Vim for textarea fields.
122
+
123
+ Behavior:
124
+
125
+ - for required textarea fields, the Vim/direct chooser is skipped
126
+ - for optional textarea fields, you are asked only whether to edit or skip
127
+
128
+ Example:
129
+
130
+ ```sh
131
+ gh-issue-kit create --vim
132
+ ```
133
+
134
+ ##### `--no-vim`
135
+
136
+ Preselect direct input for textarea fields.
137
+
138
+ Behavior:
139
+
140
+ - for required textarea fields, the Vim/direct chooser is skipped
141
+ - for optional textarea fields, you are asked only whether to edit or skip
142
+
143
+ Example:
144
+
145
+ ```sh
146
+ gh-issue-kit create --no-vim
147
+ ```
148
+
149
+ #### Textarea behavior
150
+
151
+ When no editor option is specified:
152
+
153
+ - required textarea fields ask how to enter content
154
+ - optional textarea fields can be edited or skipped
155
+
156
+ When Vim is used:
157
+
158
+ - content is written in a temporary hidden file
159
+ - guide comments are inserted at the top
160
+ - those guide comments are removed before saving the final draft
161
+
162
+ ### `gh-issue-kit send`
163
+
164
+ Create GitHub Issues from Markdown drafts stored in `.gh-issue/`.
165
+
166
+ This command:
167
+
168
+ - reads draft files from `.gh-issue/`
169
+ - prompts you to select one or more drafts
170
+ - creates GitHub Issues with `gh issue create`
171
+ - removes each draft after successful submission
172
+
173
+ Example:
174
+
175
+ ```sh
176
+ gh-issue-kit send
177
+ ```
178
+
179
+ #### `send` options
180
+
181
+ ##### `--all`
182
+
183
+ Send all drafts without showing the selection prompt.
184
+
185
+ Example:
186
+
187
+ ```sh
188
+ gh-issue-kit send --all
189
+ ```
190
+
191
+ The `send` command ignores:
192
+
193
+ ```text
194
+ .gh-issue/README.md
195
+ ```
196
+
197
+ ## Draft format
198
+
199
+ Each generated draft uses front matter for the issue title and Markdown for the body.
200
+
201
+ Example:
202
+
203
+ ```md
204
+ ---
205
+ title: [BUG] Build fails on CI
206
+ ---
207
+
208
+ ## Summary
209
+
210
+ The build fails when running the release workflow.
211
+ ```
212
+
213
+ ## Typical workflow
214
+
215
+ 1. Run `gh auth login`
216
+ 2. Run `gh-issue-kit init`
217
+ 3. Run `gh-issue-kit create`
218
+ 4. Review the draft in `.gh-issue/`
219
+ 5. Run `gh-issue-kit send`
220
+
221
+ ## Notes
222
+
223
+ - Existing template files are skipped instead of overwritten.
224
+ - The bundled templates are starter templates. Review and adjust them for your project before using them in production.