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
Copy file name to clipboardExpand all lines: README.adoc
+70-45Lines changed: 70 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
:toclevels: 3
4
4
:this_prod_vrsn: 0.2.0
5
5
:next_prod_vrsn: 0.3.0
6
-
:docker_base_command: docker run -it --rm -v $(pwd):/workdir -e GITHUB_TOKEN=$ISSUER_API_TOKEN docopslab/issuer
6
+
:docker_base_command: docker run -it --rm -v $(pwd):/workdir -e ISSUER_API_TOKEN=$GITHUB_TOKEN docopslab/issuer
7
7
:append_or_impose: Prepend items with `+` to indicate they should be appended to existing labels. Items without `+` will only be used for issues with no `tags` designated.
8
8
ifdef::env-github[]
9
9
:icons: font
@@ -22,7 +22,7 @@ _Issuer_ lets you define all your work tickets in one place as YAML, apply defau
22
22
* *Configurable defaults* and label application
23
23
* *Environment variable support* for authentication
24
24
* *Issue validation* with helpful error messages
25
-
* *GitHub API integration* via Octokit
25
+
* *GitHub API integration*
26
26
27
27
Future plans include extending this capability to *Jira*, *GitLab* Issues, GitHub *Projects*, and other services.
28
28
@@ -57,15 +57,18 @@ With Docker installed and running...
57
57
For actual issue creation, use something like:
58
58
59
59
[.prompt,subs=+attributes]
60
-
{docker_base_command} your-issues.yml --dry
60
+
{docker_base_command} your-issues.yml
61
61
62
62
The above command:
63
63
64
64
* mounts your local directory to be readable by the Docker container
65
-
* passes your GitHub access token environment variable into the container (`$ISSUER_API_TOKEN` could be `$ISSER_GITHUB_TOKEN`, `$GITHUB_ACCESS_TOKEN`, or `$GITHUB_TOKEN`).
65
+
* passes your GitHub access token environment variable into the container (`$ISSUER_API_TOKEN` could be `$ISSUER_GITHUB_TOKEN`, `$GITHUB_ACCESS_TOKEN`, or `$GITHUB_TOKEN`).
66
+
* connects to GitHub and creates issue entries one at a time from `your-issues.yml`
66
67
67
68
Everything after `docopslab/issuer` accepts the standard arguments and options of the issuer CLI.
68
69
70
+
See <<usage>> for more.
71
+
69
72
[[docker-alias]]
70
73
==== Alias the Docker Command
71
74
@@ -82,7 +85,7 @@ Reload your shell configuration for the alias to take effect:
82
85
83
86
=== For Ruby Users
84
87
85
-
If you have Ruby on your workstation, there are two common ways to install thi gem.
88
+
If you have Ruby on your workstation, there are two common ways to install this gem.
86
89
87
90
==== Global Installation
88
91
@@ -91,7 +94,7 @@ If you have Ruby on your workstation, there are two common ways to install thi g
91
94
92
95
Then you can use the `issuer` command from anywhere in your system.
93
96
94
-
==== Local/Applicaition Installation
97
+
==== Local/Application Installation
95
98
96
99
Add this line to your Gemfile:
97
100
@@ -106,14 +109,14 @@ And then execute:
106
109
107
110
Now you can use `bundle exec issuer` to perform operations inside the project directory.
108
111
109
-
112
+
[[usage]]
110
113
== Usage
111
114
112
115
Once installed, you can start using `issuer` to create issues in GitHub.
113
116
114
117
=== Quickstart Overview
115
118
116
-
The following steps assume the gem is either installed globally or `issuer` is <<docker-alias,established as an alias>>.
119
+
The following steps assume the gem is either installed globally or `issuer` is <<docker-alias,established as an alias>> (Docker method).
117
120
For Ruby Bundler usage, prepend `bundle exec ` and for un-aliased Docker usage, prepend `{docker_base_command}`.
118
121
119
122
. Prepare your issue definitions in an IMYML file (see <<imyml-format,examples and docs>> below).
@@ -122,7 +125,7 @@ For Ruby Bundler usage, prepend `bundle exec ` and for un-aliased Docker usage,
122
125
+
123
126
issuer example.yml --dry
124
127
125
-
. Establish a Personal Access Token for GitHub (see <<authentication,Authentication>> below).
128
+
. Establish a Personal Access Token for GitHub and store it as an environment variable (see <<authentication>> below).
126
129
127
130
. Post issues to GitHub:
128
131
+
@@ -170,7 +173,7 @@ issues: # block for listing issues to post to cloud
170
173
# This is the default text that will appear if an issue record is a _stub_ and no `body` field is designated.
171
174
# ---
172
175
# This issue was automatically generated by issuer.
173
-
- summ: Documentaton issue
176
+
- summ: Documentation issue
174
177
tags: [-needs:docs] # skip the default needs:docs label
175
178
----
176
179
@@ -207,93 +210,95 @@ The IMYML format will be standardized and formally specified in a future release
207
210
[[imyml-ref]]
208
211
==== IMYML Properties Reference
209
212
210
-
`$meta`::
213
+
$meta::
211
214
Optional block for establishing operation-wide modes and settings.
212
215
213
-
`$meta.proj`:::
216
+
$meta.proj:::
214
217
(String)
215
218
Designates the target project/repository.
216
219
217
-
`$meta.defaults`:::
218
-
Designates the default values to use for any issue record that does not specify a value for a given property.
220
+
$meta.defaults:::
221
+
Properties in this block establish the default values to be used for any issue record that does not specify a value for the given property.
219
222
220
-
`$meta.defaults.vrsn`::::
223
+
$meta.defaults.vrsn::::
221
224
(String)
222
225
Sets default version or milestone for all issues.
223
226
224
-
`$meta.defaults.user`::::
227
+
$meta.defaults.user::::
225
228
(String)
226
229
Sets default assignee (GitHub username).
227
230
228
-
`$meta.defaults.type`::::
231
+
$meta.defaults.type::::
229
232
(String)
230
233
Sets default issue type to apply to all issues when no `type` property is specified in the issue record.
231
234
232
-
`$meta.defaults.tags`::::
235
+
$meta.defaults.tags::::
233
236
(Array):
234
237
Labels to append to issues (comma-separated).
235
238
{append_or_impose}
236
239
237
-
`$meta.defaults.stub`::::
240
+
$meta.defaults.stub::::
238
241
(Boolean)
239
242
Establishes the state whether to insert stub texts (`body` / `head` / `tail`).
240
243
241
-
`$meta.defaults.body`::::
244
+
$meta.defaults.body::::
242
245
(String)
243
246
Sets default body text to apply to all issues when no `body` property is specified in the issue record.
244
247
245
-
`$meta.defaults.head`::::
248
+
$meta.defaults.head::::
246
249
(String)
247
250
Sets default text to insert before the body of all issues for which `stub`.
248
251
249
-
`$meta.defaults.tail`::::
252
+
$meta.defaults.tail::::
250
253
(String)
251
254
Sets default text to insert after the body of all issues for which `stub`.
252
255
253
-
`issues`::
254
-
(Array) Tabular listing of issue records as Array itmes.
256
+
issues::
257
+
(Array)
258
+
Tabular listing of *issue records* as Array items.
255
259
If an item is Scalar (not a Map with named keys), the value must be a String and it will be treated as the `summ` (summary/title) property.
256
260
+
257
261
Otherwise, any `issues` Array items must be Map-formatted "`dictionaries`" with the following properties:
258
262
259
-
`summ`:::
263
+
summ:::
260
264
(String, *required*)
261
265
A one-line title or summary of the issue.
262
266
263
-
`body`:::
267
+
body:::
264
268
(String)
265
269
The main body or description text for the issue.
266
270
Defaults to `$meta.defaults.body` if `stub == true` for the record, in which case, upon submission, will also incorporate any values for `$meta.defaults.head` and `$meta.defaults.tail`.
267
271
268
-
`vrsn`:::
272
+
vrsn:::
269
273
(String)
270
274
The milestone associated with the issue.
271
275
+
272
276
Defaults to `$meta.defaults.vrsn` or else `null`.
273
277
274
-
`type`:::
278
+
type:::
275
279
(String)
276
280
The type of issue, which must already be registered in the target project or repository.
277
281
Defaults to `$meta.defaults.type` or else `null`.
278
282
279
-
`tags`:::
283
+
tags:::
280
284
(Array of Strings)
281
285
A listing of specific labels to assign to the issue.
282
286
+
283
287
Supports special prefix notation for label management:
284
288
+
285
-
* Regular labels (e.g., `bug`, `priority:high`) are applied based on default tag logic
286
-
* Append labels (e.g., `+urgent`) are always applied to all issues
287
-
* Removal labels (e.g., `-needs:docs`) remove the specified label from the default/appended labels list
289
+
* Regular labels (example: `bug`, `priority:high`) are applied based on default tag logic
290
+
* Append labels (example: `+urgent`) are always applied to all issues
291
+
* Removal labels (example: `-needs:docs`) remove the specified label from the default/appended labels list
288
292
+
289
293
Example: `tags: [documentation, +critical, -needs:review]` would add `documentation` and `critical` labels while removing any `needs:review` label from defaults.
290
294
291
-
`user`:::
295
+
user:::
292
296
(String)
293
297
The system username of the person or bot to which the ticket is assigned.
294
298
295
-
`stub [true+++*+++|false]`:::
299
+
stub:::
296
300
(Boolean)
301
+
Accepts `true` or `false`.
297
302
Whether to treat the issue as a stub entry, meaning prepend any `$meta.defaults.head` text or append any `$meta.defaults.tail` text, and in case the ticket has no `body` property, insert the text of `$meta.defaults.body`.
The target project (org/repo or user/repo format for GitHub).
327
332
328
333
--vrsn _VERSION_::
329
-
Argues default milestone for all issues.
334
+
Sets default milestone for all issues.
330
335
331
336
--user _USERNAME_::
332
-
Argues default assignee (GitHub username).
337
+
Sets default assignee (GitHub username).
333
338
334
339
--tags _TAG_[,_TAG_]::
335
-
Argues labels to impose or add issues (comma-separated).
340
+
Sets labels to apply to issues (comma-separated).
336
341
{append_or_impose}
337
342
338
343
--stub [_true_+++*+++|_false_]::
339
344
Whether to treat all issues as stubs, meaning prepend any `$meta.defaults.head` text or append any `$meta.defaults.tail` text, and in case the ticket has no `body` property, insert the text of `$meta.defaults.body`.
340
345
341
346
==== Mode Options
342
347
343
-
--dry::
348
+
--dry, --dry-run::
344
349
Dry-run: print actions but do not post to GitHub.
345
350
346
351
--auto-versions, --auto-milestones::
@@ -352,7 +357,7 @@ Automatically create missing labels/tags without prompting for confirmation.
352
357
--auto-metadata::
353
358
Automatically create all missing metadata (milestones and labels) without prompting for confirmation. Equivalent to using both `--auto-versions` and `--auto-tags`.
354
359
355
-
--help::
360
+
--help, -h::
356
361
Prints the usage screen.
357
362
358
363
--version::
@@ -373,14 +378,21 @@ The application will check for environment variables in the following order:
373
378
To *create and set a token*:
374
379
375
380
. In the GitHub Web interface, go to *Settings* (under your user icon) → *Developer Settings* (bottom of left menu) → *Personal Access Tokens* → *Fine-grained tokens*.
376
-
. Generate a new token with access to *All repositoriess* or any *Select repositories* you wish to post to, and include read/write permissions GitHub Issues (under *Repository permissions*).
381
+
. Generate a new token with access to *All repositories* or any *Select repositories* you wish to post to, and include read/write permissions GitHub Issues (under *Repository permissions*).
377
382
. Copy the token and set it as an environment variable.
When using Docker, you can pass any such key into the container this way, using the `-e` option: `-e ISSUER_API_TOKEN=$MY_GITHUB_API_KEY`.
395
+
384
396
385
397
== Advanced Usage
386
398
@@ -449,7 +461,7 @@ I will probably adapt the API to other systems in future releases, and I welcome
449
461
450
462
=== Methodology Confession
451
463
452
-
I should note up front that this is the closest I have come to "`vibe coding`" anything bigger than a local script, let alone a shippable production code.
464
+
I should note up front that this is the closest I have come to "`vibe coding`" anything bigger than a local script, let alone shippable production code.
453
465
Nevertheless, I intervened to make substantial and specific changes at least 100 times, and I rearranged major aspects of the codebase.
454
466
455
467
I designed the IMYML format and the CLI up front, then I let Claud 4 (via GH Copilot) draft most of the code.
0 commit comments