heinzel-github 0.9.6__tar.gz → 0.9.7__tar.gz

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.
Files changed (66) hide show
  1. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/CHANGELOG.md +4 -0
  2. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/PKG-INFO +2 -2
  3. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/docs/SCREENSHOTS.md +1 -1
  4. heinzel_github-0.9.7/docs/assets/screenshots/capture.json +22 -0
  5. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/docs/assets/screenshots/index.html +1 -1
  6. heinzel_github-0.9.7/docs/assets/screenshots/issue-changes.png +0 -0
  7. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/docs/assets/screenshots/issue-changes.txt +4 -8
  8. heinzel_github-0.9.7/docs/assets/screenshots/issues-json.png +0 -0
  9. heinzel_github-0.9.7/docs/assets/screenshots/merged-cli.png +0 -0
  10. heinzel_github-0.9.7/docs/assets/screenshots/merged-work.png +0 -0
  11. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/docs/assets/screenshots/merged-work.txt +4 -8
  12. heinzel_github-0.9.7/docs/assets/screenshots/workflow-collection.png +0 -0
  13. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/docs/assets/screenshots/workflow-collection.txt +2 -7
  14. heinzel_github-0.9.7/docs/assets/screenshots/workflow-context.png +0 -0
  15. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/docs/assets/screenshots/workflow-context.txt +2 -8
  16. heinzel_github-0.9.7/docs/screenshot-definition.json +109 -0
  17. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/docs/screenshot_fixture.py +5 -1
  18. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/plugin-lock.json +2 -2
  19. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/pyproject.toml +2 -2
  20. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/integration/capability_test.py +39 -1
  21. heinzel_github-0.9.6/docs/SCREENSHOT_STORY.md +0 -34
  22. heinzel_github-0.9.6/docs/assets/screenshots/capture.json +0 -102
  23. heinzel_github-0.9.6/docs/assets/screenshots/issue-changes.png +0 -0
  24. heinzel_github-0.9.6/docs/assets/screenshots/issues-json.png +0 -0
  25. heinzel_github-0.9.6/docs/assets/screenshots/merged-cli.png +0 -0
  26. heinzel_github-0.9.6/docs/assets/screenshots/merged-work.png +0 -0
  27. heinzel_github-0.9.6/docs/assets/screenshots/source-story.md +0 -34
  28. heinzel_github-0.9.6/docs/assets/screenshots/workflow-collection.png +0 -0
  29. heinzel_github-0.9.6/docs/assets/screenshots/workflow-context.png +0 -0
  30. heinzel_github-0.9.6/docs/screenshot-definition.json +0 -7
  31. heinzel_github-0.9.6/docs/screenshots.toml +0 -80
  32. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/.gitignore +0 -0
  33. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/LICENSE +0 -0
  34. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/README.md +0 -0
  35. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/docs/assets/cli.png +0 -0
  36. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/docs/assets/screenshots/issues-json.txt +0 -0
  37. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/docs/assets/screenshots/merged-cli.txt +0 -0
  38. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/docs/assets/ui.png +0 -0
  39. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/requirements.lock +0 -0
  40. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/ruff.toml +0 -0
  41. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/src/heinzel_github/__init__.py +0 -0
  42. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/src/heinzel_github/_adapter.py +0 -0
  43. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/src/heinzel_github/_client.py +0 -0
  44. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/src/heinzel_github/_gh.py +0 -0
  45. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/src/heinzel_github/_models.py +0 -0
  46. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/src/heinzel_github/_module.py +0 -0
  47. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/src/heinzel_github/_release_feed.py +0 -0
  48. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/src/heinzel_github/_service.py +0 -0
  49. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/src/heinzel_github/py.typed +0 -0
  50. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/src/heinzel_github/skills/review-pull-request/SKILL.md +0 -0
  51. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/src/heinzel_github/skills/review-pull-request/references/checklist.md +0 -0
  52. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/acceptance/release_feed_installed_test.py +0 -0
  53. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/conftest.py +0 -0
  54. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/fake_gh.py +0 -0
  55. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/fixtures/issues.json +0 -0
  56. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/fixtures/pulls.json +0 -0
  57. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/integration/cli_test.py +0 -0
  58. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/integration/connector_test.py +0 -0
  59. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/integration/gh_test.py +0 -0
  60. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/unit/adapter_test.py +0 -0
  61. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/unit/client_test.py +0 -0
  62. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/unit/contract_test.py +0 -0
  63. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/unit/gh_test.py +0 -0
  64. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/unit/models_test.py +0 -0
  65. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/unit/release_feed_test.py +0 -0
  66. {heinzel_github-0.9.6 → heinzel_github-0.9.7}/tests/unit/service_test.py +0 -0
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.7
4
+
5
+ Requires Heinzelmännchen 0.9.59; its tests read a failed command with `heinzel.testing.cli_error_message`. Relocked.
6
+
3
7
  ## 0.9.6
4
8
 
5
9
  Requires Python 3.15; relocked.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: heinzel-github
3
- Version: 0.9.6
3
+ Version: 0.9.7
4
4
  Summary: Read pull requests and issues from GitHub: the code-host and tracker capabilities.
5
5
  Project-URL: Source, https://github.com/helmut-hoffer-von-ankershoffen/heinzel-plugins/tree/main/plugins/heinzel-github
6
6
  Project-URL: Changelog, https://github.com/helmut-hoffer-von-ankershoffen/heinzel-plugins/blob/main/plugins/heinzel-github/CHANGELOG.md
@@ -8,7 +8,7 @@ Project-URL: Issues, https://github.com/helmut-hoffer-von-ankershoffen/heinzel-p
8
8
  License-Expression: MIT
9
9
  License-File: LICENSE
10
10
  Requires-Python: >=3.15
11
- Requires-Dist: heinzel<0.10,>=0.9.16
11
+ Requires-Dist: heinzel<0.10,>=0.9.59
12
12
  Description-Content-Type: text/markdown
13
13
 
14
14
  # heinzel-github
@@ -2,7 +2,7 @@
2
2
 
3
3
  From the collection root, run `make screenshots NAME=heinzel-github OPEN=1`.
4
4
  Review the [contact sheet](assets/screenshots/index.html) before committing.
5
- The [scene plan](screenshots.toml) describes the real UI and CLI captures.
5
+ The [definition](screenshot-definition.json) describes the real UI and CLI captures.
6
6
  `make screenshots-check NAME=heinzel-github` verifies freshness offline.
7
7
 
8
8
  Captures use a temporary fictional profile without connected accounts. The generated
@@ -0,0 +1,22 @@
1
+ {
2
+ "format": 2,
3
+ "plugin": "heinzel-github",
4
+ "core_version": "0.9.59",
5
+ "inputs_sha256": "78f7f5e87ff4a90abeabf5860d0b06095eef357588756a17852ae6548b1001a8",
6
+ "images": {
7
+ "docs/assets/screenshots/workflow-collection.png": "f1b8a658dff04e9b6cf4e66aad733e63fe6cc4f873afd8f44abac7cc8f302dc1",
8
+ "docs/assets/screenshots/workflow-context.png": "bd035ddabf6add91e96b2a66c67923384ae768e79d6a8e6b5c60e2ee156c75ce",
9
+ "docs/assets/screenshots/merged-work.png": "9fe8c0b3f809fd8135828bb29593517b9ccb031da4abbe2147a228f7a9a98cd5",
10
+ "docs/assets/screenshots/issue-changes.png": "af3589d1ac243888361250db353f3fea2e0054fedef0a05d943f3805c2cba7ea",
11
+ "docs/assets/screenshots/merged-cli.png": "64627cdc9e333b9330f89b9713ce629fd8617801ac95ad1c94c037f83a6d5171",
12
+ "docs/assets/screenshots/issues-json.png": "27909799fbe4fa0e56c903a62df0069ad5a576140650617a12ca23d9f27e79c8"
13
+ },
14
+ "transcripts": {
15
+ "workflow-collection.txt": "72909209481e58529aca695f2cab27506c4b89c6ddfad622662abf8188e3c814",
16
+ "workflow-context.txt": "1e8066e98ab2689959e13e7b6fe1b39dbc579aad5425e30f049a2c2f8982f80b",
17
+ "merged-work.txt": "83dc83948b89f94898e428acdb74d9c946f0d153ffc6ff4d281dae4576008d41",
18
+ "issue-changes.txt": "2e49445fab09df4ce69daacda25546e374e63fba356cf16f1512a4048445bd88",
19
+ "merged-cli.txt": "e4df52085e704c49ba37bd75f62656de48cd879405856220a53bcebb7efdebb4",
20
+ "issues-json.txt": "a866c9bd0fe09d6dc1355428d53f5ce30511912b71452e84e925b65b89f104b0"
21
+ }
22
+ }
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width"><title>heinzel-github screenshots</title><style>body{font:16px/1.6 system-ui;margin:2rem;background:#faf8f3;color:#263b32}main{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:1rem}figure{margin:0;padding:1rem;background:white;border:1px solid #d8ddd3;border-radius:12px}img{width:100%;height:auto}figcaption{margin-top:.75rem}a:focus-visible{outline:3px solid #a64028}</style><h1>heinzel-github</h1><p>Isolated demonstration profile · Core 0.9.42 · Review these captures before committing. Click an image to inspect it at full size.</p><main><figure><a href="workflow-collection.png"><img src="workflow-collection.png" alt="The fictional weekly code review in the Core workflow graph and contracts list"></a><figcaption>UI · The fictional weekly code review in the Core workflow graph and contracts list</figcaption></figure><figure><a href="workflow-context.png"><img src="workflow-context.png" alt="Fictional weekly review declares merged-work and issue inputs; no report was generated"></a><figcaption>UI · Fictional weekly review declares merged-work and issue inputs; no report was generated</figcaption></figure><figure><a href="merged-work.png"><img src="merged-work.png" alt="Fictional merged pull requests in the app terminal, using a fixture-only requester and the real adapter"></a><figcaption>UI · Fictional merged pull requests in the app terminal, using a fixture-only requester and the real adapter</figcaption></figure><figure><a href="issue-changes.png"><img src="issue-changes.png" alt="Fictional issue changes, owners and states in the app terminal, using a fixture-only requester"></a><figcaption>UI · Fictional issue changes, owners and states in the app terminal, using a fixture-only requester</figcaption></figure><figure><a href="merged-cli.png"><img src="merged-cli.png" alt="Read fictional merged work in the shell with a fixture-only requester and the real adapter"></a><figcaption>CLI · Read fictional merged work in the shell with a fixture-only requester and the real adapter</figcaption></figure><figure><a href="issues-json.png"><img src="issues-json.png" alt="Fictional issue results as JSON for scripts and agents, using a fixture-only requester"></a><figcaption>CLI · Fictional issue results as JSON for scripts and agents, using a fixture-only requester</figcaption></figure></main></html>
1
+ <!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width"><title>heinzel-github screenshots</title><style>body{font:16px/1.6 system-ui;margin:2rem;background:#faf8f3;color:#263b32}main{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:1rem}figure{margin:0;padding:1rem;background:white;border:1px solid #d8ddd3;border-radius:12px}img{width:100%;height:auto}figcaption{margin-top:.75rem}a:focus-visible{outline:3px solid #a64028}</style><h1>heinzel-github</h1><p>Isolated demonstration profile · Core 0.9.59 · Review these captures before committing. Click an image to inspect it at full size.</p><main><figure><a href="workflow-collection.png"><img src="workflow-collection.png" alt="The fictional weekly code review in the Core workflow graph and contracts list"></a><figcaption>UI · The fictional weekly code review in the Core workflow graph and contracts list</figcaption></figure><figure><a href="workflow-context.png"><img src="workflow-context.png" alt="Fictional weekly review declares merged-work and issue inputs; no report was generated"></a><figcaption>UI · Fictional weekly review declares merged-work and issue inputs; no report was generated</figcaption></figure><figure><a href="merged-work.png"><img src="merged-work.png" alt="Fictional merged pull requests in the app terminal, using a fixture-only requester and the real adapter"></a><figcaption>UI · Fictional merged pull requests in the app terminal, using a fixture-only requester and the real adapter</figcaption></figure><figure><a href="issue-changes.png"><img src="issue-changes.png" alt="Fictional issue changes, owners and states in the app terminal, using a fixture-only requester"></a><figcaption>UI · Fictional issue changes, owners and states in the app terminal, using a fixture-only requester</figcaption></figure><figure><a href="merged-cli.png"><img src="merged-cli.png" alt="Read fictional merged work in the shell with a fixture-only requester and the real adapter"></a><figcaption>CLI · Read fictional merged work in the shell with a fixture-only requester and the real adapter</figcaption></figure><figure><a href="issues-json.png"><img src="issues-json.png" alt="Fictional issue results as JSON for scripts and agents, using a fixture-only requester"></a><figcaption>CLI · Fictional issue results as JSON for scripts and agents, using a fixture-only requester</figcaption></figure></main></html>
@@ -1,6 +1,5 @@
1
1
  Skip to content
2
2
  Heinzelmännchen
3
- Heinzelmännchen
4
3
  Contracts
5
4
  Team graph
6
5
  Weekly code review
@@ -11,20 +10,17 @@ Mira
11
10
  · EM
12
11
  Today
13
12
  Today
14
- Doctor: 4 checks need attention
13
+ Doctor: 5 checks need attention
15
14
 
16
- ai.access ai access, system.doctor installation, system.prerequisite system.runner: claude…
15
+ ai.access ai access, system.doctor installation, system.prerequisite system: gh…
17
16
 
18
17
  Open
19
- v0.9.42
20
- Plugins changed, warning
18
+ v0.9.59
21
19
  Updates, off
22
20
  0
23
21
  System health, warning
24
22
  ?
25
- Daemon not installed, off
26
- Chat
27
- Terminal
23
+ Background service not installed, off
28
24
  Demo complete
29
25
  $ hz showcase issues acme/widgets; printf '\033]0;Demo complete\007'
30
26
  ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━┓
@@ -1,6 +1,5 @@
1
1
  Skip to content
2
2
  Heinzelmännchen
3
- Heinzelmännchen
4
3
  Contracts
5
4
  Team graph
6
5
  Weekly code review
@@ -11,20 +10,17 @@ Mira
11
10
  · EM
12
11
  Today
13
12
  Today
14
- Doctor: 4 checks need attention
13
+ Doctor: 5 checks need attention
15
14
 
16
- ai.access ai access, system.doctor installation, system.prerequisite system.runner: claude…
15
+ ai.access ai access, system.doctor installation, system.prerequisite system: gh…
17
16
 
18
17
  Open
19
- v0.9.42
20
- Plugins changed, warning
18
+ v0.9.59
21
19
  Updates, off
22
20
  0
23
21
  System health, warning
24
22
  ?
25
- Daemon not installed, off
26
- Chat
27
- Terminal
23
+ Background service not installed, off
28
24
  Demo complete
29
25
  $ hz showcase merged acme/widgets; printf '\033]0;Demo complete\007'
30
26
  ┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
@@ -1,6 +1,5 @@
1
1
  Skip to content
2
2
  Heinzelmännchen
3
- Heinzelmännchen
4
3
  Contracts
5
4
  Team graph
6
5
  Weekly code review
@@ -55,14 +54,10 @@ All contracts
55
54
  Weekly code review
56
55
  me:weekly-code-review
57
56
  by hand only
58
- v0.9.42
57
+ v0.9.59
59
58
  Updates, off
60
59
  0
61
60
  System health, warning
62
61
  ?
63
- Daemon not installed, off
64
- Chat
65
- New chat
66
- Your message
67
- Default
62
+ Background service not installed, off
68
63
  Audio
@@ -1,6 +1,5 @@
1
1
  Skip to content
2
2
  Heinzelmännchen
3
- Heinzelmännchen
4
3
  Contracts
5
4
  Team graph
6
5
  Weekly code review
@@ -37,15 +36,10 @@ the packet the agent gets; nothing is spent
37
36
  hz heinzel wake me:weekly-code-review
38
37
  Run in terminal
39
38
  draft it now, at most 0.5 USD; the draft is saved under /demo-profile/data_dir/workflow/drafts/me-weekly-code-review
40
- v0.9.42
41
- Plugins changed, warning
39
+ v0.9.59
42
40
  Updates, off
43
41
  0
44
42
  System health, warning
45
43
  ?
46
- Daemon not installed, off
47
- Chat
48
- New chat
49
- Your message
50
- Default
44
+ Background service not installed, off
51
45
  Audio
@@ -0,0 +1,109 @@
1
+ {
2
+ "format": 1,
3
+ "bootstrap": "docs/screenshot_fixture.py",
4
+ "browser_time": "2026-11-01T00:00:00Z",
5
+ "scenes": [
6
+ {
7
+ "name": "workflow-collection",
8
+ "surface": "ui",
9
+ "route": "/contracts",
10
+ "appearance": "light",
11
+ "caption": "The fictional weekly code review in the Core workflow graph and contracts list",
12
+ "timeout_ms": 30000,
13
+ "steps": [
14
+ {
15
+ "action": "wait",
16
+ "text": "Weekly code review"
17
+ }
18
+ ],
19
+ "viewport": {
20
+ "width": 1440,
21
+ "height": 960
22
+ }
23
+ },
24
+ {
25
+ "name": "workflow-context",
26
+ "surface": "ui",
27
+ "route": "/contracts/weekly-code-review",
28
+ "appearance": "dark",
29
+ "caption": "Fictional weekly review declares merged-work and issue inputs; no report was generated",
30
+ "timeout_ms": 30000,
31
+ "steps": [
32
+ {
33
+ "action": "wait",
34
+ "role": "heading",
35
+ "name": "Weekly code review"
36
+ }
37
+ ],
38
+ "viewport": {
39
+ "width": 1280,
40
+ "height": 800
41
+ }
42
+ },
43
+ {
44
+ "name": "merged-work",
45
+ "surface": "ui",
46
+ "route": "/",
47
+ "appearance": "light",
48
+ "caption": "Fictional merged pull requests in the app terminal, using a fixture-only requester and the real adapter",
49
+ "timeout_ms": 30000,
50
+ "steps": [
51
+ {
52
+ "action": "terminal",
53
+ "command": [
54
+ "showcase",
55
+ "merged",
56
+ "acme/widgets"
57
+ ]
58
+ }
59
+ ],
60
+ "viewport": {
61
+ "width": 1280,
62
+ "height": 650
63
+ }
64
+ },
65
+ {
66
+ "name": "issue-changes",
67
+ "surface": "ui",
68
+ "route": "/",
69
+ "appearance": "dark",
70
+ "caption": "Fictional issue changes, owners and states in the app terminal, using a fixture-only requester",
71
+ "timeout_ms": 30000,
72
+ "steps": [
73
+ {
74
+ "action": "terminal",
75
+ "command": [
76
+ "showcase",
77
+ "issues",
78
+ "acme/widgets"
79
+ ]
80
+ }
81
+ ],
82
+ "viewport": {
83
+ "width": 1280,
84
+ "height": 650
85
+ }
86
+ },
87
+ {
88
+ "name": "merged-cli",
89
+ "surface": "cli",
90
+ "caption": "Read fictional merged work in the shell with a fixture-only requester and the real adapter",
91
+ "command": [
92
+ "showcase",
93
+ "merged",
94
+ "acme/widgets"
95
+ ]
96
+ },
97
+ {
98
+ "name": "issues-json",
99
+ "surface": "cli",
100
+ "caption": "Fictional issue results as JSON for scripts and agents, using a fixture-only requester",
101
+ "command": [
102
+ "showcase",
103
+ "issues",
104
+ "acme/widgets",
105
+ "--json"
106
+ ]
107
+ }
108
+ ]
109
+ }
@@ -44,7 +44,11 @@ os.environ["HZ_HEINZEL__USER_DIR"] = str(contract_folder)
44
44
  def launch(requester, runner_type, runner):
45
45
  configuration = Config.load()
46
46
  records, errors = discover()
47
- records.append(ModuleRecord("showcase", requester, Origin("heinzel-documentation-fixture", "1.0.0", builtin=False)))
47
+ # CLI helpers are not installed distributions and must not enter the UI inventory.
48
+ if sys.argv[1:2] == ["showcase"]:
49
+ records.append(
50
+ ModuleRecord("showcase", requester, Origin("heinzel-documentation-fixture", "1.0.0", builtin=False))
51
+ )
48
52
  kernel = Kernel(configuration.settings(Settings, "hz"), records, errors, configuration)
49
53
  kernel.bind(runner_type, runner)
50
54
  sys.argv = ["hz", *sys.argv[1:]]
@@ -5,7 +5,7 @@
5
5
  "coverage>=7.12",
6
6
  "editables>=0.5",
7
7
  "hatchling>=1.29.0",
8
- "heinzel>=0.9.16,<0.10",
8
+ "heinzel>=0.9.59,<0.10",
9
9
  "mypy>=1.19.0,<3",
10
10
  "pyright[nodejs]==1.1.414",
11
11
  "pytest-timeout>=2.4.0,<3",
@@ -14,6 +14,6 @@
14
14
  "ruff==0.17.2"
15
15
  ],
16
16
  "core": {
17
- "version": "0.9.53"
17
+ "version": "0.9.59"
18
18
  }
19
19
  }
@@ -1,12 +1,12 @@
1
1
  [project]
2
2
  name = "heinzel-github"
3
- version = "0.9.6"
3
+ version = "0.9.7"
4
4
  description = "Read pull requests and issues from GitHub: the code-host and tracker capabilities."
5
5
  readme = "README.md"
6
6
  license = "MIT"
7
7
  license-files = ["LICENSE"]
8
8
  requires-python = ">=3.15"
9
- dependencies = ["heinzel>=0.9.16,<0.10"]
9
+ dependencies = ["heinzel>=0.9.59,<0.10"]
10
10
 
11
11
  [project.urls]
12
12
  Source = "https://github.com/helmut-hoffer-von-ankershoffen/heinzel-plugins/tree/main/plugins/heinzel-github"
@@ -3,10 +3,13 @@
3
3
  import json
4
4
  import logging
5
5
  from datetime import datetime
6
+ from typing import Annotated
6
7
 
7
8
  import pytest
9
+ import typer
8
10
  from heinzel import CodeHost, Config, Issue, Kernel, Module, PullRequest, Tracker, Window
9
11
  from heinzel.heads.cli import build
12
+ from heinzel.testing import cli_error_message
10
13
  from typer.testing import CliRunner
11
14
 
12
15
  from heinzel_github import _gh
@@ -44,13 +47,49 @@ def digest() -> Module:
44
47
 
45
48
 
46
49
  def hz(kernel: Kernel, *args: str) -> tuple[int, object]:
50
+ """Run `hz ... --json`: the exit code and the parsed result; a failure reads as its message, without `Error:`."""
47
51
  result = CliRunner().invoke(build(kernel), [*args, "--json"])
52
+ if result.exit_code:
53
+ return result.exit_code, cli_error_message(result)
48
54
  try:
49
55
  return result.exit_code, json.loads(result.output)
50
56
  except json.JSONDecodeError:
51
57
  return result.exit_code, result.output
52
58
 
53
59
 
60
+ @pytest.mark.parametrize(
61
+ ("printed", "code"),
62
+ [
63
+ ("Error: gh is missing", 1), # Core 0.9.58
64
+ (json.dumps({"error": "gh is missing", "code": "not_supported"}), 1), # Core 0.9.59
65
+ ],
66
+ )
67
+ def test_a_failure_reads_the_same_as_text_or_as_a_json_error_object(monkeypatch, printed, code):
68
+ app = typer.Typer()
69
+
70
+ @app.command()
71
+ def fail(as_json: Annotated[bool, typer.Option("--json")] = False) -> None:
72
+ assert as_json
73
+ typer.echo(printed, err=True)
74
+ raise typer.Exit(code)
75
+
76
+ monkeypatch.setitem(globals(), "build", lambda _kernel: app)
77
+ exit_code, output = hz(None) # type: ignore[arg-type] # the patched build ignores the kernel
78
+ assert (exit_code, output) == (1, "gh is missing")
79
+
80
+
81
+ def test_a_result_that_holds_an_error_field_stays_a_result(monkeypatch):
82
+ app = typer.Typer()
83
+
84
+ @app.command()
85
+ def answer(as_json: Annotated[bool, typer.Option("--json")] = False) -> None:
86
+ assert as_json
87
+ typer.echo(json.dumps({"error": "a field of a successful answer"}))
88
+
89
+ monkeypatch.setitem(globals(), "build", lambda _kernel: app)
90
+ assert hz(None) == (0, {"error": "a field of a successful answer"}) # type: ignore[arg-type]
91
+
92
+
54
93
  @pytest.fixture
55
94
  def github(fake_gh_cli):
56
95
  fake_gh_cli.answer(PULLS, fixture="pulls.json")
@@ -116,7 +155,6 @@ def test_without_gh_the_command_and_doctor_say_how_to_install_it(github_kernel,
116
155
  code, output = hz(kernel, "digest", "merged", "acme/widgets", SINCE, UNTIL)
117
156
  assert code != 0
118
157
  assert str(output).split() == [
119
- "Error:",
120
158
  *INSTALL_GH.split(),
121
159
  "then",
122
160
  "run",
@@ -1,34 +0,0 @@
1
- ## Audience and outcome
2
-
3
- A developer or team lead considering the GitHub connector can see how a fictional weekly review brings merged pull requests and changed issues into a Core workflow, then inspect the underlying results. The gallery demonstrates read capability through an offline fixture; it does not claim to show a generated review or a live GitHub connection.
4
-
5
- ## Scenes
6
-
7
- 1. **Workflow collection — light:** The Core contracts list and graph introduce the fictional Weekly code review and its place in a workflow.
8
- 2. **Workflow context — dark:** The same fictional workflow’s detail shows its merged-work and issue inputs. It declares a workflow; no report was generated. These two scenes show different useful states of a Core feature, not two captions on the same capture.
9
- 3. **Merged work:** The native app terminal shows fictional merged pull requests, dates and authors through the real adapter and the fixture-only requester.
10
- 4. **Issue changes:** The native app terminal shows fictional issue titles, states and owners through the same adapter. These terminal captures are labeled as terminal results, not feature UI.
11
- 5. **Merged CLI:** A shell result shows the fictional merged-work table.
12
- 6. **Issues JSON:** A shell result shows fictional issue data in JSON for a script or agent.
13
-
14
- The existing plan already covers these useful behaviors and is preserved. The two terminal cases are different fixture operations, rather than two parameters of one operation. `docs/screenshot_fixture.py` supplies the existing bootstrap, the fictional `acme/widgets` records, the October window, the local contract, and the `showcase.merged` and `showcase.issues` operations. Its `DemoGh` returns fictional responses while the real adapter converts them. These showcase commands are documentation fixtures, not commands supplied by the installed plugin.
15
-
16
- ## Source-bound UI surface inventory
17
-
18
- - **Core feature UI:** `docs/screenshot_fixture.py` writes the Weekly code review contract with `code-host:read` and `tracker:read` inputs. The existing `docs/screenshots.toml` declares `/contracts` and `/contracts/weekly-code-review` captures. The collection route is a known Core route; the detail route and its heading are evidenced by the existing plan, but their actual rendering remains unverified from the provided source. Capture must confirm both scenes are genuinely useful and distinct.
19
- - **Core connector/setup UI:** `README.md`, “Is it connected?”, explicitly identifies Settings → Connectors as a surface for login status. `src/heinzel_github/__init__.py` declares settings, offline `@module.health`, and on-demand `@module.health(live=True)`; `src/heinzel_github/_service.py` defines their checks. This is real Core-rendered setup UI, but the supplied fixture and plan do not establish a safe, useful capture of it. The live test asks GitHub and is outside this offline story.
20
- - **Core operation and information surfaces:** `src/heinzel_github/__init__.py` declares `@module.operation` `info`, `@module.info` `system_info`, and read-only `module.provides` registrations for `code-host` and `tracker`. `src/heinzel_github/_models.py` defines the information and settings fields. The supplied files do not establish a dedicated feature view or route for those contributions; they must not be assumed terminal-only merely because a Page or View is absent. The fixture’s rendered operations do support the explicitly labeled app-terminal results.
21
- - **External provider UI:** GitHub and `gh auth login` belong to the external provider, not a plugin screen (`README.md`, “Set up”). No external-provider screen is proposed.
22
- - **Other entry point and conditional service:** `pyproject.toml` declares both `heinzel.modules` and `heinzel.connected_sources` as `github = "heinzel_github"`. The actual module declarations are in `src/heinzel_github/__init__.py`; conditional `GithubReleaseFeeds` registration depends on Core support and captured-source activation. `src/heinzel_github/_release_feed.py` declares `supported_operations = {"release-feed"}` and its lease behavior. The README describes a draft-workflow release feed, but the supplied sources do not establish its rendered route or an offline fixture for it. Do not invent a screen or claim the gallery demonstrates that feed.
23
- - **Remaining contributions:** The inspected module declarations include a skill (`src/heinzel_github/skills/review-pull-request/SKILL.md`) and services, but no declared navigation, channel, approval, footer, Page or View contribution. This does not rule out generic Core rendering; the Core implementation is not among the provided files.
24
-
25
- ## Fictional fixtures and privacy
26
-
27
- The repository, people, pull requests, issues and contract are demonstration data from `docs/screenshot_fixture.py`. Fixture login and version values simulate `gh`; they do not establish a real connection. Normal presentation fictionalization maps verified owning-interpreter paths to `/demo-profile/.venv`, and only the verified whole hostname detail in the genuine Doctor row to `demo-host`. These mappings change no SDK health status or remaining detail and establish no privacy acceptance. Unknown identities still fail, and an independent reviewer must inspect every image and transcript. Check paths, hostnames, accounts, tokens, URLs and incidental UI content; do not assume the fixture makes the entire capture private.
28
-
29
- ## Acceptance criteria
30
-
31
- - Capture the existing isolated bootstrap only during explicit capture; make no network requests. Confirm the two contracts scenes render the stated, distinct feature states in applied light and dark appearances. If the detail route or heading fails, report the unresolved evidence instead of fabricating a replacement.
32
- - Confirm both app-terminal results and both CLI results contain the expected fictional records, with pull requests excluded from the issue result. Clearly identify the requester and data as fictional; do not imply a generated report, live GitHub response, or production `showcase` command.
33
- - Reject duplicate captures, caption-only differences, terminal output presented as feature UI, and forged HTML. Review the contact sheet and each image and transcript independently for truthfulness and privacy before publication.
34
- - The TOML below has been checked against the requested structure by inspection; capture behavior and actual UI rendering have not been executed or verified.
@@ -1,102 +0,0 @@
1
- {
2
- "format": 1,
3
- "plugin": "heinzel-github",
4
- "core_version": "0.9.42",
5
- "inputs_sha256": "18fabfad3015f45e39ca88fa13fa9bb37e17f56f3e9e66b549162cd39884e094",
6
- "images": {
7
- "docs/assets/screenshots/workflow-collection.png": "8d71f9c242a8265a315a11006af86bfd21f41ab18d5cd8edc668c89fc4c73a8d",
8
- "docs/assets/screenshots/workflow-context.png": "2407f5b0dbfdf2d23895961f6c33af353f0d007b1651cdb342ad92433740435e",
9
- "docs/assets/screenshots/merged-work.png": "0baf90373abc10ed8a8a1f31909a78f6d4e9875d81b3157c4a0a79733c2218d8",
10
- "docs/assets/screenshots/issue-changes.png": "bc3311ff71e68815e7488de603f36a4246ef92b55ec598ad0d2f13b988fecdc5",
11
- "docs/assets/screenshots/merged-cli.png": "787d4a4a73a860dbf4b33fd849f9737e0a58e5495e3e94ea1104a0e60bdf7233",
12
- "docs/assets/screenshots/issues-json.png": "e3754138bf5a295204a0f986463e9a54dda6168697fa870ab9c3d41b3d7ff6bd"
13
- },
14
- "review_bundle": {
15
- "format": 2,
16
- "source_story": {
17
- "path": "source-story.md",
18
- "sha256": "64652889140ce55c6653af1e7f459a842670a3f149f6ff2e1e38eb863476dc96"
19
- },
20
- "definition": {
21
- "format": 1,
22
- "reviewer": "story-confirm-sonnet",
23
- "source_sha256": "650cdaaf893882cf88076b77a29b477874e20e4f409416ab3a5409b19f6e4c3c",
24
- "plan_sha256": "4b2f2733e91a815803ccfec3f3159a7b58900ad41be8c262d4b514b685420e07",
25
- "story_sha256": "64652889140ce55c6653af1e7f459a842670a3f149f6ff2e1e38eb863476dc96"
26
- },
27
- "plugin": "heinzel-github",
28
- "core_version": "0.9.42",
29
- "inputs_sha256": "18fabfad3015f45e39ca88fa13fa9bb37e17f56f3e9e66b549162cd39884e094",
30
- "screenshots": [
31
- {
32
- "path": "docs/assets/screenshots/workflow-collection.png",
33
- "surface": "ui",
34
- "caption": "The fictional weekly code review in the Core workflow graph and contracts list"
35
- },
36
- {
37
- "path": "docs/assets/screenshots/workflow-context.png",
38
- "surface": "ui",
39
- "caption": "Fictional weekly review declares merged-work and issue inputs; no report was generated"
40
- },
41
- {
42
- "path": "docs/assets/screenshots/merged-work.png",
43
- "surface": "ui",
44
- "caption": "Fictional merged pull requests in the app terminal, using a fixture-only requester and the real adapter"
45
- },
46
- {
47
- "path": "docs/assets/screenshots/issue-changes.png",
48
- "surface": "ui",
49
- "caption": "Fictional issue changes, owners and states in the app terminal, using a fixture-only requester"
50
- },
51
- {
52
- "path": "docs/assets/screenshots/merged-cli.png",
53
- "surface": "cli",
54
- "caption": "Read fictional merged work in the shell with a fixture-only requester and the real adapter"
55
- },
56
- {
57
- "path": "docs/assets/screenshots/issues-json.png",
58
- "surface": "cli",
59
- "caption": "Fictional issue results as JSON for scripts and agents, using a fixture-only requester"
60
- }
61
- ],
62
- "images": {
63
- "workflow-collection.png": "8d71f9c242a8265a315a11006af86bfd21f41ab18d5cd8edc668c89fc4c73a8d",
64
- "workflow-context.png": "2407f5b0dbfdf2d23895961f6c33af353f0d007b1651cdb342ad92433740435e",
65
- "merged-work.png": "0baf90373abc10ed8a8a1f31909a78f6d4e9875d81b3157c4a0a79733c2218d8",
66
- "issue-changes.png": "bc3311ff71e68815e7488de603f36a4246ef92b55ec598ad0d2f13b988fecdc5",
67
- "merged-cli.png": "787d4a4a73a860dbf4b33fd849f9737e0a58e5495e3e94ea1104a0e60bdf7233",
68
- "issues-json.png": "e3754138bf5a295204a0f986463e9a54dda6168697fa870ab9c3d41b3d7ff6bd"
69
- },
70
- "transcripts": {
71
- "workflow-collection.txt": "1ceaa17dd0c524475add03a07896d3c51c531c0ea2a9d408c7eb19d4dc122901",
72
- "workflow-context.txt": "126046e987c956072c8cf7de9806f59d8c7b886038b9001fd85b16bbfb329ae6",
73
- "merged-work.txt": "c3d9eccdb181ea1ba8482d12aa9ebb2277c45c93f49a97d7bbe3ad11ea3ae61f",
74
- "issue-changes.txt": "689484e31972830887f4e7fc500bbe335e0241d8fa4bf324a7be9f23796f6bf1",
75
- "merged-cli.txt": "e4df52085e704c49ba37bd75f62656de48cd879405856220a53bcebb7efdebb4",
76
- "issues-json.txt": "a866c9bd0fe09d6dc1355428d53f5ce30511912b71452e84e925b65b89f104b0"
77
- },
78
- "bundle_sha256": "3e363e6d607df9e08049ce52a75baab073b0563b85bb20808e2ecef359535745"
79
- },
80
- "privacy_review": {
81
- "format": 1,
82
- "bundle_sha256": "3e363e6d607df9e08049ce52a75baab073b0563b85bb20808e2ecef359535745",
83
- "reviewer": "privacy-review-opus",
84
- "decision": "approve",
85
- "checked_images": [
86
- "workflow-collection.png",
87
- "workflow-context.png",
88
- "merged-work.png",
89
- "issue-changes.png",
90
- "merged-cli.png",
91
- "issues-json.png"
92
- ],
93
- "checks": {
94
- "tokens_absent": true,
95
- "personal_data_absent": true,
96
- "feature_relevant": true,
97
- "multiple_ui_scenes": true,
98
- "captions_accurate": true
99
- },
100
- "findings": []
101
- }
102
- }
@@ -1,34 +0,0 @@
1
- ## Audience and outcome
2
-
3
- A developer or team lead considering the GitHub connector can see how a fictional weekly review brings merged pull requests and changed issues into a Core workflow, then inspect the underlying results. The gallery demonstrates read capability through an offline fixture; it does not claim to show a generated review or a live GitHub connection.
4
-
5
- ## Scenes
6
-
7
- 1. **Workflow collection — light:** The Core contracts list and graph introduce the fictional Weekly code review and its place in a workflow.
8
- 2. **Workflow context — dark:** The same fictional workflow’s detail shows its merged-work and issue inputs. It declares a workflow; no report was generated. These two scenes show different useful states of a Core feature, not two captions on the same capture.
9
- 3. **Merged work:** The native app terminal shows fictional merged pull requests, dates and authors through the real adapter and the fixture-only requester.
10
- 4. **Issue changes:** The native app terminal shows fictional issue titles, states and owners through the same adapter. These terminal captures are labeled as terminal results, not feature UI.
11
- 5. **Merged CLI:** A shell result shows the fictional merged-work table.
12
- 6. **Issues JSON:** A shell result shows fictional issue data in JSON for a script or agent.
13
-
14
- The existing plan already covers these useful behaviors and is preserved. The two terminal cases are different fixture operations, rather than two parameters of one operation. `docs/screenshot_fixture.py` supplies the existing bootstrap, the fictional `acme/widgets` records, the October window, the local contract, and the `showcase.merged` and `showcase.issues` operations. Its `DemoGh` returns fictional responses while the real adapter converts them. These showcase commands are documentation fixtures, not commands supplied by the installed plugin.
15
-
16
- ## Source-bound UI surface inventory
17
-
18
- - **Core feature UI:** `docs/screenshot_fixture.py` writes the Weekly code review contract with `code-host:read` and `tracker:read` inputs. The existing `docs/screenshots.toml` declares `/contracts` and `/contracts/weekly-code-review` captures. The collection route is a known Core route; the detail route and its heading are evidenced by the existing plan, but their actual rendering remains unverified from the provided source. Capture must confirm both scenes are genuinely useful and distinct.
19
- - **Core connector/setup UI:** `README.md`, “Is it connected?”, explicitly identifies Settings → Connectors as a surface for login status. `src/heinzel_github/__init__.py` declares settings, offline `@module.health`, and on-demand `@module.health(live=True)`; `src/heinzel_github/_service.py` defines their checks. This is real Core-rendered setup UI, but the supplied fixture and plan do not establish a safe, useful capture of it. The live test asks GitHub and is outside this offline story.
20
- - **Core operation and information surfaces:** `src/heinzel_github/__init__.py` declares `@module.operation` `info`, `@module.info` `system_info`, and read-only `module.provides` registrations for `code-host` and `tracker`. `src/heinzel_github/_models.py` defines the information and settings fields. The supplied files do not establish a dedicated feature view or route for those contributions; they must not be assumed terminal-only merely because a Page or View is absent. The fixture’s rendered operations do support the explicitly labeled app-terminal results.
21
- - **External provider UI:** GitHub and `gh auth login` belong to the external provider, not a plugin screen (`README.md`, “Set up”). No external-provider screen is proposed.
22
- - **Other entry point and conditional service:** `pyproject.toml` declares both `heinzel.modules` and `heinzel.connected_sources` as `github = "heinzel_github"`. The actual module declarations are in `src/heinzel_github/__init__.py`; conditional `GithubReleaseFeeds` registration depends on Core support and captured-source activation. `src/heinzel_github/_release_feed.py` declares `supported_operations = {"release-feed"}` and its lease behavior. The README describes a draft-workflow release feed, but the supplied sources do not establish its rendered route or an offline fixture for it. Do not invent a screen or claim the gallery demonstrates that feed.
23
- - **Remaining contributions:** The inspected module declarations include a skill (`src/heinzel_github/skills/review-pull-request/SKILL.md`) and services, but no declared navigation, channel, approval, footer, Page or View contribution. This does not rule out generic Core rendering; the Core implementation is not among the provided files.
24
-
25
- ## Fictional fixtures and privacy
26
-
27
- The repository, people, pull requests, issues and contract are demonstration data from `docs/screenshot_fixture.py`. Fixture login and version values simulate `gh`; they do not establish a real connection. Normal presentation fictionalization maps verified owning-interpreter paths to `/demo-profile/.venv`, and only the verified whole hostname detail in the genuine Doctor row to `demo-host`. These mappings change no SDK health status or remaining detail and establish no privacy acceptance. Unknown identities still fail, and an independent reviewer must inspect every image and transcript. Check paths, hostnames, accounts, tokens, URLs and incidental UI content; do not assume the fixture makes the entire capture private.
28
-
29
- ## Acceptance criteria
30
-
31
- - Capture the existing isolated bootstrap only during explicit capture; make no network requests. Confirm the two contracts scenes render the stated, distinct feature states in applied light and dark appearances. If the detail route or heading fails, report the unresolved evidence instead of fabricating a replacement.
32
- - Confirm both app-terminal results and both CLI results contain the expected fictional records, with pull requests excluded from the issue result. Clearly identify the requester and data as fictional; do not imply a generated report, live GitHub response, or production `showcase` command.
33
- - Reject duplicate captures, caption-only differences, terminal output presented as feature UI, and forged HTML. Review the contact sheet and each image and transcript independently for truthfulness and privacy before publication.
34
- - The TOML below has been checked against the requested structure by inspection; capture behavior and actual UI rendering have not been executed or verified.
@@ -1,7 +0,0 @@
1
- {
2
- "format": 1,
3
- "reviewer": "story-confirm-sonnet",
4
- "source_sha256": "650cdaaf893882cf88076b77a29b477874e20e4f409416ab3a5409b19f6e4c3c",
5
- "plan_sha256": "4b2f2733e91a815803ccfec3f3159a7b58900ad41be8c262d4b514b685420e07",
6
- "story_sha256": "64652889140ce55c6653af1e7f459a842670a3f149f6ff2e1e38eb863476dc96"
7
- }
@@ -1,80 +0,0 @@
1
- format = 1
2
- bootstrap = "docs/screenshot_fixture.py"
3
- browser_time = "2026-11-01T00:00:00Z"
4
-
5
- [[scenes]]
6
- name = "workflow-collection"
7
- surface = "ui"
8
- route = "/contracts"
9
- appearance = "light"
10
- caption = "The fictional weekly code review in the Core workflow graph and contracts list"
11
- timeout_ms = 30000
12
-
13
- [[scenes.steps]]
14
- action = "wait"
15
- text = "Weekly code review"
16
-
17
- [scenes.viewport]
18
- width = 1440
19
- height = 960
20
-
21
- [[scenes]]
22
- name = "workflow-context"
23
- surface = "ui"
24
- route = "/contracts/weekly-code-review"
25
- appearance = "dark"
26
- caption = "Fictional weekly review declares merged-work and issue inputs; no report was generated"
27
- timeout_ms = 30000
28
-
29
- [[scenes.steps]]
30
- action = "wait"
31
- role = "heading"
32
- name = "Weekly code review"
33
-
34
- [scenes.viewport]
35
- width = 1280
36
- height = 800
37
-
38
- [[scenes]]
39
- name = "merged-work"
40
- surface = "ui"
41
- route = "/"
42
- appearance = "light"
43
- caption = "Fictional merged pull requests in the app terminal, using a fixture-only requester and the real adapter"
44
- timeout_ms = 30000
45
-
46
- [[scenes.steps]]
47
- action = "terminal"
48
- command = ["showcase", "merged", "acme/widgets"]
49
-
50
- [scenes.viewport]
51
- width = 1280
52
- height = 650
53
-
54
- [[scenes]]
55
- name = "issue-changes"
56
- surface = "ui"
57
- route = "/"
58
- appearance = "dark"
59
- caption = "Fictional issue changes, owners and states in the app terminal, using a fixture-only requester"
60
- timeout_ms = 30000
61
-
62
- [[scenes.steps]]
63
- action = "terminal"
64
- command = ["showcase", "issues", "acme/widgets"]
65
-
66
- [scenes.viewport]
67
- width = 1280
68
- height = 650
69
-
70
- [[scenes]]
71
- name = "merged-cli"
72
- surface = "cli"
73
- caption = "Read fictional merged work in the shell with a fixture-only requester and the real adapter"
74
- command = ["showcase", "merged", "acme/widgets"]
75
-
76
- [[scenes]]
77
- name = "issues-json"
78
- surface = "cli"
79
- caption = "Fictional issue results as JSON for scripts and agents, using a fixture-only requester"
80
- command = ["showcase", "issues", "acme/widgets", "--json"]
File without changes
File without changes
File without changes