2.2 KiB
2.2 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 91e8d0c6-74c0-472f-b123-d30123bfd009 | fix | Fix: Cleanup of duplicate labels and PRs from issue-poller infinite loop in paper-dynasty-database |
|
0.5 | 0.8 | 2026-03-03T21:25:33.268899+00:00 | 2026-03-03T21:25:48.745118+00:00 |
|
Cleanup: Duplicate Labels and PRs from Issue-Poller Loop
Project
paper-dynasty-database on git.manticorum.com
What Was Cleaned Up
Duplicate PRs
Closed PRs #36, #37, #39 (created by the infinite loop). Left open:
- PR #35 — real fix for issue #25
- PR #38 — fix for issue #24
Duplicate Repo Labels
Deleted 8 duplicate labels:
- 4 extra
ai-workinglabels (IDs 49, 41, 56, 58) - 4 extra
ai-reviewinglabels (IDs 51, 59, 57, 50)
These were created because Haiku kept calling create_repo_label instead of checking for existing labels first.
Root Cause of Duplicates
The Haiku-based label creation did not search existing labels before creating. Each poll cycle created new label entries.
Prevention
The ensure_label() helper function in the rewritten poller searches existing labels first and only creates if missing:
ensure_label() {
local name="$1"
local color="$2"
# Search existing labels, create only if not found
existing=$(gitea_get "/repos/$OWNER/$REPO/labels" | jq -r ".[] | select(.name==\"$name\") | .id")
if [ -z "$existing" ]; then
gitea_post "/repos/$OWNER/$REPO/labels" "{\"name\":\"$name\",\"color\":\"$color\"}"
fi
}