tenseleyflow/shithub / cf21cc3

Browse files

sqlc: regenerate domain models with workflow types from migrations 0042-0049

When sqlc generate ran with the new actions block, every package that
shares the same schema dir picked up the new workflow_* tables, enum
types (WorkflowJobStatus, WorkflowRunStatus, etc.) and adds them to
its own models.go. This commit captures that drift so 'sqlc generate'
is idempotent again.
Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
cf21cc37d935206cc1f78c22f1c8440ec39fe4a2
Parents
0bc8316
Tree
8fa282a

14 changed files

StatusFile+-
M internal/admin/sqlc/models.go 354 0
M internal/auth/policy/sqlc/models.go 354 0
M internal/checks/sqlc/models.go 354 0
M internal/issues/sqlc/models.go 354 0
M internal/meta/sqlc/models.go 354 0
M internal/notif/sqlc/models.go 354 0
M internal/orgs/sqlc/models.go 354 0
M internal/pulls/sqlc/models.go 354 0
M internal/ratelimit/sqlc/models.go 354 0
M internal/repos/sqlc/models.go 354 0
M internal/social/sqlc/models.go 354 0
M internal/users/sqlc/models.go 354 0
M internal/webhook/sqlc/models.go 354 0
M internal/worker/sqlc/models.go 354 0
internal/admin/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/auth/policy/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/checks/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/issues/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/meta/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/notif/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/orgs/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/pulls/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/ratelimit/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/repos/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/social/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/users/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/webhook/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}
internal/worker/sqlc/models.gomodified
@@ -1266,6 +1266,238 @@ func (ns NullWebhookOwnerKind) Value() (driver.Value, error) {
12661266
 	return string(ns.WebhookOwnerKind), nil
12671267
 }
12681268
 
1269
+type WorkflowJobStatus string
1270
+
1271
+const (
1272
+	WorkflowJobStatusQueued    WorkflowJobStatus = "queued"
1273
+	WorkflowJobStatusRunning   WorkflowJobStatus = "running"
1274
+	WorkflowJobStatusCompleted WorkflowJobStatus = "completed"
1275
+	WorkflowJobStatusCancelled WorkflowJobStatus = "cancelled"
1276
+	WorkflowJobStatusSkipped   WorkflowJobStatus = "skipped"
1277
+)
1278
+
1279
+func (e *WorkflowJobStatus) Scan(src interface{}) error {
1280
+	switch s := src.(type) {
1281
+	case []byte:
1282
+		*e = WorkflowJobStatus(s)
1283
+	case string:
1284
+		*e = WorkflowJobStatus(s)
1285
+	default:
1286
+		return fmt.Errorf("unsupported scan type for WorkflowJobStatus: %T", src)
1287
+	}
1288
+	return nil
1289
+}
1290
+
1291
+type NullWorkflowJobStatus struct {
1292
+	WorkflowJobStatus WorkflowJobStatus
1293
+	Valid             bool // Valid is true if WorkflowJobStatus is not NULL
1294
+}
1295
+
1296
+// Scan implements the Scanner interface.
1297
+func (ns *NullWorkflowJobStatus) Scan(value interface{}) error {
1298
+	if value == nil {
1299
+		ns.WorkflowJobStatus, ns.Valid = "", false
1300
+		return nil
1301
+	}
1302
+	ns.Valid = true
1303
+	return ns.WorkflowJobStatus.Scan(value)
1304
+}
1305
+
1306
+// Value implements the driver Valuer interface.
1307
+func (ns NullWorkflowJobStatus) Value() (driver.Value, error) {
1308
+	if !ns.Valid {
1309
+		return nil, nil
1310
+	}
1311
+	return string(ns.WorkflowJobStatus), nil
1312
+}
1313
+
1314
+type WorkflowRunEvent string
1315
+
1316
+const (
1317
+	WorkflowRunEventPush             WorkflowRunEvent = "push"
1318
+	WorkflowRunEventPullRequest      WorkflowRunEvent = "pull_request"
1319
+	WorkflowRunEventSchedule         WorkflowRunEvent = "schedule"
1320
+	WorkflowRunEventWorkflowDispatch WorkflowRunEvent = "workflow_dispatch"
1321
+)
1322
+
1323
+func (e *WorkflowRunEvent) Scan(src interface{}) error {
1324
+	switch s := src.(type) {
1325
+	case []byte:
1326
+		*e = WorkflowRunEvent(s)
1327
+	case string:
1328
+		*e = WorkflowRunEvent(s)
1329
+	default:
1330
+		return fmt.Errorf("unsupported scan type for WorkflowRunEvent: %T", src)
1331
+	}
1332
+	return nil
1333
+}
1334
+
1335
+type NullWorkflowRunEvent struct {
1336
+	WorkflowRunEvent WorkflowRunEvent
1337
+	Valid            bool // Valid is true if WorkflowRunEvent is not NULL
1338
+}
1339
+
1340
+// Scan implements the Scanner interface.
1341
+func (ns *NullWorkflowRunEvent) Scan(value interface{}) error {
1342
+	if value == nil {
1343
+		ns.WorkflowRunEvent, ns.Valid = "", false
1344
+		return nil
1345
+	}
1346
+	ns.Valid = true
1347
+	return ns.WorkflowRunEvent.Scan(value)
1348
+}
1349
+
1350
+// Value implements the driver Valuer interface.
1351
+func (ns NullWorkflowRunEvent) Value() (driver.Value, error) {
1352
+	if !ns.Valid {
1353
+		return nil, nil
1354
+	}
1355
+	return string(ns.WorkflowRunEvent), nil
1356
+}
1357
+
1358
+type WorkflowRunStatus string
1359
+
1360
+const (
1361
+	WorkflowRunStatusQueued    WorkflowRunStatus = "queued"
1362
+	WorkflowRunStatusRunning   WorkflowRunStatus = "running"
1363
+	WorkflowRunStatusCompleted WorkflowRunStatus = "completed"
1364
+	WorkflowRunStatusCancelled WorkflowRunStatus = "cancelled"
1365
+)
1366
+
1367
+func (e *WorkflowRunStatus) Scan(src interface{}) error {
1368
+	switch s := src.(type) {
1369
+	case []byte:
1370
+		*e = WorkflowRunStatus(s)
1371
+	case string:
1372
+		*e = WorkflowRunStatus(s)
1373
+	default:
1374
+		return fmt.Errorf("unsupported scan type for WorkflowRunStatus: %T", src)
1375
+	}
1376
+	return nil
1377
+}
1378
+
1379
+type NullWorkflowRunStatus struct {
1380
+	WorkflowRunStatus WorkflowRunStatus
1381
+	Valid             bool // Valid is true if WorkflowRunStatus is not NULL
1382
+}
1383
+
1384
+// Scan implements the Scanner interface.
1385
+func (ns *NullWorkflowRunStatus) Scan(value interface{}) error {
1386
+	if value == nil {
1387
+		ns.WorkflowRunStatus, ns.Valid = "", false
1388
+		return nil
1389
+	}
1390
+	ns.Valid = true
1391
+	return ns.WorkflowRunStatus.Scan(value)
1392
+}
1393
+
1394
+// Value implements the driver Valuer interface.
1395
+func (ns NullWorkflowRunStatus) Value() (driver.Value, error) {
1396
+	if !ns.Valid {
1397
+		return nil, nil
1398
+	}
1399
+	return string(ns.WorkflowRunStatus), nil
1400
+}
1401
+
1402
+type WorkflowRunnerStatus string
1403
+
1404
+const (
1405
+	WorkflowRunnerStatusIdle    WorkflowRunnerStatus = "idle"
1406
+	WorkflowRunnerStatusBusy    WorkflowRunnerStatus = "busy"
1407
+	WorkflowRunnerStatusOffline WorkflowRunnerStatus = "offline"
1408
+)
1409
+
1410
+func (e *WorkflowRunnerStatus) Scan(src interface{}) error {
1411
+	switch s := src.(type) {
1412
+	case []byte:
1413
+		*e = WorkflowRunnerStatus(s)
1414
+	case string:
1415
+		*e = WorkflowRunnerStatus(s)
1416
+	default:
1417
+		return fmt.Errorf("unsupported scan type for WorkflowRunnerStatus: %T", src)
1418
+	}
1419
+	return nil
1420
+}
1421
+
1422
+type NullWorkflowRunnerStatus struct {
1423
+	WorkflowRunnerStatus WorkflowRunnerStatus
1424
+	Valid                bool // Valid is true if WorkflowRunnerStatus is not NULL
1425
+}
1426
+
1427
+// Scan implements the Scanner interface.
1428
+func (ns *NullWorkflowRunnerStatus) Scan(value interface{}) error {
1429
+	if value == nil {
1430
+		ns.WorkflowRunnerStatus, ns.Valid = "", false
1431
+		return nil
1432
+	}
1433
+	ns.Valid = true
1434
+	return ns.WorkflowRunnerStatus.Scan(value)
1435
+}
1436
+
1437
+// Value implements the driver Valuer interface.
1438
+func (ns NullWorkflowRunnerStatus) Value() (driver.Value, error) {
1439
+	if !ns.Valid {
1440
+		return nil, nil
1441
+	}
1442
+	return string(ns.WorkflowRunnerStatus), nil
1443
+}
1444
+
1445
+type WorkflowStepStatus string
1446
+
1447
+const (
1448
+	WorkflowStepStatusQueued    WorkflowStepStatus = "queued"
1449
+	WorkflowStepStatusRunning   WorkflowStepStatus = "running"
1450
+	WorkflowStepStatusCompleted WorkflowStepStatus = "completed"
1451
+	WorkflowStepStatusCancelled WorkflowStepStatus = "cancelled"
1452
+	WorkflowStepStatusSkipped   WorkflowStepStatus = "skipped"
1453
+)
1454
+
1455
+func (e *WorkflowStepStatus) Scan(src interface{}) error {
1456
+	switch s := src.(type) {
1457
+	case []byte:
1458
+		*e = WorkflowStepStatus(s)
1459
+	case string:
1460
+		*e = WorkflowStepStatus(s)
1461
+	default:
1462
+		return fmt.Errorf("unsupported scan type for WorkflowStepStatus: %T", src)
1463
+	}
1464
+	return nil
1465
+}
1466
+
1467
+type NullWorkflowStepStatus struct {
1468
+	WorkflowStepStatus WorkflowStepStatus
1469
+	Valid              bool // Valid is true if WorkflowStepStatus is not NULL
1470
+}
1471
+
1472
+// Scan implements the Scanner interface.
1473
+func (ns *NullWorkflowStepStatus) Scan(value interface{}) error {
1474
+	if value == nil {
1475
+		ns.WorkflowStepStatus, ns.Valid = "", false
1476
+		return nil
1477
+	}
1478
+	ns.Valid = true
1479
+	return ns.WorkflowStepStatus.Scan(value)
1480
+}
1481
+
1482
+// Value implements the driver Valuer interface.
1483
+func (ns NullWorkflowStepStatus) Value() (driver.Value, error) {
1484
+	if !ns.Valid {
1485
+		return nil, nil
1486
+	}
1487
+	return string(ns.WorkflowStepStatus), nil
1488
+}
1489
+
1490
+type ActionsVariable struct {
1491
+	ID              int64
1492
+	RepoID          pgtype.Int8
1493
+	OrgID           pgtype.Int8
1494
+	Name            string
1495
+	Value           string
1496
+	CreatedByUserID pgtype.Int8
1497
+	CreatedAt       pgtype.Timestamptz
1498
+	UpdatedAt       pgtype.Timestamptz
1499
+}
1500
+
12691501
 type AuthAuditLog struct {
12701502
 	ID         int64
12711503
 	ActorID    pgtype.Int8
@@ -1784,6 +2016,15 @@ type ReposSearch struct {
17842016
 	Tsv    interface{}
17852017
 }
17862018
 
2019
+type RunnerToken struct {
2020
+	ID        int64
2021
+	RunnerID  int64
2022
+	TokenHash []byte
2023
+	ExpiresAt pgtype.Timestamptz
2024
+	RevokedAt pgtype.Timestamptz
2025
+	CreatedAt pgtype.Timestamptz
2026
+}
2027
+
17872028
 type SignupIpThrottle struct {
17882029
 	Cidr            netip.Addr
17892030
 	Hits            int32
@@ -2001,3 +2242,116 @@ type WebhookEventsPending struct {
20012242
 	Payload   []byte
20022243
 	CreatedAt pgtype.Timestamptz
20032244
 }
2245
+
2246
+type WorkflowArtifact struct {
2247
+	ID        int64
2248
+	RunID     int64
2249
+	Name      string
2250
+	ObjectKey string
2251
+	ByteCount int64
2252
+	ExpiresAt pgtype.Timestamptz
2253
+	CreatedAt pgtype.Timestamptz
2254
+}
2255
+
2256
+type WorkflowJob struct {
2257
+	ID              int64
2258
+	RunID           int64
2259
+	JobIndex        int32
2260
+	JobKey          string
2261
+	JobName         string
2262
+	RunsOn          string
2263
+	RunnerID        pgtype.Int8
2264
+	NeedsJobs       []string
2265
+	IfExpr          string
2266
+	TimeoutMinutes  int32
2267
+	Permissions     []byte
2268
+	JobEnv          []byte
2269
+	Status          WorkflowJobStatus
2270
+	Conclusion      NullCheckConclusion
2271
+	CancelRequested bool
2272
+	StartedAt       pgtype.Timestamptz
2273
+	CompletedAt     pgtype.Timestamptz
2274
+	Version         int32
2275
+	CreatedAt       pgtype.Timestamptz
2276
+	UpdatedAt       pgtype.Timestamptz
2277
+}
2278
+
2279
+type WorkflowRun struct {
2280
+	ID               int64
2281
+	RepoID           int64
2282
+	RunIndex         int64
2283
+	WorkflowFile     string
2284
+	WorkflowName     string
2285
+	HeadSha          string
2286
+	HeadRef          string
2287
+	Event            WorkflowRunEvent
2288
+	EventPayload     []byte
2289
+	ActorUserID      pgtype.Int8
2290
+	ParentRunID      pgtype.Int8
2291
+	ConcurrencyGroup string
2292
+	Status           WorkflowRunStatus
2293
+	Conclusion       NullCheckConclusion
2294
+	Pinned           bool
2295
+	NeedApproval     bool
2296
+	ApprovedByUserID pgtype.Int8
2297
+	StartedAt        pgtype.Timestamptz
2298
+	CompletedAt      pgtype.Timestamptz
2299
+	Version          int32
2300
+	CreatedAt        pgtype.Timestamptz
2301
+	UpdatedAt        pgtype.Timestamptz
2302
+}
2303
+
2304
+type WorkflowRunner struct {
2305
+	ID                 int64
2306
+	Name               string
2307
+	Labels             []string
2308
+	Capacity           int32
2309
+	Status             WorkflowRunnerStatus
2310
+	LastHeartbeatAt    pgtype.Timestamptz
2311
+	RegisteredByUserID pgtype.Int8
2312
+	CreatedAt          pgtype.Timestamptz
2313
+	UpdatedAt          pgtype.Timestamptz
2314
+}
2315
+
2316
+type WorkflowSecret struct {
2317
+	ID              int64
2318
+	RepoID          pgtype.Int8
2319
+	OrgID           pgtype.Int8
2320
+	Name            string
2321
+	Ciphertext      []byte
2322
+	Nonce           []byte
2323
+	CreatedByUserID pgtype.Int8
2324
+	CreatedAt       pgtype.Timestamptz
2325
+	UpdatedAt       pgtype.Timestamptz
2326
+}
2327
+
2328
+type WorkflowStep struct {
2329
+	ID               int64
2330
+	JobID            int64
2331
+	StepIndex        int32
2332
+	StepID           string
2333
+	StepName         string
2334
+	IfExpr           string
2335
+	RunCommand       string
2336
+	UsesAlias        string
2337
+	WorkingDirectory string
2338
+	StepEnv          []byte
2339
+	ContinueOnError  bool
2340
+	Status           WorkflowStepStatus
2341
+	Conclusion       NullCheckConclusion
2342
+	LogObjectKey     pgtype.Text
2343
+	LogByteCount     int64
2344
+	StartedAt        pgtype.Timestamptz
2345
+	CompletedAt      pgtype.Timestamptz
2346
+	Version          int32
2347
+	CreatedAt        pgtype.Timestamptz
2348
+	UpdatedAt        pgtype.Timestamptz
2349
+}
2350
+
2351
+type WorkflowStepLogChunk struct {
2352
+	ID        int64
2353
+	StepID    int64
2354
+	Seq       int32
2355
+	Chunk     []byte
2356
+	CreatedAt pgtype.Timestamptz
2357
+}