Fix UUID cast in task creation, add kind test manifests

- Fix parent_task_id NULLIF cast to UUID type in INSERT query
- Fix itoa helper to use strconv.Itoa
- Handle AddReaction errors gracefully in webhook handler
- Add hack/kind/ manifests for local testing with kind cluster
This commit is contained in:
2026-06-10 22:22:57 +10:00
parent 49d514c050
commit c13b2ae999
8 changed files with 252 additions and 3 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ package database
import (
"context"
"strconv"
"time"
"github.com/jackc/pgx/v5"
@@ -35,7 +36,7 @@ func (db *DB) CreateTask(ctx context.Context, req models.CreateTaskRequest) (*mo
issue_number, pr_number, comment_id, body, author,
extra_tools, pool_ref
) VALUES (
NULLIF($1, ''), $2, $3, $4, $5,
NULLIF($1, '')::uuid, $2, $3, $4, $5,
$6, $7, $8, $9, $10,
$11, $12
) RETURNING id, created_at`,
@@ -173,5 +174,5 @@ func scanTasks(rows pgx.Rows) ([]models.Task, error) {
}
func itoa(i int) string {
return string(rune('0'+i)) + ""
return strconv.Itoa(i)
}