Skip to content

Commit 30d2f75

Browse files
committed
fix linter
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
1 parent a1bdef4 commit 30d2f75

5 files changed

Lines changed: 17 additions & 17 deletions

File tree

app/cli/cmd/workflow_workflow_run_describe.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ func workflowRunDescribeTableOutput(run *action.WorkflowRunItemFull) error {
178178
policiesTable(evs, gt)
179179
}
180180

181-
if run.Attestation.AttestationViewUrl != "" {
182-
gt.AppendRow(table.Row{"Attestation View URL", run.Attestation.AttestationViewUrl})
181+
if run.Attestation.AttestationViewURL != "" {
182+
gt.AppendRow(table.Row{"Attestation View URL", run.Attestation.AttestationViewURL})
183183
}
184184

185185
gt.Render()

app/cli/pkg/action/action.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ func getCASBackend(ctx context.Context, client pb.AttestationServiceClient, work
155155
return casBackendInfo, artifactCASConn.Close, nil
156156
}
157157

158-
// fetchUiDashboardURL retrieves the UI Dashboard URL from the control plane
158+
// fetchUIDashboardURL retrieves the UI Dashboard URL from the control plane
159159
// Returns empty string if not configured or if fetch fails
160-
func fetchUiDashboardURL(ctx context.Context, cpConnection *grpc.ClientConn) string {
160+
func fetchUIDashboardURL(ctx context.Context, cpConnection *grpc.ClientConn) string {
161161
if cpConnection == nil {
162162
return ""
163163
}
@@ -176,12 +176,12 @@ func fetchUiDashboardURL(ctx context.Context, cpConnection *grpc.ClientConn) str
176176

177177
// buildAttestationViewURL constructs the attestation view URL
178178
// Returns empty string if platformURL is not configured
179-
func buildAttestationViewURL(uiDashboardUrl, digest string) string {
180-
if uiDashboardUrl == "" || digest == "" {
179+
func buildAttestationViewURL(uiDashboardURL, digest string) string {
180+
if uiDashboardURL == "" || digest == "" {
181181
return ""
182182
}
183183

184184
// Trim trailing slash from platform URL if present
185-
uiDashboardUrl = strings.TrimRight(uiDashboardUrl, "/")
186-
return fmt.Sprintf("%s/attestation/%s?tab=summary", uiDashboardUrl, digest)
185+
uiDashboardURL = strings.TrimRight(uiDashboardURL, "/")
186+
return fmt.Sprintf("%s/attestation/%s?tab=summary", uiDashboardURL, digest)
187187
}

app/cli/pkg/action/attestation_init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ func (action *AttestationInit) Run(ctx context.Context, opts *AttestationInitRun
282282
Auth: authInfo,
283283
CASBackend: casBackendInfo,
284284
Logger: &action.Logger,
285-
UiDashboardUrl: uiDashboardUrl,
285+
UIDashboardURL: uiDashboardUrl,
286286
}
287287

288288
if err := action.c.Init(ctx, initOpts); err != nil {

app/cli/pkg/action/workflow_run_describe.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type WorkflowRunAttestationItem struct {
6262
// Policy evaluation status
6363
PolicyEvaluationStatus *PolicyEvaluationStatus `json:"policy_evaluation_status,omitempty"`
6464
// URL to view the attestation in the UI
65-
AttestationViewUrl string `json:"attestation_view_url"`
65+
AttestationViewURL string `json:"attestation_view_url"`
6666
}
6767

6868
type PolicyEvaluationStatus struct {
@@ -230,9 +230,9 @@ func (action *WorkflowRunDescribe) Run(ctx context.Context, opts *WorkflowRunDes
230230
policyEvaluationStatus := att.GetPolicyEvaluationStatus()
231231

232232
var attestationViewUrl string
233-
baseUiDashboardUrl := fetchUiDashboardURL(ctx, action.cfg.CPConnection)
234-
if baseUiDashboardUrl != "" {
235-
attestationViewUrl = buildAttestationViewURL(baseUiDashboardUrl, att.DigestInCasBackend)
233+
baseUIDashboardURL := fetchUIDashboardURL(ctx, action.cfg.CPConnection)
234+
if baseUIDashboardURL != "" {
235+
attestationViewUrl = buildAttestationViewURL(baseUIDashboardURL, att.DigestInCasBackend)
236236
}
237237

238238
item.Attestation = &WorkflowRunAttestationItem{
@@ -251,7 +251,7 @@ func (action *WorkflowRunDescribe) Run(ctx context.Context, opts *WorkflowRunDes
251251
HasViolations: policyEvaluationStatus.HasViolations,
252252
HasGatedViolations: policyEvaluationStatus.HasGatedViolations,
253253
},
254-
AttestationViewUrl: attestationViewUrl,
254+
AttestationViewURL: attestationViewUrl,
255255
}
256256

257257
return item, nil

pkg/attestation/crafter/crafter.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ type InitOpts struct {
169169
PoliciesAllowedHostnames []string
170170
// CAS backend information
171171
CASBackend *api.Attestation_CASBackend
172-
// UiDashboardUrl is the base URL to build the attestation view link
173-
UiDashboardUrl string
172+
// UIDashboardURL is the base URL to build the attestation view link
173+
UIDashboardURL string
174174
// Logger for verification logging
175175
Logger *zerolog.Logger
176176
}
@@ -418,7 +418,7 @@ func initialCraftingState(cwd string, opts *InitOpts) (*api.CraftingState, error
418418
CasBackend: opts.CASBackend,
419419
},
420420
DryRun: opts.DryRun,
421-
UiDashboardUrl: opts.UiDashboardUrl,
421+
UiDashboardUrl: opts.UIDashboardURL,
422422
}
423423

424424
// Set the appropriate schema

0 commit comments

Comments
 (0)