From 9fdbd4aafcb21d957e63824b2926e2558bef2c94 Mon Sep 17 00:00:00 2001 From: Hugo Nijhuis-Mekkelholt Date: Tue, 30 Dec 2025 19:57:49 +0100 Subject: [PATCH] fix: formatting and error message capitalization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Run go fmt on modules/api/types.go to fix struct alignment - Use lowercase error messages to match codebase conventions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- cmd/actions/jobs.go | 4 ++-- cmd/actions/logs.go | 4 ++-- modules/api/types.go | 28 ++++++++++++++-------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cmd/actions/jobs.go b/cmd/actions/jobs.go index 83e0332..dd914b0 100644 --- a/cmd/actions/jobs.go +++ b/cmd/actions/jobs.go @@ -33,12 +33,12 @@ func RunActionJobs(ctx stdctx.Context, cmd *cli.Command) error { c.Ensure(context.CtxRequirement{RemoteRepo: true}) if cmd.Args().Len() < 1 { - return fmt.Errorf("Run ID is required") + return fmt.Errorf("run ID is required") } runID, err := utils.ArgToIndex(cmd.Args().First()) if err != nil { - return fmt.Errorf("Invalid run ID: %w", err) + return fmt.Errorf("invalid run ID: %w", err) } client := api.NewClient(c.Login) diff --git a/cmd/actions/logs.go b/cmd/actions/logs.go index 772ffff..34d0ab8 100644 --- a/cmd/actions/logs.go +++ b/cmd/actions/logs.go @@ -32,12 +32,12 @@ func RunActionLogs(ctx stdctx.Context, cmd *cli.Command) error { c.Ensure(context.CtxRequirement{RemoteRepo: true}) if cmd.Args().Len() < 1 { - return fmt.Errorf("Job ID is required") + return fmt.Errorf("job ID is required") } jobID, err := utils.ArgToIndex(cmd.Args().First()) if err != nil { - return fmt.Errorf("Invalid job ID: %w", err) + return fmt.Errorf("invalid job ID: %w", err) } client := api.NewClient(c.Login) diff --git a/modules/api/types.go b/modules/api/types.go index 92dd912..7ecce2b 100644 --- a/modules/api/types.go +++ b/modules/api/types.go @@ -7,20 +7,20 @@ import "time" // ActionRun represents a workflow run type ActionRun struct { - ID int64 `json:"id"` - Title string `json:"display_title"` - Path string `json:"path"` - Status string `json:"status"` - Conclusion string `json:"conclusion"` - Event string `json:"event"` - HeadBranch string `json:"head_branch"` - HeadSHA string `json:"head_sha"` - RunNumber int64 `json:"run_number"` - RunAttempt int64 `json:"run_attempt"` - HTMLURL string `json:"html_url"` - URL string `json:"url"` - StartedAt *time.Time `json:"started_at"` - CompletedAt *time.Time `json:"completed_at"` + ID int64 `json:"id"` + Title string `json:"display_title"` + Path string `json:"path"` + Status string `json:"status"` + Conclusion string `json:"conclusion"` + Event string `json:"event"` + HeadBranch string `json:"head_branch"` + HeadSHA string `json:"head_sha"` + RunNumber int64 `json:"run_number"` + RunAttempt int64 `json:"run_attempt"` + HTMLURL string `json:"html_url"` + URL string `json:"url"` + StartedAt *time.Time `json:"started_at"` + CompletedAt *time.Time `json:"completed_at"` } // ActionRunList is a list of workflow runs