fix/issue21-workflow-types
main
#21 修復。
#12 合併(a8c1f3e)後 main 編譯失敗:#12 的 workflow.go 與 #13 的 types.go 各自宣告 User/Comment/Issue/PullRequest/Repository,文字合併無衝突但語意衝突。
workflow.go
types.go
統一採 #13 的字串模型(types.go 為唯一型別來源):
Issue
Comment
State
Body
ClosedAt
parseMoment
_parse_iso8601
judge.go
AssigneeNames
ReviewerNames
LastComment
containsString
Source
cmd/xcheck
workflow_test.go
go build
go vet
go test ./...
stalled
關聯:#21(本 PR 修復後可關閉)、#7(CLI 接線仍待 #5 合併後續接)。
#12 的 workflow.go 與 #13 的 types.go 各自宣告 User/Comment/Issue/ PullRequest/Repository,文字合併無衝突但語意衝突,main 自 a8c1f3e 起 go build 失敗。 統一採 #13 的字串模型(types.go 為唯一型別來源): - Issue/Comment 補 State/Body/ClosedAt 欄位,新增 parseMoment (對應 gitea.py _parse_iso8601;保留原時區偏移,輸出與 Python isoformat 位元組一致) - workflow.go 移除重複宣告,stalled/xref 邏輯改用該模型與 judge.go 既有輔助(AssigneeNames/ReviewerNames/LastComment/containsString) - Source 介面 number 改 int64(與 types.go 對齊),cmd/xcheck 同步 - workflow_test.go 測試資料改新型別模型(字串時刻、指標欄位) 驗證: - go build/go vet/go test ./... 全綠(#6 與 #7 案例皆未回歸) - xcheck 對真實 API 並行掃描,stalled 輸出與 gitea.py 位元組一致(含 bear-cli#9 父追蹤項子項摘要、+08:00 時區偏移) - xref 邊界案例(nope#9/PR#50 略過、bear-cli#9 內嵌解析)與 Python 一致
a8c1f3e
No dependencies set.
The note is not visible to the blocked user.
#21 修復。
問題
#12 合併(a8c1f3e)後 main 編譯失敗:#12 的
workflow.go與 #13 的types.go各自宣告 User/Comment/Issue/PullRequest/Repository,文字合併無衝突但語意衝突。修法
統一採 #13 的字串模型(
types.go為唯一型別來源):Issue/Comment補State/Body/ClosedAt欄位;新增parseMoment(對應 gitea.py_parse_iso8601,保留原時區偏移——輸出與 Python isoformat 位元組一致,不轉 UTC)workflow.go移除重複宣告,stalled/xref 邏輯改用該模型,並重用judge.go既有輔助(AssigneeNames/ReviewerNames/LastComment/containsString),淨刪 71 行Source介面 number 改 int64(與 types.go 對齊),cmd/xcheck同步workflow_test.go測試資料改新型別模型驗證(#21 驗收)
go build/go vet/go test ./...全綠(#6 與 #7 案例皆未回歸)stalled輸出與 gitea.py 位元組一致(1749 bytes,含 bear-cli#9 父追蹤項子項摘要、+08:00 時區偏移、parent-tracking reason)關聯:#21(本 PR 修復後可關閉)、#7(CLI 接線仍待 #5 合併後續接)。