tenseleyflow/shithub / 5bdfcc2

Browse files

web/actions: gofumpt run detail files (S41f)

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
5bdfcc2129d8d4fe5e0b4bf6cffe95287e3683df
Parents
cc23044
Tree
ca50da1

2 changed files

StatusFile+-
M internal/web/handlers/repo/actions.go 4 2
M internal/web/handlers/repo/actions_test.go 8 4
internal/web/handlers/repo/actions.gomodified
@@ -23,8 +23,10 @@ import (
2323
 	"github.com/tenseleyFlow/shithub/internal/infra/storage"
2424
 )
2525
 
26
-const actionsRunsPageSize = int32(20)
27
-const actionsStepLogRenderLimit = 1 << 20
26
+const (
27
+	actionsRunsPageSize       = int32(20)
28
+	actionsStepLogRenderLimit = 1 << 20
29
+)
2830
 
2931
 type actionsWorkflowView struct {
3032
 	File   string
internal/web/handlers/repo/actions_test.gomodified
@@ -407,7 +407,8 @@ func (f *repoFixture) insertWorkflowRun(t *testing.T, fx workflowRunFixture, bas
407407
 		conclusion = actionsdb.NullCheckConclusion{CheckConclusion: fx.Conclusion, Valid: true}
408408
 	}
409409
 	var id int64
410
-	err := f.pool.QueryRow(context.Background(), `
410
+	err := f.pool.QueryRow(
411
+		context.Background(), `
411412
 		INSERT INTO workflow_runs (
412413
 			repo_id, run_index, workflow_file, workflow_name,
413414
 			head_sha, head_ref, event, event_payload, actor_user_id,
@@ -483,7 +484,8 @@ func (f *repoFixture) insertWorkflowJob(t *testing.T, fx workflowJobFixture) int
483484
 		runnerID = pgtype.Int8{Int64: f.insertWorkflowRunner(t), Valid: true}
484485
 	}
485486
 	var id int64
486
-	err := f.pool.QueryRow(context.Background(), `
487
+	err := f.pool.QueryRow(
488
+		context.Background(), `
487489
 		INSERT INTO workflow_jobs (
488490
 			run_id, job_index, job_key, job_name, runs_on, needs_jobs,
489491
 			runner_id, status, conclusion, started_at, completed_at
@@ -513,7 +515,8 @@ func (f *repoFixture) insertWorkflowJob(t *testing.T, fx workflowJobFixture) int
513515
 func (f *repoFixture) insertWorkflowRunner(t *testing.T) int64 {
514516
 	t.Helper()
515517
 	var id int64
516
-	err := f.pool.QueryRow(context.Background(), `
518
+	err := f.pool.QueryRow(
519
+		context.Background(), `
517520
 		INSERT INTO workflow_runners (name, labels, status)
518521
 		VALUES ($1, ARRAY['ubuntu-latest']::text[], 'busy')
519522
 		RETURNING id`,
@@ -560,7 +563,8 @@ func (f *repoFixture) insertWorkflowStep(t *testing.T, fx workflowStepFixture) i
560563
 		completedAt = pgtype.Timestamptz{Time: fx.CompletedAt, Valid: true}
561564
 	}
562565
 	var id int64
563
-	err := f.pool.QueryRow(context.Background(), `
566
+	err := f.pool.QueryRow(
567
+		context.Background(), `
564568
 		INSERT INTO workflow_steps (
565569
 			job_id, step_index, step_name, run_command, uses_alias,
566570
 			status, conclusion, started_at, completed_at