@pmelab/gtd 1.5.4 → 1.5.5
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/README.md +11 -6
- package/dist/gtd.bundle.mjs +29 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -442,12 +442,17 @@ loop before the next one starts.
|
|
|
442
442
|
(`gtd: done`) → **Squashing** → **Idle**. The Squashing agent authors a
|
|
443
443
|
conventional-commits message from the full process diff and squashes all
|
|
444
444
|
intermediate `gtd: *` commits into one with `git reset --soft <base>` +
|
|
445
|
-
`git commit`, then **gtd STOPs**.
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
445
|
+
`git commit`, then **gtd STOPs**. The base is the parent of the current
|
|
446
|
+
cycle's start marker **nearest to HEAD** (the last `gtd: new task`; for
|
|
447
|
+
legacy cycles the last contiguous `gtd: grilling` run), and on a feature
|
|
448
|
+
branch it never reaches below the merge-base with the default branch — stray
|
|
449
|
+
markers left behind by older squashes can never drag the squash into
|
|
450
|
+
previously shipped features. Post-squash review does not fire automatically —
|
|
451
|
+
it fires only on the next manual `gtd` run (when the squash commit is the
|
|
452
|
+
boundary HEAD and a reviewable diff exists). Squashing fires when the tree
|
|
453
|
+
has no unrelated code dirty — a lone untracked `SQUASH_MSG.md` is tolerated
|
|
454
|
+
and deleted before the squash commit. If unrelated code is dirty at
|
|
455
|
+
`gtd: done`, gtd routes to **New Feature** instead. Set `squash: false` in
|
|
451
456
|
`.gtdrc` to skip squashing and go straight to Idle. Checking off REVIEW.md
|
|
452
457
|
checkboxes (`- [ ]` → `- [x]`) also counts as approval and routes to **Done**
|
|
453
458
|
— they are navigation aids, not feedback. Only **non-checkbox** edits (code
|
package/dist/gtd.bundle.mjs
CHANGED
|
@@ -388100,29 +388100,37 @@ var gatherEvents = () => (
|
|
|
388100
388100
|
let squashBase;
|
|
388101
388101
|
let squashDiff;
|
|
388102
388102
|
if (hasCommits && lastCommitSubject === DONE_SUBJECT && config2.squash) {
|
|
388103
|
-
const
|
|
388104
|
-
const
|
|
388105
|
-
|
|
388106
|
-
|
|
388107
|
-
|
|
388108
|
-
|
|
388103
|
+
const squashHistory = history;
|
|
388104
|
+
const subjectOf = (c7) => (c7.message.split("\n")[0] ?? "").trim();
|
|
388105
|
+
let lastDoneIdxForSquash = -1;
|
|
388106
|
+
let prevDoneIdx = -1;
|
|
388107
|
+
for (let i = 0; i < squashHistory.length; i++) {
|
|
388108
|
+
if (subjectOf(squashHistory[i]) === DONE_SUBJECT) {
|
|
388109
|
+
prevDoneIdx = lastDoneIdxForSquash;
|
|
388110
|
+
lastDoneIdxForSquash = i;
|
|
388109
388111
|
}
|
|
388110
|
-
|
|
388111
|
-
})();
|
|
388112
|
+
}
|
|
388112
388113
|
if (lastDoneIdxForSquash !== -1) {
|
|
388113
|
-
|
|
388114
|
-
|
|
388115
|
-
|
|
388116
|
-
if (
|
|
388117
|
-
|
|
388118
|
-
|
|
388119
|
-
|
|
388120
|
-
|
|
388121
|
-
)
|
|
388122
|
-
|
|
388123
|
-
|
|
388124
|
-
|
|
388125
|
-
|
|
388114
|
+
const squashCycle = squashHistory.slice(prevDoneIdx + 1, lastDoneIdxForSquash + 1);
|
|
388115
|
+
let startIdx = -1;
|
|
388116
|
+
for (let i = squashCycle.length - 1; i >= 0; i--) {
|
|
388117
|
+
if (subjectOf(squashCycle[i]) === NEW_TASK_SUBJECT) {
|
|
388118
|
+
startIdx = i;
|
|
388119
|
+
break;
|
|
388120
|
+
}
|
|
388121
|
+
}
|
|
388122
|
+
if (startIdx === -1) {
|
|
388123
|
+
for (let i = squashCycle.length - 1; i >= 0; i--) {
|
|
388124
|
+
if (subjectOf(squashCycle[i]) === GRILLING_SUBJECT) {
|
|
388125
|
+
startIdx = i;
|
|
388126
|
+
while (startIdx > 0 && subjectOf(squashCycle[startIdx - 1]) === GRILLING_SUBJECT) {
|
|
388127
|
+
startIdx--;
|
|
388128
|
+
}
|
|
388129
|
+
break;
|
|
388130
|
+
}
|
|
388131
|
+
}
|
|
388132
|
+
}
|
|
388133
|
+
const squashStart = startIdx === -1 ? void 0 : squashCycle[startIdx];
|
|
388126
388134
|
if (squashStart !== void 0) {
|
|
388127
388135
|
const squashStartParent = yield* git.resolveRef(`${squashStart.hash}~1`).pipe(Effect_exports.catchAll(() => Effect_exports.succeed(EMPTY_TREE)));
|
|
388128
388136
|
const candidateDiff = yield* git.diffRef(squashStartParent).pipe(Effect_exports.catchAll(() => Effect_exports.succeed("")));
|