@plot-pm/board 0.6.1-rc.0 → 0.6.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plot-plan-meta.sh +29 -5
package/package.json
CHANGED
package/plot-plan-meta.sh
CHANGED
|
@@ -75,8 +75,15 @@
|
|
|
75
75
|
# `<!-- deferred -->` (bare, no colon) sets the flag with no
|
|
76
76
|
# reason; `waves[].branches[].deferred_reason` carries the
|
|
77
77
|
# sentence after the colon, "" where none was written.
|
|
78
|
-
# prs PR numbers from `→ #NNN`
|
|
79
|
-
# section (sorted, unique)
|
|
78
|
+
# prs PR numbers from `→ #NNN` and `→ owner/repo#NNN` links in
|
|
79
|
+
# the `## Branches` section (sorted, unique). The repo part is
|
|
80
|
+
# matched but not retained: callers ask which PRs are a plan's
|
|
81
|
+
# evidence, and plot-host.sh resolves where each one lives.
|
|
82
|
+
# malformed_prs near-miss annotations, verbatim — currently `→#NNN` with no
|
|
83
|
+
# space. Reported rather than dropped: "no annotation" is a
|
|
84
|
+
# claim the sweep acts on, so a typo that reads as absence
|
|
85
|
+
# sends a human to add an annotation already present. [] when
|
|
86
|
+
# the plan has none.
|
|
80
87
|
# changelog the plan's `## Changelog` entries, one string per bullet, in
|
|
81
88
|
# document order; [] when the plan has no changelog or an
|
|
82
89
|
# unfilled one. This is the one field that says WHAT A PLAN
|
|
@@ -168,7 +175,7 @@ if [ ${#files[@]} -eq 0 ] && [ ${#missing[@]} -eq 0 ]; then
|
|
|
168
175
|
fi
|
|
169
176
|
|
|
170
177
|
for f in ${missing[@]+"${missing[@]}"}; do
|
|
171
|
-
printf '{"file":"%s","format":"none","error":"file not found","phase_raw":"","phase":"NONE","phase_alt_raw":"","phase_alt":"NONE","type":"","title":"","sprint":"","story":"","assignee":"","branches":[],"prs":[],"issues":[],"changelog":[],"review_raw":"","review":"NONE","impl_raw":"","impl":"NONE","design_raw":"","approved_raw":"","released_raw":"","delivered_raw":"","started_raw":[]}\n' \
|
|
178
|
+
printf '{"file":"%s","format":"none","error":"file not found","phase_raw":"","phase":"NONE","phase_alt_raw":"","phase_alt":"NONE","type":"","title":"","sprint":"","story":"","assignee":"","branches":[],"prs":[],"issues":[],"malformed_prs":[],"changelog":[],"review_raw":"","review":"NONE","impl_raw":"","impl":"NONE","design_raw":"","approved_raw":"","released_raw":"","delivered_raw":"","started_raw":[]}\n' \
|
|
172
179
|
"$(printf '%s' "$f" | sed 's/\\/\\\\/g; s/"/\\"/g')"
|
|
173
180
|
done
|
|
174
181
|
|
|
@@ -254,6 +261,7 @@ function reset_state() {
|
|
|
254
261
|
in_fm = 0; section = ""; in_comment = 0; in_challenge = 0; branches_seen = 0
|
|
255
262
|
delete branches; n_branches = 0
|
|
256
263
|
delete prs; n_prs = 0
|
|
264
|
+
delete malformed_prs; n_malformed_prs = 0
|
|
257
265
|
fm_issue = ""; canon_issue = ""
|
|
258
266
|
delete issues; n_issues = 0
|
|
259
267
|
delete wave_names; delete wave_of; delete wave_seq; delete wave_count
|
|
@@ -334,6 +342,8 @@ function emit_record( fmt, praw, palt_raw, traw, title, sprint, story, assigne
|
|
|
334
342
|
for (i = 1; i <= np; i++) out = out (i > 1 ? "," : "") sorted_p[i]
|
|
335
343
|
out = out "],\"issues\":["
|
|
336
344
|
for (i = 1; i <= ni; i++) out = out (i > 1 ? "," : "") sorted_i[i]
|
|
345
|
+
out = out "],\"malformed_prs\":["
|
|
346
|
+
for (i = 1; i <= n_malformed_prs; i++) out = out (i > 1 ? "," : "") "\"" jesc(malformed_prs[i]) "\""
|
|
337
347
|
out = out "]"
|
|
338
348
|
# Document order, never sorted: a changelog is a narrative sequence, and the
|
|
339
349
|
# first entry is the headline. Front matter wins, as it does for every other
|
|
@@ -581,12 +591,26 @@ section == "branches" {
|
|
|
581
591
|
line = substr(line, RSTART + RLENGTH)
|
|
582
592
|
}
|
|
583
593
|
line = $0
|
|
584
|
-
|
|
594
|
+
# `→ #N` and `→ owner/repo#N` are both annotations: /plot-deliver instructs
|
|
595
|
+
# implementers to write the second for `Impl: other repo` plans, and a parser
|
|
596
|
+
# that dropped it reported `prs: []` for a plan whose only PR was written
|
|
597
|
+
# exactly as documented. The repo part is matched but not retained — callers
|
|
598
|
+
# ask which PRs are the evidence, and plot-host.sh resolves where each lives.
|
|
599
|
+
while (match(line, /→ ([A-Za-z0-9._-]+\/[A-Za-z0-9._-]+)?#[0-9]+/)) {
|
|
585
600
|
p = substr(line, RSTART, RLENGTH)
|
|
586
|
-
|
|
601
|
+
sub(/^.*#/, "", p)
|
|
587
602
|
prs[++n_prs] = p
|
|
588
603
|
line = substr(line, RSTART + RLENGTH)
|
|
589
604
|
}
|
|
605
|
+
# A near-miss is REPORTED, never silently dropped. `→#44` (no space) is the
|
|
606
|
+
# obvious hand-typo, and treating it as absence makes the sweep advise adding
|
|
607
|
+
# an annotation the plan already carries. Accepting it would widen the
|
|
608
|
+
# contract on a guess; reporting it leaves the judgement with a person.
|
|
609
|
+
line = $0
|
|
610
|
+
while (match(line, /→#[0-9]+/)) {
|
|
611
|
+
malformed_prs[++n_malformed_prs] = substr(line, RSTART, RLENGTH)
|
|
612
|
+
line = substr(line, RSTART + RLENGTH)
|
|
613
|
+
}
|
|
590
614
|
next
|
|
591
615
|
}
|
|
592
616
|
END { if (NR > 0) emit_record() }
|