summaryrefslogtreecommitdiff
path: root/Omni/Agent/harvest-tasks.sh
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2025-11-21 04:30:47 -0500
committerBen Sima <ben@bsima.me>2025-11-21 04:30:47 -0500
commitf99aee1aa31f621a804e0c98ed4f84260da1b3eb (patch)
treeff1f9b4a3c1d11bc0b929843c419a07d84e7d1d5 /Omni/Agent/harvest-tasks.sh
parent04c9043b89be694d8e74cf9e11b8648488416aee (diff)
infra: improve worker workflow (attribution, cleaner history)
Diffstat (limited to 'Omni/Agent/harvest-tasks.sh')
-rwxr-xr-xOmni/Agent/harvest-tasks.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/Omni/Agent/harvest-tasks.sh b/Omni/Agent/harvest-tasks.sh
index 282beab..44c2322 100755
--- a/Omni/Agent/harvest-tasks.sh
+++ b/Omni/Agent/harvest-tasks.sh
@@ -45,7 +45,14 @@ if [ "$UPDATED" -eq 1 ]; then
# Commit if there are changes
if [[ -n $(git status --porcelain .tasks/tasks.jsonl) ]]; then
git add .tasks/tasks.jsonl
- git commit -m "task: harvest updates from workers"
+
+ LAST_MSG=$(git log -1 --pretty=%s)
+ if [[ "$LAST_MSG" == "task: harvest updates from workers" ]]; then
+ echo "Squashing with previous harvest commit..."
+ git commit --amend --no-edit
+ else
+ git commit -m "task: harvest updates from workers"
+ fi
echo "Success: Task database updated and committed."
else
echo "No effective changes found."