ci: add Gitea Actions workflow with gofmt and test jobs
Add CI workflow at .gitea/workflows/ci.yml triggered on pull_request with two jobs: fmt (gofmt check) and test (go test ./...). Fix gofmt issues (import ordering) in 7 files so CI passes from the start. Fixes #7 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+14
-14
@@ -6,28 +6,28 @@ import (
|
||||
|
||||
// Task status constants matching the requirement's state machine.
|
||||
const (
|
||||
StatusIgnored = "IGNORED"
|
||||
StatusReceived = "RECEIVED"
|
||||
StatusAIProcessing = "AI_PROCESSING"
|
||||
StatusCallbackDone = "CALLBACK_DONE"
|
||||
StatusSMTPRetrying = "SMTP_RETRYING"
|
||||
StatusCompleted = "COMPLETED"
|
||||
StatusFailed = "FAILED"
|
||||
StatusIgnored = "IGNORED"
|
||||
StatusReceived = "RECEIVED"
|
||||
StatusAIProcessing = "AI_PROCESSING"
|
||||
StatusCallbackDone = "CALLBACK_DONE"
|
||||
StatusSMTPRetrying = "SMTP_RETRYING"
|
||||
StatusCompleted = "COMPLETED"
|
||||
StatusFailed = "FAILED"
|
||||
)
|
||||
|
||||
// Task represents a single email processing unit tracked through the pipeline.
|
||||
type Task struct {
|
||||
ID uint `gorm:"primaryKey;autoIncrement"`
|
||||
TaskUUID string `gorm:"uniqueIndex;not null"`
|
||||
ThreadID string `gorm:"index"`
|
||||
MessageID string `gorm:"index"`
|
||||
ID uint `gorm:"primaryKey;autoIncrement"`
|
||||
TaskUUID string `gorm:"uniqueIndex;not null"`
|
||||
ThreadID string `gorm:"index"`
|
||||
MessageID string `gorm:"index"`
|
||||
Sender string
|
||||
Subject string
|
||||
BodyPlain string
|
||||
AIResponse string
|
||||
Status string `gorm:"index;not null"`
|
||||
AttemptOpenClaw int `gorm:"default:0"`
|
||||
AttemptSMTP int `gorm:"default:0"`
|
||||
Status string `gorm:"index;not null"`
|
||||
AttemptOpenClaw int `gorm:"default:0"`
|
||||
AttemptSMTP int `gorm:"default:0"`
|
||||
LastError *string
|
||||
NextRetryAt *time.Time
|
||||
CreatedAt time.Time
|
||||
|
||||
Reference in New Issue
Block a user