Self-hosted workflows for coding-agent delivery. Orchestrate CodeBuddy, Codex and Claude Code with scripts and human approval gates. Includes Local workflows for coding assistants.
JavaScript agent-orchestrationagentic-workflowai-agentsai-codingclaude-codecode-reviewcodebuddycodexcoding-agentscursordeveloper-toolshuman-on-the-loopllmmcpmulti-agentsdlcself-hostedsopworkflow-automationworkflow-engine
refactor(domain): use slices.Contains in ScheduleJob.MatchesIssueStatus (#371)
fx-kurumia1b0d9a1ebf1
diff --git a/internal/domain/sync.go b/internal/domain/sync.goindex 7a5d1bb6..438db99f 100644--- a/internal/domain/sync.go+++ b/internal/domain/sync.go@@ -2,6 +2,7 @@ package domainimport ("fmt"+ "slices""strings""time")@@ -190,12 +191,7 @@ func (j ScheduleJob) MatchesIssueStatus(status string) bool {if status == "" {status = "backlog"}- for _, want := range j.TriggerIssueStatuses() {- if want == status {- return true- }- }- return false+ return slices.Contains(j.TriggerIssueStatuses(), status)}// SyncLog records a single sync execution.diff --git a/internal/domain/sync_test.go b/internal/domain/sync_test.goindex 8c07f30f..55b9ade1 100644--- a/internal/domain/sync_test.go+++ b/internal/domain/sync_test.go@@ -40,6 +40,29 @@ func TestScheduleJobTriggerIssueStatuses(t *testing.T) {}}+func TestScheduleJobMatchesIssueStatusNormalizesInput(t *testing.T) {+ custom := ScheduleJob{WorkflowID: "wf", IssueStatuses: []string{" Backlog ", "IN_REVIEW"}}+ cases := map[string]bool{+ "backlog": true,+ " BACKLOG\t": true,+ "": true, // empty status is treated as backlog+ " ": true,+ "In_Review": true,+ "todo": false,+ "done": false,+ "in_progress ": false,+ }+ for status, want := range cases {+ if got := custom.MatchesIssueStatus(status); got != want {+ t.Errorf("MatchesIssueStatus(%q) = %v, want %v", status, got, want)+ }+ }+ noBacklog := ScheduleJob{WorkflowID: "wf", IssueStatuses: []string{"todo"}}+ if noBacklog.MatchesIssueStatus("") {+ t.Error("empty status must only match jobs that scan backlog")+ }+}+func TestNormalizeScheduleSource(t *testing.T) {for _, raw := range []string{"", " all ", "BOTH"} {got, err := NormalizeScheduleSource(raw)