issuer 0.1.1 → 0.3.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.
- checksums.yaml +4 -4
- data/README.adoc +173 -61
- data/examples/basic-example.yml +3 -0
- data/examples/new-project-issues.yml +3 -0
- data/examples/tag-removal-example.yml +41 -0
- data/examples/validation-test.yml +2 -0
- data/issuer.gemspec +1 -6
- data/lib/issuer/apis/github/client.rb +184 -4
- data/lib/issuer/cache.rb +14 -14
- data/lib/issuer/cli.rb +80 -17
- data/lib/issuer/issue.rb +96 -24
- data/lib/issuer/ops.rb +1 -1
- data/lib/issuer/sites/github.rb +28 -12
- data/lib/issuer.rb +6 -6
- metadata +5 -62
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9b9b8755cfce731755363e16c9499632533330adb62e565b1bafcd4b158c820e
|
|
4
|
+
data.tar.gz: 9372bd2d0245dd42e28143fb11060d173e14ad2bfa2422ef85dc5eb70897528c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9e984bb19ef6339cd9b172dccb5108b376ce5e75565669d5eaacb4694f3978e278b152bc16bceb3e613ea6dd2cb161f463521b87970630555cfb3368527a72ba
|
|
7
|
+
data.tar.gz: 46e27411826c5c25a647bd8d7260c0284deffa5413285937e994e76c06f1cc70fe1e47954be085116df2f8162259d1796ce379f953cb4d2d5c09723a13a5612d
|
data/README.adoc
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
= Issuer: Bulk GitHub Issue Creator
|
|
2
2
|
:toc: macro
|
|
3
3
|
:toclevels: 3
|
|
4
|
-
:this_prod_vrsn: 0.
|
|
5
|
-
:next_prod_vrsn: 0.
|
|
6
|
-
:docker_base_command: docker run -it --rm -v $(pwd):/workdir -e GITHUB_TOKEN
|
|
4
|
+
:this_prod_vrsn: 0.3.0
|
|
5
|
+
:next_prod_vrsn: 0.4.0
|
|
6
|
+
:docker_base_command: docker run -it --rm --user $(id -u):$(id -g) -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
|
|
10
|
+
:caution-caption: :fire:
|
|
11
|
+
:important-caption: :exclamation:
|
|
12
|
+
:note-caption: :paperclip:
|
|
13
|
+
:tip-caption: :bulb:
|
|
14
|
+
:warning-caption: :warning:
|
|
10
15
|
endif::[]
|
|
11
16
|
|
|
12
17
|
|
|
18
|
+
// tag::ai-prompt[]
|
|
19
|
+
[[overview]]
|
|
13
20
|
== Overview
|
|
14
21
|
|
|
15
|
-
_Issuer_ lets you define all your work tickets in one place as YAML, apply defaults, and post them to GitHub Issues in bulk.
|
|
22
|
+
_Issuer_ lets you define all your GitHub Issues work tickets in one place as YAML, apply defaults, and post them to GitHub Issues in bulk.
|
|
16
23
|
|
|
17
24
|
=== Features
|
|
18
25
|
|
|
@@ -22,12 +29,28 @@ _Issuer_ lets you define all your work tickets in one place as YAML, apply defau
|
|
|
22
29
|
* *Configurable defaults* and label application
|
|
23
30
|
* *Environment variable support* for authentication
|
|
24
31
|
* *Issue validation* with helpful error messages
|
|
25
|
-
* *GitHub API integration*
|
|
32
|
+
* *GitHub API integration*
|
|
26
33
|
|
|
27
|
-
|
|
34
|
+
// end::ai-prompt[]
|
|
35
|
+
|
|
36
|
+
Future plans include extending this capability to *Jira* (link:https://github.com/DocOps/issuer/issues/9[#9]), *GitLab* Issues (link:https://github.com/DocOps/issuer/issues/33[#33]), GitHub *Projects*, and other services.
|
|
28
37
|
|
|
29
38
|
toc::[]
|
|
30
39
|
|
|
40
|
+
=== Who Is This For?
|
|
41
|
+
|
|
42
|
+
This tool is oriented as much for _project managers_ as it is for _software developers_, but the target audience is probably *people who manage software development cycles*, especially using Git tools and GitHub Issues (or soon Jira Issues and GitLab Issues).
|
|
43
|
+
|
|
44
|
+
[NOTE]
|
|
45
|
+
Issuer does not require Git be installed on your local workstation.
|
|
46
|
+
The only direct use of Git would be if you commit and share the batch-configuration file with your team for collective editing.
|
|
47
|
+
|
|
48
|
+
This tool is great at creating "`stub`" issues for entire teams, based on user-story documents, task lists, or other planning documents.
|
|
49
|
+
Once you convert such documents to our special YAML-based definition format (IMYML), use `issuer` to post them to your GitHub Issues system via GitHub's API.
|
|
50
|
+
|
|
51
|
+
Individual issue entries can be as basic or as detailed as you wish.
|
|
52
|
+
They may consist of as little as just a title (summary) line, or that plus an assignee responsible for filling out the rest and adding metadata.
|
|
53
|
+
Or they can be complete with labels, milestones, a type designation, and a complete explanation of the issue.
|
|
31
54
|
|
|
32
55
|
== Installation
|
|
33
56
|
|
|
@@ -57,32 +80,38 @@ With Docker installed and running...
|
|
|
57
80
|
For actual issue creation, use something like:
|
|
58
81
|
|
|
59
82
|
[.prompt,subs=+attributes]
|
|
60
|
-
{docker_base_command} your-issues.yml
|
|
83
|
+
{docker_base_command} your-issues.yml
|
|
61
84
|
|
|
62
85
|
The above command:
|
|
63
86
|
|
|
64
87
|
* 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 `$
|
|
88
|
+
* passes your GitHub access token environment variable into the container (`$ISSUER_API_TOKEN` could be `$ISSUER_GITHUB_TOKEN`, `$GITHUB_ACCESS_TOKEN`, or `$GITHUB_TOKEN`).
|
|
89
|
+
* connects to GitHub and creates issue entries one at a time from `your-issues.yml`
|
|
66
90
|
|
|
67
91
|
Everything after `docopslab/issuer` accepts the standard arguments and options of the issuer CLI.
|
|
68
92
|
|
|
93
|
+
See <<usage>> for more.
|
|
94
|
+
|
|
69
95
|
[[docker-alias]]
|
|
70
96
|
==== Alias the Docker Command
|
|
71
97
|
|
|
72
98
|
Optionally alias the base Docker command.
|
|
73
|
-
In your shell configuration (usually `~/.bashrc` or `~/.zshrc), add the following:
|
|
99
|
+
In your shell configuration (usually `~/.bashrc` or `~/.zshrc`), add the following:
|
|
74
100
|
|
|
75
101
|
[.prompt,subs=+attributes]
|
|
76
102
|
alias issuer='{docker_base_command}'
|
|
77
103
|
|
|
78
104
|
Reload your shell configuration for the alias to take effect:
|
|
79
105
|
|
|
80
|
-
|
|
81
|
-
|
|
106
|
+
....
|
|
107
|
+
source ~/.bashrc
|
|
108
|
+
# or
|
|
109
|
+
source ~/.zshrc
|
|
110
|
+
....
|
|
82
111
|
|
|
83
112
|
=== For Ruby Users
|
|
84
113
|
|
|
85
|
-
If you have Ruby on your workstation, there are two common ways to install
|
|
114
|
+
If you have Ruby on your workstation, there are two common ways to install this gem.
|
|
86
115
|
|
|
87
116
|
==== Global Installation
|
|
88
117
|
|
|
@@ -91,7 +120,7 @@ If you have Ruby on your workstation, there are two common ways to install thi g
|
|
|
91
120
|
|
|
92
121
|
Then you can use the `issuer` command from anywhere in your system.
|
|
93
122
|
|
|
94
|
-
==== Local/
|
|
123
|
+
==== Local/Application Installation
|
|
95
124
|
|
|
96
125
|
Add this line to your Gemfile:
|
|
97
126
|
|
|
@@ -106,14 +135,14 @@ And then execute:
|
|
|
106
135
|
|
|
107
136
|
Now you can use `bundle exec issuer` to perform operations inside the project directory.
|
|
108
137
|
|
|
109
|
-
|
|
138
|
+
[[usage]]
|
|
110
139
|
== Usage
|
|
111
140
|
|
|
112
141
|
Once installed, you can start using `issuer` to create issues in GitHub.
|
|
113
142
|
|
|
114
143
|
=== Quickstart Overview
|
|
115
144
|
|
|
116
|
-
The following steps assume the gem is either installed globally or `issuer` is <<docker-alias,established as an alias
|
|
145
|
+
The following steps assume the gem is either installed globally or `issuer` is <<docker-alias,established as an alias>> (Docker method).
|
|
117
146
|
For Ruby Bundler usage, prepend `bundle exec ` and for un-aliased Docker usage, prepend `{docker_base_command}`.
|
|
118
147
|
|
|
119
148
|
. Prepare your issue definitions in an IMYML file (see <<imyml-format,examples and docs>> below).
|
|
@@ -122,13 +151,14 @@ For Ruby Bundler usage, prepend `bundle exec ` and for un-aliased Docker usage,
|
|
|
122
151
|
+
|
|
123
152
|
issuer example.yml --dry
|
|
124
153
|
|
|
125
|
-
. Establish a Personal Access Token for GitHub (see <<authentication
|
|
154
|
+
. Establish a Personal Access Token for GitHub and store it as an environment variable (see <<authentication>> below).
|
|
126
155
|
|
|
127
156
|
. Post issues to GitHub:
|
|
128
157
|
+
|
|
129
158
|
[.prompt]
|
|
130
159
|
issuer example.yml
|
|
131
160
|
|
|
161
|
+
// tag::user-agent-prompt[]
|
|
132
162
|
[[imyml-format]]
|
|
133
163
|
=== IMYML File Format
|
|
134
164
|
|
|
@@ -143,7 +173,8 @@ $meta: # optional block for establishing general modes/settings
|
|
|
143
173
|
defaults: # value to infer when given property missing
|
|
144
174
|
vrsn: 0.1.0 # milestone/version
|
|
145
175
|
user: alice # assigned user
|
|
146
|
-
|
|
176
|
+
type: Bug # type of issue (must already be registered)
|
|
177
|
+
tags: [needs:labels, +posted_by_issuer, +needs:docs] # labels
|
|
147
178
|
stub: true # whether to auto-insert stub texts
|
|
148
179
|
head: | # header stub text to prepend when indicated
|
|
149
180
|
Below the next line is the body...
|
|
@@ -152,9 +183,10 @@ $meta: # optional block for establishing general modes/settings
|
|
|
152
183
|
---
|
|
153
184
|
This issue was automatically generated by issuer.
|
|
154
185
|
body: | # body text to impose when no body provided
|
|
155
|
-
This is the default text that will appear if an issue record is a _stub_ and no `body` field is designated.
|
|
186
|
+
This is the default text that will appear if an issue record is a _stub_ and no `body` field is designated.
|
|
156
187
|
issues: # block for listing issues to post to cloud
|
|
157
188
|
- summ: Issue title # title/summary field
|
|
189
|
+
type: Task # type of issue (must already be registered)
|
|
158
190
|
body: | # description/body field
|
|
159
191
|
Markdown-formatted description.
|
|
160
192
|
tags: [label1, 'component:api'] # labels to create/assign
|
|
@@ -167,14 +199,20 @@ issues: # block for listing issues to post to cloud
|
|
|
167
199
|
# ---
|
|
168
200
|
# This is the default text that will appear if an issue record is a _stub_ and no `body` field is designated.
|
|
169
201
|
# ---
|
|
170
|
-
# This issue was automatically generated by issuer.
|
|
202
|
+
# This issue was automatically generated by issuer.
|
|
203
|
+
- summ: Documentation issue
|
|
204
|
+
tags: [-needs:docs] # skip the default needs:docs label
|
|
171
205
|
----
|
|
172
206
|
|
|
173
207
|
The `$meta` block is entirely optional, but if it is absent, your `issuer` command will need a `--proj` flag to designate the GitHub repo to which your issues should post.
|
|
174
208
|
|
|
175
|
-
Only the `summ` property is required for each issue record, and issue records (Array items) that are simple strings
|
|
209
|
+
Only the `summ` property is required for each issue record, and issue records (Array items) that are simple strings will be treated as summary-only.
|
|
176
210
|
Therefore, the following example would yield 3 tickets with unique summaries and the same body, based on `$meta.defaults.body`.
|
|
177
211
|
|
|
212
|
+
Issuer will prompt the creation of tags (labels) or versions (milestones) if they do not already exist in the target repository.
|
|
213
|
+
|
|
214
|
+
Any `type` entry must correspond to an existing issue type.
|
|
215
|
+
|
|
178
216
|
[source,yaml]
|
|
179
217
|
----
|
|
180
218
|
$meta:
|
|
@@ -192,83 +230,102 @@ issues:
|
|
|
192
230
|
----
|
|
193
231
|
|
|
194
232
|
[TIP]
|
|
195
|
-
This repository contains numerous link:
|
|
233
|
+
This repository contains numerous link:examples/README.adoc[example files] to use for inspiration.
|
|
196
234
|
|
|
197
235
|
The IMYML format will be standardized and formally specified in a future release of _issuer_, but it will remain an _open standard_ adoptable by anyone who wants to exploit or extend it.
|
|
198
236
|
|
|
199
237
|
[[imyml-ref]]
|
|
200
238
|
==== IMYML Properties Reference
|
|
201
239
|
|
|
202
|
-
|
|
240
|
+
$meta::
|
|
203
241
|
Optional block for establishing operation-wide modes and settings.
|
|
204
242
|
|
|
205
|
-
|
|
243
|
+
$meta.proj:::
|
|
206
244
|
(String)
|
|
207
245
|
Designates the target project/repository.
|
|
208
246
|
|
|
209
|
-
|
|
210
|
-
|
|
247
|
+
$meta.defaults:::
|
|
248
|
+
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.
|
|
211
249
|
|
|
212
|
-
|
|
250
|
+
$meta.defaults.vrsn::::
|
|
213
251
|
(String)
|
|
214
252
|
Sets default version or milestone for all issues.
|
|
215
253
|
|
|
216
|
-
|
|
254
|
+
$meta.defaults.user::::
|
|
217
255
|
(String)
|
|
218
256
|
Sets default assignee (GitHub username).
|
|
219
257
|
|
|
220
|
-
|
|
258
|
+
$meta.defaults.type::::
|
|
259
|
+
(String)
|
|
260
|
+
Sets default issue type to apply to all issues when no `type` property is specified in the issue record.
|
|
261
|
+
|
|
262
|
+
$meta.defaults.tags::::
|
|
221
263
|
(Array):
|
|
222
264
|
Labels to append to issues (comma-separated).
|
|
223
265
|
{append_or_impose}
|
|
224
266
|
|
|
225
|
-
|
|
267
|
+
$meta.defaults.stub::::
|
|
226
268
|
(Boolean)
|
|
227
269
|
Establishes the state whether to insert stub texts (`body` / `head` / `tail`).
|
|
228
270
|
|
|
229
|
-
|
|
271
|
+
$meta.defaults.body::::
|
|
230
272
|
(String)
|
|
231
273
|
Sets default body text to apply to all issues when no `body` property is specified in the issue record.
|
|
232
274
|
|
|
233
|
-
|
|
275
|
+
$meta.defaults.head::::
|
|
234
276
|
(String)
|
|
235
277
|
Sets default text to insert before the body of all issues for which `stub`.
|
|
236
278
|
|
|
237
|
-
|
|
279
|
+
$meta.defaults.tail::::
|
|
238
280
|
(String)
|
|
239
281
|
Sets default text to insert after the body of all issues for which `stub`.
|
|
240
282
|
|
|
241
|
-
|
|
242
|
-
(Array)
|
|
283
|
+
issues::
|
|
284
|
+
(Array)
|
|
285
|
+
Tabular listing of *issue records* as Array items.
|
|
243
286
|
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.
|
|
244
287
|
+
|
|
245
288
|
Otherwise, any `issues` Array items must be Map-formatted "`dictionaries`" with the following properties:
|
|
246
289
|
|
|
247
|
-
|
|
290
|
+
summ:::
|
|
248
291
|
(String, *required*)
|
|
249
292
|
A one-line title or summary of the issue.
|
|
250
293
|
|
|
251
|
-
|
|
294
|
+
body:::
|
|
252
295
|
(String)
|
|
253
296
|
The main body or description text for the issue.
|
|
254
297
|
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`.
|
|
255
298
|
|
|
256
|
-
|
|
299
|
+
vrsn:::
|
|
257
300
|
(String)
|
|
258
301
|
The milestone associated with the issue.
|
|
259
302
|
+
|
|
260
303
|
Defaults to `$meta.defaults.vrsn` or else `null`.
|
|
261
304
|
|
|
262
|
-
|
|
305
|
+
type:::
|
|
306
|
+
(String)
|
|
307
|
+
The type of issue, which must already be registered in the target project or repository.
|
|
308
|
+
Defaults to `$meta.defaults.type` or else `null`.
|
|
309
|
+
|
|
310
|
+
tags:::
|
|
263
311
|
(Array of Strings)
|
|
264
312
|
A listing of specific labels to assign to the issue.
|
|
313
|
+
+
|
|
314
|
+
Supports special prefix notation for label management:
|
|
315
|
+
+
|
|
316
|
+
* Regular labels (example: `bug`, `priority:high`) are applied based on default tag logic
|
|
317
|
+
* Append labels (example: `+urgent`) are always applied to all issues
|
|
318
|
+
* Removal labels (example: `-needs:docs`) remove the specified label from the default/appended labels list
|
|
319
|
+
+
|
|
320
|
+
Example: `tags: [documentation, +critical, -needs:review]` would add `documentation` and `critical` labels while removing any `needs:review` label from defaults.
|
|
265
321
|
|
|
266
|
-
|
|
322
|
+
user:::
|
|
267
323
|
(String)
|
|
268
324
|
The system username of the person or bot to which the ticket is assigned.
|
|
269
325
|
|
|
270
|
-
|
|
326
|
+
stub:::
|
|
271
327
|
(Boolean)
|
|
328
|
+
Accepts `true` or `false`.
|
|
272
329
|
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`.
|
|
273
330
|
|
|
274
331
|
[[cli-usage]]
|
|
@@ -280,8 +337,8 @@ Whether to treat the issue as a stub entry, meaning prepend any `$meta.defaults.
|
|
|
280
337
|
|
|
281
338
|
A source IMYML file is required and can be specified in two ways:
|
|
282
339
|
|
|
283
|
-
* *Positional argument* (most common)
|
|
284
|
-
* *Named option
|
|
340
|
+
* *Positional argument* (most common). Place the file path immediately after `issuer`
|
|
341
|
+
* *Named option.* Use the `--file` option flag to specify the file path
|
|
285
342
|
|
|
286
343
|
Examples:
|
|
287
344
|
|
|
@@ -301,13 +358,13 @@ IMYML file path (alternative to positional argument).
|
|
|
301
358
|
The target project (org/repo or user/repo format for GitHub).
|
|
302
359
|
|
|
303
360
|
--vrsn _VERSION_::
|
|
304
|
-
|
|
361
|
+
Sets default milestone for all issues.
|
|
305
362
|
|
|
306
363
|
--user _USERNAME_::
|
|
307
|
-
|
|
364
|
+
Sets default assignee (GitHub username).
|
|
308
365
|
|
|
309
366
|
--tags _TAG_[,_TAG_]::
|
|
310
|
-
|
|
367
|
+
Sets labels to apply to issues (comma-separated).
|
|
311
368
|
{append_or_impose}
|
|
312
369
|
|
|
313
370
|
--stub [_true_+++*+++|_false_]::
|
|
@@ -315,9 +372,14 @@ Whether to treat all issues as stubs, meaning prepend any `$meta.defaults.head`
|
|
|
315
372
|
|
|
316
373
|
==== Mode Options
|
|
317
374
|
|
|
318
|
-
--dry::
|
|
375
|
+
--dry, --dry-run::
|
|
319
376
|
Dry-run: print actions but do not post to GitHub.
|
|
320
377
|
|
|
378
|
+
--json [_FILE_PATH_]::
|
|
379
|
+
Save GitHub API issue payload as JSON file.
|
|
380
|
+
Use `--dry` if you want to skip posting while generating JSON.
|
|
381
|
+
If no `FILE_PATH` is specified, saves to time-stamped file in `_payloads/` directory.
|
|
382
|
+
|
|
321
383
|
--auto-versions, --auto-milestones::
|
|
322
384
|
Automatically create missing milestones/versions without prompting for confirmation.
|
|
323
385
|
|
|
@@ -327,12 +389,14 @@ Automatically create missing labels/tags without prompting for confirmation.
|
|
|
327
389
|
--auto-metadata::
|
|
328
390
|
Automatically create all missing metadata (milestones and labels) without prompting for confirmation. Equivalent to using both `--auto-versions` and `--auto-tags`.
|
|
329
391
|
|
|
330
|
-
--help::
|
|
392
|
+
--help, -h::
|
|
331
393
|
Prints the usage screen.
|
|
332
394
|
|
|
333
395
|
--version::
|
|
334
396
|
Prints the version of `issuer`.
|
|
335
397
|
|
|
398
|
+
// end::user-ai-prompt[]
|
|
399
|
+
|
|
336
400
|
[[authentication]]
|
|
337
401
|
=== Authentication
|
|
338
402
|
|
|
@@ -348,7 +412,7 @@ The application will check for environment variables in the following order:
|
|
|
348
412
|
To *create and set a token*:
|
|
349
413
|
|
|
350
414
|
. In the GitHub Web interface, go to *Settings* (under your user icon) → *Developer Settings* (bottom of left menu) → *Personal Access Tokens* → *Fine-grained tokens*.
|
|
351
|
-
. Generate a new token with access to *All
|
|
415
|
+
. 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*).
|
|
352
416
|
. Copy the token and set it as an environment variable.
|
|
353
417
|
+
|
|
354
418
|
.Example
|
|
@@ -356,6 +420,13 @@ To *create and set a token*:
|
|
|
356
420
|
+
|
|
357
421
|
Where `github_pat_xxxxxxxxxxxxxxxxxxxxxxxx` is your actual token.
|
|
358
422
|
|
|
423
|
+
If your GitHub token is stored under *any other name*, you can alias it inline by prepending to your `issuer` command.
|
|
424
|
+
For example:
|
|
425
|
+
|
|
426
|
+
ISSUER_API_TOKEN=$MY_GITHUB_API_KEY issuer my-issues.yml
|
|
427
|
+
|
|
428
|
+
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`.
|
|
429
|
+
|
|
359
430
|
|
|
360
431
|
== Advanced Usage
|
|
361
432
|
|
|
@@ -367,9 +438,10 @@ Issuer automatically logs all API operations for tracking and potential cleanup.
|
|
|
367
438
|
|
|
368
439
|
By default, logs are stored in a user-wide directory:
|
|
369
440
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
441
|
+
[horizontal]
|
|
442
|
+
Linux/macOS:: `~/.config/issuer/logs/`
|
|
443
|
+
With XDG Base Directory:: `$XDG_CONFIG_HOME/issuer/logs/`
|
|
444
|
+
Custom location:: Set `ISSUER_CONFIG_DIR` environment variable
|
|
373
445
|
|
|
374
446
|
Example:
|
|
375
447
|
[source,bash]
|
|
@@ -416,25 +488,27 @@ Logs are simply kept for easy reversal of mis-postings.
|
|
|
416
488
|
I developed the 0.1.0 version of this application after trying to use GitHub Copilot to automatically bulk-create issue tickets, which it promises to be able to do but failed me pretty hard at it.
|
|
417
489
|
|
|
418
490
|
That facility seems like a perfectly inappropriate use of generative AI.
|
|
419
|
-
It accepted my plan request and pre-drafted ticket content, but then it wanted me to manually add labels and milestones to them, as well as manually click *create* on each one -- even though I had already taken the time to plan and instruct the milestones and labels and the contents were
|
|
491
|
+
It accepted my plan request and pre-drafted ticket content, but then it wanted me to manually add labels and milestones to them, as well as manually click *create* on each one -- even though I had already taken the time to plan and instruct the milestones and labels and the contents were fully prepared.
|
|
420
492
|
|
|
421
|
-
Additionally, I find myself using different issue-management systems (
|
|
493
|
+
Additionally, I find myself using different issue-management systems (Jira, GitLab Issues, etc), so I wanted a more platform-agnostic way to handle this problem.
|
|
422
494
|
With that in mind, I have left the Ruby API and the IMYML model fairly "`generic`" for extensibility.
|
|
423
495
|
I will probably adapt the API to other systems in future releases, and I welcome <<contributing,contributions>> to that effect.
|
|
424
496
|
|
|
425
497
|
=== Methodology Confession
|
|
426
498
|
|
|
427
|
-
I should note up front that this is the closest I have come to "`vibe coding`" anything bigger than a local script, let alone
|
|
428
|
-
Nevertheless, I intervened to make substantial and specific changes at least 100 times, and I rearranged major aspects of the codebase.
|
|
499
|
+
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.
|
|
500
|
+
Nevertheless, I intervened to make substantial and specific changes at least 100 times before the 0.1.0 release alone, and I rearranged major aspects of the codebase.
|
|
429
501
|
|
|
430
|
-
I designed the IMYML format and the CLI up front, then I let
|
|
431
|
-
It committed lots of rookie mistakes during this process, and it even confessed to "`cargo-cult programming`" when I pointed out it was
|
|
502
|
+
I designed the IMYML format and the CLI up front, then I let Claude 4 (via GH Copilot) draft most of the code.
|
|
503
|
+
It committed lots of rookie mistakes during this process, and it even confessed to "`cargo-cult programming`" when I pointed out it was introducing some anti-patterns.
|
|
432
504
|
|
|
433
505
|
In the end, the only thing that is mainly untouched by me are the rspec tests, which I will more fully examine and approve before any 1.0 release, but for now they'll have to do.
|
|
434
506
|
|
|
435
507
|
This also explains why the terminal output contains emojis.
|
|
436
508
|
I will probably make those togglable or configurable in the future.
|
|
437
509
|
|
|
510
|
+
// tag::dev-ai-prompt[]
|
|
511
|
+
[[tests]]
|
|
438
512
|
=== Tests
|
|
439
513
|
|
|
440
514
|
The `specs/` directory contains all specifications, requirements, and tests for the Issuer CLI tool.
|
|
@@ -479,10 +553,10 @@ bundle exec rspec --pattern "*ops*"
|
|
|
479
553
|
|
|
480
554
|
The `pr_test` task runs the exact same tests that GitHub Actions runs for pull requests:
|
|
481
555
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
556
|
+
RSpec Tests:: All unit tests (`bundle exec rake spec`)
|
|
557
|
+
CLI Tests:: Command-line interface functionality tests
|
|
558
|
+
YAML Validation:: Validates all example YAML files
|
|
559
|
+
Documentation Quality:: Vale linting on all documentation files
|
|
486
560
|
|
|
487
561
|
This ensures you can validate your changes locally before pushing to GitHub.
|
|
488
562
|
|
|
@@ -528,11 +602,49 @@ The GitHub API test suite validates:
|
|
|
528
602
|
* Automation flags (`--auto-metadata`, `--auto-versions`, etc.)
|
|
529
603
|
* Error handling and edge cases
|
|
530
604
|
|
|
605
|
+
=== API Reference
|
|
606
|
+
|
|
607
|
+
For detailed API documentation, see the automatically generated documentation at https://gemdocs.org/gems/issuer/{this_prod_vrsn}[GemDocs].
|
|
608
|
+
|
|
609
|
+
The API reference includes:
|
|
610
|
+
|
|
611
|
+
* Complete class and method documentation
|
|
612
|
+
* Method signatures and parameters
|
|
613
|
+
* Return types and examples
|
|
614
|
+
* Internal implementation details
|
|
615
|
+
|
|
616
|
+
This documentation is automatically updated with each gem release.
|
|
617
|
+
|
|
618
|
+
// end::dev-ai-prompt[]
|
|
619
|
+
|
|
620
|
+
[[release-history-management]]
|
|
621
|
+
=== Release History Management
|
|
622
|
+
|
|
623
|
+
As of version 0.2.0, Release Notes and Changelog are generated using the link:https://github.com/DocOps/releasehx[_ReleaseHx_] tool.
|
|
624
|
+
You can find the release history assets in the `docs/releases/` directory, while the ReleaseHx configuration lives at `.config/releasehx.yml`.
|
|
625
|
+
The RHYML files are auto-generated and then manually edited to produce the GitHub link:https://github.com/DocOps/issuer/releases[release announcements].
|
|
626
|
+
|
|
627
|
+
. Draft RHYML draft file from the online GitHub Issues for the given version:
|
|
628
|
+
+
|
|
629
|
+
[.prompt,subs=+attributes]
|
|
630
|
+
bundle exec rhx {this_prod_vrsn} --yaml docs/releases/{this_prod_vrsn}.yml --config .config/releasehx.yml
|
|
631
|
+
|
|
632
|
+
. Manually edit the RHYML draft file.
|
|
633
|
+
|
|
634
|
+
. Generate the release history as Markdown.
|
|
635
|
+
+
|
|
636
|
+
[.prompt,subs=+attributes]
|
|
637
|
+
bundle exec rhx docs/releases/{this_prod_vrsn}.yml --md docs/releases/{this_prod_vrsn}.md --config .config/releasehx.yml
|
|
638
|
+
|
|
639
|
+
. Copy and paste the contents of `docs/releases/{this_prod_vrsn}.md` into the GitHub release form at https://github.com/DocOps/issuer/releases/new.
|
|
640
|
+
|
|
531
641
|
[[contributing]]
|
|
532
642
|
=== Contributing
|
|
533
643
|
|
|
534
644
|
Bug reports and pull requests are welcome on GitHub at https://github.com/DocOps/issuer.
|
|
535
645
|
|
|
646
|
+
|
|
647
|
+
[[legal]]
|
|
536
648
|
== Legal
|
|
537
649
|
|
|
538
650
|
The gem is available as open source under the terms of the MIT License.
|
data/examples/basic-example.yml
CHANGED
|
@@ -5,6 +5,7 @@ $meta:
|
|
|
5
5
|
vrsn: 1.0.0
|
|
6
6
|
user: project-manager
|
|
7
7
|
tags: [enhancement]
|
|
8
|
+
type: Task
|
|
8
9
|
|
|
9
10
|
issues:
|
|
10
11
|
- summ: Add user authentication
|
|
@@ -15,6 +16,7 @@ issues:
|
|
|
15
16
|
- Password hashing
|
|
16
17
|
- Session management
|
|
17
18
|
- Two-factor authentication support
|
|
19
|
+
type: Feature
|
|
18
20
|
tags: [security, authentication]
|
|
19
21
|
user: backend-dev
|
|
20
22
|
|
|
@@ -22,6 +24,7 @@ issues:
|
|
|
22
24
|
body: |
|
|
23
25
|
The current layout breaks on mobile devices.
|
|
24
26
|
Need to ensure proper responsive behavior.
|
|
27
|
+
type: Bug
|
|
25
28
|
tags: [bug, ui, mobile]
|
|
26
29
|
user: frontend-dev
|
|
27
30
|
|
|
@@ -6,6 +6,7 @@ $meta:
|
|
|
6
6
|
defaults:
|
|
7
7
|
vrsn: 0.1.0
|
|
8
8
|
user: project-lead
|
|
9
|
+
type: Task
|
|
9
10
|
tags: [project-setup, +new-project]
|
|
10
11
|
stub: true
|
|
11
12
|
head: |
|
|
@@ -34,6 +35,7 @@ issues:
|
|
|
34
35
|
- Set up .gitignore file
|
|
35
36
|
- Add initial directory structure
|
|
36
37
|
- Configure repository settings and permissions
|
|
38
|
+
type: Epic
|
|
37
39
|
tags: [infrastructure, repository]
|
|
38
40
|
user: devops-lead
|
|
39
41
|
|
|
@@ -110,6 +112,7 @@ issues:
|
|
|
110
112
|
- Static code analysis for security issues
|
|
111
113
|
- Secrets management setup
|
|
112
114
|
- Security policy documentation
|
|
115
|
+
type: Story
|
|
113
116
|
tags: [security, compliance, +critical]
|
|
114
117
|
user: security-team
|
|
115
118
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Tag Removal Example - Issue #4 Implementation
|
|
2
|
+
#
|
|
3
|
+
# This example demonstrates the new tag removal functionality where
|
|
4
|
+
# tags prefixed with '-' are removed from the default/appended tags list.
|
|
5
|
+
|
|
6
|
+
$meta:
|
|
7
|
+
proj: myorg/myrepo
|
|
8
|
+
defaults:
|
|
9
|
+
tags: [+posted-by-issuer, needs:label, +needs:docs]
|
|
10
|
+
|
|
11
|
+
issues:
|
|
12
|
+
- summ: Fix misstatement in the README
|
|
13
|
+
body: |
|
|
14
|
+
Correct that really bad typo on the first paragraph.
|
|
15
|
+
No docs needed for this change since it's a docs change.
|
|
16
|
+
tags: [documentation, -needs:docs]
|
|
17
|
+
|
|
18
|
+
- summ: Issue that will be fixed immediately
|
|
19
|
+
tags:
|
|
20
|
+
- '-needs:label'
|
|
21
|
+
|
|
22
|
+
- summ: Complex issue with multiple tag operations
|
|
23
|
+
body: |
|
|
24
|
+
This issue demonstrates multiple tag operations:
|
|
25
|
+
- Adds bug and enhancement tags
|
|
26
|
+
- Removes the default needs:label tag
|
|
27
|
+
- Removes the appended needs:docs tag
|
|
28
|
+
- Keeps the posted-by-issuer tag (append)
|
|
29
|
+
tags: [bug, enhancement, -needs:label, -needs:docs]
|
|
30
|
+
|
|
31
|
+
- summ: Issue with no custom tags
|
|
32
|
+
body: |
|
|
33
|
+
This issue has no custom tags, so it gets all default tags
|
|
34
|
+
including both regular defaults and append tags.
|
|
35
|
+
# No tags specified - gets all defaults
|
|
36
|
+
|
|
37
|
+
- summ: Issue that only removes tags
|
|
38
|
+
body: |
|
|
39
|
+
This issue only removes tags, so it gets default tags
|
|
40
|
+
minus the removed ones.
|
|
41
|
+
tags: [-needs:docs]
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
issues:
|
|
2
2
|
- summ: Test milestone validation
|
|
3
3
|
desc: This issue has a milestone that probably doesn't exist
|
|
4
|
+
type: Bug
|
|
4
5
|
vrsn: test-milestone-v1.0
|
|
5
6
|
tags: [test-label-1, existing-bug]
|
|
6
7
|
- summ: Test label validation
|
|
7
8
|
desc: This issue has labels that probably don't exist
|
|
9
|
+
type: Task
|
|
8
10
|
tags: [test-label-2, test-label-3, enhancement]
|
data/issuer.gemspec
CHANGED
|
@@ -15,6 +15,7 @@ Gem::Specification.new do |spec|
|
|
|
15
15
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
16
16
|
spec.metadata["source_code_uri"] = "https://github.com/DocOps/issuer"
|
|
17
17
|
spec.metadata["changelog_uri"] = "https://github.com/DocOps/issuer/blob/main/CHANGELOG.md"
|
|
18
|
+
spec.metadata["documentation_uri"] = "https://gemdocs.org/gems/issuer/#{Issuer::VERSION}"
|
|
18
19
|
|
|
19
20
|
# Specify which files should be added to the gem when it is released.
|
|
20
21
|
spec.files = Dir['lib/**/*.rb'] +
|
|
@@ -30,10 +31,4 @@ Gem::Specification.new do |spec|
|
|
|
30
31
|
spec.add_dependency "octokit", "~> 8.0"
|
|
31
32
|
spec.add_dependency "thor", "~> 1.0"
|
|
32
33
|
spec.add_dependency "faraday-retry", "~> 2.0"
|
|
33
|
-
|
|
34
|
-
# Development dependencies
|
|
35
|
-
spec.add_development_dependency "bundler", "~> 2.0"
|
|
36
|
-
spec.add_development_dependency "rake", "~> 13.0"
|
|
37
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
|
38
|
-
spec.add_development_dependency "asciidoctor", "~> 2.0"
|
|
39
34
|
end
|