polyctl 0.7.0__py3-none-any.whl
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.
- polyctl/__init__.py +7 -0
- polyctl/__main__.py +5 -0
- polyctl/a2a.py +226 -0
- polyctl/a2a_mcp.py +546 -0
- polyctl/acp.py +417 -0
- polyctl/adapters/README.md +101 -0
- polyctl/adapters/aider.json +32 -0
- polyctl/adapters/amazon-q.json +15 -0
- polyctl/adapters/amp.json +16 -0
- polyctl/adapters/antigravity.json +120 -0
- polyctl/adapters/claude-code.json +229 -0
- polyctl/adapters/cloud-generic.json +57 -0
- polyctl/adapters/codex.json +47 -0
- polyctl/adapters/command-code.json +45 -0
- polyctl/adapters/copilot.json +17 -0
- polyctl/adapters/cursor-agent.json +29 -0
- polyctl/adapters/deepseek.json +13 -0
- polyctl/adapters/droid.json +34 -0
- polyctl/adapters/gemini.json +30 -0
- polyctl/adapters/grok.json +22 -0
- polyctl/adapters/hermes.json +34 -0
- polyctl/adapters/kilocode.json +30 -0
- polyctl/adapters/kimi.json +23 -0
- polyctl/adapters/kiro.json +332 -0
- polyctl/adapters/ollama.json +29 -0
- polyctl/adapters/omp.json +34 -0
- polyctl/adapters/openai-api.json +68 -0
- polyctl/adapters/opencode.json +162 -0
- polyctl/adapters/pi.json +24 -0
- polyctl/adapters/pr-agent.json +54 -0
- polyctl/adapters/profiles.json +9 -0
- polyctl/adapters/qoder.json +163 -0
- polyctl/adapters/qwen.json +27 -0
- polyctl/adapters/reasonix.json +25 -0
- polyctl/adapters/rewriters/rtk.json +24 -0
- polyctl/adapters/trae.json +31 -0
- polyctl/adapters/vendors.json +42 -0
- polyctl/adapters/warp.json +88 -0
- polyctl/allowlist.py +1756 -0
- polyctl/api_review.py +920 -0
- polyctl/cli.py +835 -0
- polyctl/conformance_harness.py +9 -0
- polyctl/demo.py +503 -0
- polyctl/drivers.py +146 -0
- polyctl/email.py +160 -0
- polyctl/features.py +98 -0
- polyctl/journal.py +144 -0
- polyctl/language.py +945 -0
- polyctl/lib.py +1296 -0
- polyctl/matrix.py +660 -0
- polyctl/mcp.py +1362 -0
- polyctl/ntfy.py +169 -0
- polyctl/outbound.py +39 -0
- polyctl/parts/__init__.py +5 -0
- polyctl/parts/cli_authority.py +2615 -0
- polyctl/parts/cli_channels.py +1325 -0
- polyctl/parts/cli_checks.py +2293 -0
- polyctl/parts/cli_completion.py +686 -0
- polyctl/parts/cli_evidence.py +141 -0
- polyctl/parts/cli_gain.py +375 -0
- polyctl/parts/cli_harness.py +392 -0
- polyctl/parts/cli_hooks.py +1816 -0
- polyctl/parts/cli_install.py +638 -0
- polyctl/parts/cli_lanes.py +106 -0
- polyctl/parts/cli_maintenance.py +2536 -0
- polyctl/parts/cli_next.py +248 -0
- polyctl/parts/cli_pr.py +53 -0
- polyctl/parts/cli_project.py +2857 -0
- polyctl/parts/cli_review.py +5158 -0
- polyctl/parts/cli_status.py +898 -0
- polyctl/parts/lib_adapters.py +2933 -0
- polyctl/parts/lib_alarms.py +2106 -0
- polyctl/parts/lib_events.py +224 -0
- polyctl/parts/lib_evidence.py +412 -0
- polyctl/parts/lib_gates.py +2099 -0
- polyctl/parts/lib_lanes.py +829 -0
- polyctl/parts/lib_mail.py +1541 -0
- polyctl/parts/lib_next.py +652 -0
- polyctl/parts/lib_pr.py +331 -0
- polyctl/parts/lib_slices.py +3337 -0
- polyctl/parts/lib_state.py +2415 -0
- polyctl/parts/lib_transcript.py +4118 -0
- polyctl/pressure.py +325 -0
- polyctl/prices.json +47 -0
- polyctl/procs.py +1194 -0
- polyctl/settings.py +505 -0
- polyctl/skill/SKILL.md +365 -0
- polyctl/skillkit.py +503 -0
- polyctl/storage.py +2055 -0
- polyctl/telegram.py +327 -0
- polyctl/tiers.py +123 -0
- polyctl/verdicts.py +41 -0
- polyctl/watchdog.py +3887 -0
- polyctl/web.py +337 -0
- polyctl-0.7.0.dist-info/METADATA +235 -0
- polyctl-0.7.0.dist-info/RECORD +99 -0
- polyctl-0.7.0.dist-info/WHEEL +4 -0
- polyctl-0.7.0.dist-info/entry_points.txt +5 -0
- polyctl-0.7.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
"""What needs doing now, and whose hand does it: the surface (NEXT, SURFACES-SWIFTBAR).
|
|
2
|
+
|
|
3
|
+
A part of src/polyctl/cli.py, run in its namespace by `_part` as the parts split out of it are; it is
|
|
4
|
+
not importable on its own.
|
|
5
|
+
|
|
6
|
+
`polyctl board` answers where each item is, `polyctl status` whether an agent is alive, `polyctl gain` what work cost.
|
|
7
|
+
None of them answers the question a person asks on coming back to a project, or the one an agent asks
|
|
8
|
+
when its turn ends: which command, in what order, by whom. With eighty commands, about fifty of them
|
|
9
|
+
needing a project, that question was being answered from memory — which is where a landing chain
|
|
10
|
+
stalls: a candidate verified but never reviewed, a review approved but never granted, a stand-in
|
|
11
|
+
request left in ~/.polyctl unread, a route no person has accepted holding every review that would follow it.
|
|
12
|
+
|
|
13
|
+
The reading is `lib_next`'s, so `polyctl next`, the `polyctl_next` MCP tool and a later page answer from one
|
|
14
|
+
place. What is here is only how it is shown: to a person in the terminal, as one JSON document for a
|
|
15
|
+
panel or a script, and in the plugin output format SwiftBar and xbar read in the menu bar. Nothing here
|
|
16
|
+
runs or records: a person's command is printed, never typed.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
SWIFTBAR_PLUGIN = "polyctl.30s.sh"
|
|
20
|
+
SWIFTBAR_MARKER = "# polyctl: polyctl-surface-v1 surface=swiftbar"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _swiftbar_text(text):
|
|
24
|
+
"""One line of text for SwiftBar or xbar, with control characters escaped and `|` disarmed.
|
|
25
|
+
|
|
26
|
+
SwiftBar (github.com/swiftbar/SwiftBar) and xbar split each line at `|` and read the rest as item
|
|
27
|
+
parameters (`bash=`, `shell=`, `href=`, `terminal=`); escaping `|` keeps every line plain text with
|
|
28
|
+
no action attached (SURFACES-SWIFTBAR).
|
|
29
|
+
"""
|
|
30
|
+
return A.shown_text(" ".join(str(text).split())).replace("|", r"\x7c")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def render_next(cfg, items):
|
|
34
|
+
"""The items as a person reads them: one block per actor, the command under the reason."""
|
|
35
|
+
lines = []
|
|
36
|
+
for who, label in ((A.PERSON, f"{C['b']}{C['yellow']}for you{C['reset']}"),
|
|
37
|
+
("implementer", f"{C['b']}{C['cyan']}for the implementer{C['reset']}")):
|
|
38
|
+
mine = [item for item in items if item["who"] == who]
|
|
39
|
+
if not mine:
|
|
40
|
+
continue
|
|
41
|
+
lines.append(f"\n{label} {C['dim']}({len(mine)}){C['reset']}")
|
|
42
|
+
for item in mine:
|
|
43
|
+
where = f" {C['dim']}{A.shown_text(item['slice'])}{C['reset']}" if item.get("slice") else ""
|
|
44
|
+
lines.append(f" {C['b']}{A.shown_text(item['kind'])}{C['reset']}{where} {A.shown_text(item['why'])}")
|
|
45
|
+
if item.get("command"):
|
|
46
|
+
lines.append(f" {C['green']}{A.shown_text(item['command'])}{C['reset']}")
|
|
47
|
+
if not items:
|
|
48
|
+
lines.append(f"{C['green']}Nothing is waiting.{C['reset']} What is staged stands granted, and no item "
|
|
49
|
+
f"holds on a person.")
|
|
50
|
+
return lines
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def render_next_short(cfg, items):
|
|
54
|
+
"""The menu-bar line and dropdown lines in the format SwiftBar and xbar read (SURFACES-SWIFTBAR).
|
|
55
|
+
|
|
56
|
+
The first line is what sits in the menu bar: how many actionable items wait for a person and how
|
|
57
|
+
many for the implementer, with the command added when a single item stands open. `---` begins the
|
|
58
|
+
dropdown, where each actor's items follow as plain text and a person's step appears as the command
|
|
59
|
+
text only.
|
|
60
|
+
"""
|
|
61
|
+
# A menu bar counts actions, so an item that names no command is counted for no one: a superseded review
|
|
62
|
+
# request is listed in full in the dropdown and asks nothing of the person reading the bar (NEXT).
|
|
63
|
+
open_items = [item for item in items if item.get("command")]
|
|
64
|
+
counts = {who: sum(1 for item in open_items if item["who"] == who) for who in (A.PERSON, "implementer")}
|
|
65
|
+
head = f"{counts[A.PERSON]} for you · {counts['implementer']} for the implementer"
|
|
66
|
+
if len(open_items) == 1:
|
|
67
|
+
head += f" · {_swiftbar_text(open_items[0]['command'])}"
|
|
68
|
+
lines = [head, "---"]
|
|
69
|
+
for who, label in ((A.PERSON, "for you"), ("implementer", "for the implementer")):
|
|
70
|
+
mine = [item for item in items if item["who"] == who]
|
|
71
|
+
if not mine:
|
|
72
|
+
continue
|
|
73
|
+
lines.append(f"{label} ({len(mine)})")
|
|
74
|
+
for item in mine:
|
|
75
|
+
where = f" {_swiftbar_text(item['slice'])}" if item.get("slice") else ""
|
|
76
|
+
lines.append(f" {_swiftbar_text(item['kind'])}{where} {_swiftbar_text(item['why'])}")
|
|
77
|
+
if item.get("command"):
|
|
78
|
+
lines.append(f" {_swiftbar_text(item['command'])}")
|
|
79
|
+
if not items:
|
|
80
|
+
lines.append("Nothing is waiting. What is staged stands granted, and no item holds on a person.")
|
|
81
|
+
return lines
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def cmd_next(cfg, args):
|
|
85
|
+
"""What needs doing now, and whose hand does it (NEXT, SURFACES-SWIFTBAR).
|
|
86
|
+
|
|
87
|
+
`--json` prints the same items as one document, for a panel, a menu-bar item or a script.
|
|
88
|
+
`--short` prints the menu-bar line and `---` dropdown lines in the format SwiftBar and xbar read.
|
|
89
|
+
"""
|
|
90
|
+
items = A.next_items(cfg)
|
|
91
|
+
if getattr(args, "json", False):
|
|
92
|
+
print(json.dumps({"project": cfg.get("project") or A.next_project_key(cfg["root"]),
|
|
93
|
+
"person": [item for item in items if item["who"] == A.PERSON],
|
|
94
|
+
"implementer": [item for item in items if item["who"] != A.PERSON]},
|
|
95
|
+
ensure_ascii=False, indent=2, default=str))
|
|
96
|
+
return 0
|
|
97
|
+
if getattr(args, "short", False):
|
|
98
|
+
for line in render_next_short(cfg, items):
|
|
99
|
+
print(line)
|
|
100
|
+
return 0
|
|
101
|
+
for line in render_next(cfg, items):
|
|
102
|
+
print(line)
|
|
103
|
+
print(f"\n{C['dim']}Read from .polyctl/, ~/.polyctl/ and Git's index. Nothing here was run or recorded: a person's "
|
|
104
|
+
f"command is shown, never typed.{C['reset']}")
|
|
105
|
+
return 0
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def _render_swiftbar_plugin(root, fallback=None):
|
|
109
|
+
"""The SwiftBar and xbar plugin script for `root`, running `polyctl next --short` alone (SURFACES-SWIFTBAR)."""
|
|
110
|
+
import shlex
|
|
111
|
+
return (
|
|
112
|
+
"#!/bin/sh\n"
|
|
113
|
+
f"{SWIFTBAR_MARKER}\n"
|
|
114
|
+
f"root={shlex.quote(root)}\n"
|
|
115
|
+
+ _polyctl_lookup(fallback)
|
|
116
|
+
+ 'exec "$polyctl" -C "$root" next --short\n'
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def _is_polyctl_swiftbar_plugin(data):
|
|
121
|
+
"""Whether `data` is the exact bytes of a SwiftBar plugin polyctl wrote (SURFACES-SWIFTBAR).
|
|
122
|
+
|
|
123
|
+
A marker comment alone is not enough: a person's script or an edited plugin is foreign, and
|
|
124
|
+
neither install nor uninstall may write over or remove it.
|
|
125
|
+
"""
|
|
126
|
+
import shlex
|
|
127
|
+
if not isinstance(data, (bytes, bytearray)) or b"\x00" in data:
|
|
128
|
+
return False
|
|
129
|
+
try:
|
|
130
|
+
text = bytes(data).decode(UTF8)
|
|
131
|
+
except UnicodeError:
|
|
132
|
+
return False
|
|
133
|
+
lines = text.split("\n")
|
|
134
|
+
if len(lines) < 4 or lines[0] != "#!/bin/sh" or lines[1] != SWIFTBAR_MARKER or not lines[2].startswith("root="):
|
|
135
|
+
return False
|
|
136
|
+
try:
|
|
137
|
+
words = shlex.split(lines[2])
|
|
138
|
+
except ValueError:
|
|
139
|
+
return False
|
|
140
|
+
if len(words) != 1 or not words[0].startswith("root="):
|
|
141
|
+
return False
|
|
142
|
+
root = words[0][len("root="):]
|
|
143
|
+
if not root or any(ch in root for ch in "\n\r\0"):
|
|
144
|
+
return False
|
|
145
|
+
return text == _render_swiftbar_plugin(root, _hook_fallback_of(bytes(data)))
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def _classify_swiftbar_plugin(path):
|
|
149
|
+
"""What stands at `path` without following a link: absent, owned or foreign (SURFACES-SWIFTBAR)."""
|
|
150
|
+
import stat
|
|
151
|
+
try:
|
|
152
|
+
st = os.lstat(path)
|
|
153
|
+
except FileNotFoundError:
|
|
154
|
+
return "absent"
|
|
155
|
+
except OSError:
|
|
156
|
+
return "foreign"
|
|
157
|
+
if stat.S_ISLNK(st.st_mode) or not stat.S_ISREG(st.st_mode) or st.st_nlink > 1:
|
|
158
|
+
return "foreign"
|
|
159
|
+
try:
|
|
160
|
+
with open(path, "rb") as fh:
|
|
161
|
+
data = fh.read()
|
|
162
|
+
except OSError:
|
|
163
|
+
return "foreign"
|
|
164
|
+
return "owned" if _is_polyctl_swiftbar_plugin(data) else "foreign"
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def cmd_surfaces(cfg, args):
|
|
168
|
+
"""Install or remove the SwiftBar / xbar menu-bar plugin in the folder the person names (SURFACES-SWIFTBAR).
|
|
169
|
+
|
|
170
|
+
`polyctl` never guesses a plugin folder. Install writes `polyctl.30s.sh` only when the path is free or already
|
|
171
|
+
holds polyctl's own plugin bytes; uninstall removes only polyctl's own plugin file and leaves any other file
|
|
172
|
+
in the folder untouched.
|
|
173
|
+
"""
|
|
174
|
+
import tempfile
|
|
175
|
+
raw_dir = getattr(args, "dir", None)
|
|
176
|
+
if not raw_dir or not str(raw_dir).strip():
|
|
177
|
+
print(f"{C['red']}surfaces {args.action} refused{C['reset']}: --dir needs the plugin folder; polyctl never "
|
|
178
|
+
"guesses one")
|
|
179
|
+
return 1
|
|
180
|
+
directory = os.path.abspath(os.path.expanduser(str(raw_dir).strip()))
|
|
181
|
+
if os.path.islink(directory):
|
|
182
|
+
print(f"{C['red']}surfaces {args.action} refused{C['reset']}: {A.shown_text(directory)} is a symbolic link")
|
|
183
|
+
return 1
|
|
184
|
+
if os.path.lexists(directory) and not os.path.isdir(directory):
|
|
185
|
+
print(f"{C['red']}surfaces {args.action} refused{C['reset']}: {A.shown_text(directory)} is not a directory")
|
|
186
|
+
return 1
|
|
187
|
+
path = os.path.join(directory, SWIFTBAR_PLUGIN)
|
|
188
|
+
if args.action == "uninstall":
|
|
189
|
+
state = _classify_swiftbar_plugin(path)
|
|
190
|
+
if state == "absent":
|
|
191
|
+
print(f"no polyctl swiftbar plugin in {A.shown_text(directory)}")
|
|
192
|
+
return 0
|
|
193
|
+
if state != "owned":
|
|
194
|
+
print(f"{C['red']}surfaces uninstall refused{C['reset']}: {A.shown_text(path)} is not polyctl's plugin file "
|
|
195
|
+
"and was left untouched")
|
|
196
|
+
return 1
|
|
197
|
+
before = _file_identity(path)
|
|
198
|
+
if before is None or _classify_swiftbar_plugin(path) != "owned" or _file_identity(path) != before:
|
|
199
|
+
print(f"{C['red']}surfaces uninstall refused{C['reset']}: {A.shown_text(path)} changed while it was "
|
|
200
|
+
"checked and was left untouched")
|
|
201
|
+
return 1
|
|
202
|
+
os.remove(path)
|
|
203
|
+
print(f"removed swiftbar — {A.shown_text(path)}")
|
|
204
|
+
return 0
|
|
205
|
+
|
|
206
|
+
real_root = os.path.realpath(cfg["root"])
|
|
207
|
+
if any(ch in real_root for ch in "\n\r\0"):
|
|
208
|
+
print(f"{C['red']}surfaces install refused{C['reset']}: project root path cannot be written on one shell line")
|
|
209
|
+
return 1
|
|
210
|
+
os.makedirs(directory, exist_ok=True)
|
|
211
|
+
state = _classify_swiftbar_plugin(path)
|
|
212
|
+
if state == "foreign":
|
|
213
|
+
print(f"{C['red']}surfaces install refused{C['reset']}: {A.shown_text(path)} is not polyctl's plugin file "
|
|
214
|
+
"and was left untouched")
|
|
215
|
+
return 1
|
|
216
|
+
data = _render_swiftbar_plugin(real_root, _hook_fallback()).encode(UTF8)
|
|
217
|
+
fd, temporary = tempfile.mkstemp(prefix=".polyctl-surface-", dir=directory)
|
|
218
|
+
try:
|
|
219
|
+
with os.fdopen(fd, "wb") as fh:
|
|
220
|
+
fh.write(data)
|
|
221
|
+
fh.flush()
|
|
222
|
+
os.fsync(fh.fileno())
|
|
223
|
+
if hasattr(os, "fchmod"):
|
|
224
|
+
os.fchmod(fh.fileno(), 0o755)
|
|
225
|
+
if not hasattr(os, "fchmod"):
|
|
226
|
+
os.chmod(temporary, 0o755)
|
|
227
|
+
before = _file_identity(path)
|
|
228
|
+
now = _classify_swiftbar_plugin(path)
|
|
229
|
+
if now == "owned":
|
|
230
|
+
if _file_identity(path) != before:
|
|
231
|
+
print(f"{C['red']}surfaces install refused{C['reset']}: {A.shown_text(path)} changed while install "
|
|
232
|
+
"read it and was left untouched")
|
|
233
|
+
return 1
|
|
234
|
+
os.replace(temporary, path)
|
|
235
|
+
elif now == "absent":
|
|
236
|
+
_hook_put_on_free_path(temporary, path, data)
|
|
237
|
+
else:
|
|
238
|
+
print(f"{C['red']}surfaces install refused{C['reset']}: {A.shown_text(path)} is not polyctl's plugin file "
|
|
239
|
+
"and was left untouched")
|
|
240
|
+
return 1
|
|
241
|
+
finally:
|
|
242
|
+
try:
|
|
243
|
+
if os.path.lexists(temporary):
|
|
244
|
+
os.remove(temporary)
|
|
245
|
+
except OSError:
|
|
246
|
+
pass
|
|
247
|
+
print(f"installed swiftbar — {A.shown_text(path)}")
|
|
248
|
+
return 0
|
polyctl/parts/cli_pr.py
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Pull requests: `polyctl pr watch --once`, which reads this checkout's pull requests and mails the implementer.
|
|
2
|
+
|
|
3
|
+
A part of src/polyctl/cli.py, run in its namespace by `_part` as the parts moved out of it are (#44); it is
|
|
4
|
+
not importable on its own (PR-WATCH).
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def cmd_pr(cfg, args):
|
|
9
|
+
"""One read of this checkout's pull requests through gh; each new fact mailed to the implementer once (PR-WATCH).
|
|
10
|
+
|
|
11
|
+
Opt-in, because it reaches GitHub on the project's behalf; read-only there, because gh is asked
|
|
12
|
+
`pr list` and `pr view` and nothing else; and one pass, because the watchdog does not run it yet.
|
|
13
|
+
Exit 2 when it is off or asked to loop, 1 when gh cannot answer - nothing is mailed or recorded
|
|
14
|
+
then - and 0 after a pass, whatever it found, or when it stood down for a pass already running.
|
|
15
|
+
"""
|
|
16
|
+
if not args.once:
|
|
17
|
+
print("polyctl pr watch runs one pass and exits: `polyctl pr watch --once`. It does not loop on its own; "
|
|
18
|
+
"running it on the watchdog's cycle comes in a later slice")
|
|
19
|
+
return 2
|
|
20
|
+
if S.get(cfg, "pr.watch") != "on":
|
|
21
|
+
print(f"{C['yellow']}pr watch is off{C['reset']} for this project, so nothing was read. "
|
|
22
|
+
"`polyctl config set pr.watch on` turns it on: it reads this checkout's pull requests through gh, "
|
|
23
|
+
"never writes to GitHub, and mails the implementer a failed check, a merge conflict or requested "
|
|
24
|
+
"changes, once each")
|
|
25
|
+
return 2
|
|
26
|
+
gh = A.runnable_binary("gh")
|
|
27
|
+
if not gh:
|
|
28
|
+
print(f"{C['red']}gh is not on this machine{C['reset']} (PATH, binaries.extra_dirs, the usual install "
|
|
29
|
+
"directories): polyctl reads pull requests only through GitHub's CLI. Install it and run `gh auth login`; "
|
|
30
|
+
"nothing was mailed")
|
|
31
|
+
return 1
|
|
32
|
+
try:
|
|
33
|
+
done = A.pr_watch(cfg["root"], cfg, gh)
|
|
34
|
+
except RuntimeError as exc: # gh could not answer, or git could not list the branches
|
|
35
|
+
print(f"{C['red']}not read{C['reset']}: {exc}. Nothing was mailed")
|
|
36
|
+
return 1
|
|
37
|
+
if done is None: # as a watchdog cycle does when another one runs
|
|
38
|
+
print("another pr watch pass is running for this project; standing down")
|
|
39
|
+
return 0
|
|
40
|
+
if done["problem"]:
|
|
41
|
+
print(f"{C['yellow']}note{C['reset']}: .polyctl/pr-watch.json could not be read ({done['problem']}), so what "
|
|
42
|
+
"stands now was mailed as new, once")
|
|
43
|
+
if done["cut"]:
|
|
44
|
+
print(f"{C['yellow']}note{C['reset']}: gh listed {A.PR_LIST_LIMIT} open pull requests, as many as it was "
|
|
45
|
+
"asked for; one beyond them was not read, and what was mailed about it stands")
|
|
46
|
+
for number, fact, head, mail in done["sent"]:
|
|
47
|
+
print(f" {C['green']}mailed{C['reset']} PR #{number} {fact} at {head[:12]}: {mail}")
|
|
48
|
+
for number, fact, head in done["standing"]:
|
|
49
|
+
print(f" {C['dim']}already mailed{C['reset']} PR #{number} {fact} at {head[:12]}")
|
|
50
|
+
implementer, _ = A.mail_names(cfg)
|
|
51
|
+
print(f"read {done['read']} open pull request(s) of this checkout's branches: {len(done['sent'])} new "
|
|
52
|
+
f"fact(s) mailed to {implementer}, {len(done['standing'])} already mailed")
|
|
53
|
+
return 0
|