Skip to content

Commit fc47717

Browse files
committed
chore: bump to Go 1.26, add dependabot config
Bump the Go version to 1.26 and add a dependabot configuration for automated dependency updates (both Go modules and GitHub Actions). Also removed the pinned golangci-lint version so it always uses the latest from the action, avoiding manual maintenance on every release. The release workflow now skips dependabot PRs since those don't need snapshot builds.
1 parent df2abf7 commit fc47717

7 files changed

Lines changed: 36 additions & 13 deletions

File tree

.github/dependabot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
commit-message:
8+
prefix: "chore(deps)"
9+
groups:
10+
github-actions:
11+
patterns:
12+
- "*"
13+
14+
- package-ecosystem: gomod
15+
directory: /
16+
schedule:
17+
interval: daily
18+
commit-message:
19+
prefix: "chore(deps)"
20+
groups:
21+
go-dependencies:
22+
patterns:
23+
- "*"

.github/workflows/lint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ jobs:
3737
uses: golangci/golangci-lint-action@v9
3838
with:
3939
args: --verbose
40-
version: v2.7

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ concurrency:
99
jobs:
1010
goreleaser:
1111
name: Release
12+
if: github.actor != 'dependabot[bot]'
1213
runs-on: ubuntu-latest
1314
permissions:
1415
id-token: write

client/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (c *client) Do(req *http.Request) (*http.Response, error) {
110110
req.URL.Host = u.Host
111111

112112
// execute request
113-
resp, err := httpC.Do(req)
113+
resp, err := httpC.Do(req) //nolint:gosec // URL is constructed from user-configured Spacelift endpoint, not untrusted input
114114
if err != nil {
115115
return nil, fmt.Errorf("error executing request: %w", err)
116116
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/spacelift-io/spacectl
22

3-
go 1.25.0
3+
go 1.26
44

55
require (
66
github.com/Masterminds/semver/v3 v3.4.0

internal/cmd/graphql/mcp.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,15 @@ func formatSchemaSummary(schema any) (*mcp.CallToolResult, error) {
309309
if queryType.IsValid() {
310310
fields := queryType.FieldByName("Fields")
311311
if fields.IsValid() && fields.Len() > 0 {
312-
summary.WriteString(fmt.Sprintf("Available Queries (%d):\n", fields.Len()))
312+
fmt.Fprintf(&summary, "Available Queries (%d):\n", fields.Len())
313313
for i := 0; i < fields.Len(); i++ {
314314
field := fields.Index(i)
315315
name := field.FieldByName("Name").String()
316316
description := field.FieldByName("Description").String()
317317
if description != "" {
318-
summary.WriteString(fmt.Sprintf(" - %s: %s\n", name, description))
318+
fmt.Fprintf(&summary, " - %s: %s\n", name, description)
319319
} else {
320-
summary.WriteString(fmt.Sprintf(" - %s\n", name))
320+
fmt.Fprintf(&summary, " - %s\n", name)
321321
}
322322
}
323323
summary.WriteString("\n")
@@ -329,15 +329,15 @@ func formatSchemaSummary(schema any) (*mcp.CallToolResult, error) {
329329
if mutationType.IsValid() && !mutationType.IsNil() {
330330
fields := mutationType.Elem().FieldByName("Fields")
331331
if fields.IsValid() && fields.Len() > 0 {
332-
summary.WriteString(fmt.Sprintf("Available Mutations (%d):\n", fields.Len()))
332+
fmt.Fprintf(&summary, "Available Mutations (%d):\n", fields.Len())
333333
for i := 0; i < fields.Len(); i++ {
334334
field := fields.Index(i)
335335
name := field.FieldByName("Name").String()
336336
description := field.FieldByName("Description").String()
337337
if description != "" {
338-
summary.WriteString(fmt.Sprintf(" - %s: %s\n", name, description))
338+
fmt.Fprintf(&summary, " - %s: %s\n", name, description)
339339
} else {
340-
summary.WriteString(fmt.Sprintf(" - %s\n", name))
340+
fmt.Fprintf(&summary, " - %s\n", name)
341341
}
342342
}
343343
summary.WriteString("\n")
@@ -371,17 +371,17 @@ func formatSchemaSummary(schema any) (*mcp.CallToolResult, error) {
371371

372372
if len(objectTypes) > 0 {
373373
sort.Strings(objectTypes)
374-
summary.WriteString(fmt.Sprintf("Object Types (%d): %s\n\n", len(objectTypes), strings.Join(objectTypes, ", ")))
374+
fmt.Fprintf(&summary, "Object Types (%d): %s\n\n", len(objectTypes), strings.Join(objectTypes, ", "))
375375
}
376376

377377
if len(enumTypes) > 0 {
378378
sort.Strings(enumTypes)
379-
summary.WriteString(fmt.Sprintf("Enum Types (%d): %s\n\n", len(enumTypes), strings.Join(enumTypes, ", ")))
379+
fmt.Fprintf(&summary, "Enum Types (%d): %s\n\n", len(enumTypes), strings.Join(enumTypes, ", "))
380380
}
381381

382382
if len(scalarTypes) > 0 {
383383
sort.Strings(scalarTypes)
384-
summary.WriteString(fmt.Sprintf("Scalar Types (%d): %s\n\n", len(scalarTypes), strings.Join(scalarTypes, ", ")))
384+
fmt.Fprintf(&summary, "Scalar Types (%d): %s\n\n", len(scalarTypes), strings.Join(scalarTypes, ", "))
385385
}
386386
}
387387

internal/cmd/module/search_version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func getSearchModuleVersions(ctx context.Context, cliCmd *cli.Command, cursor st
105105
if err := authenticated.Client().Query(ctx, &query, map[string]interface{}{
106106
"id": cliCmd.String(flagModuleID.Name),
107107
"input": structs.SearchInput{
108-
First: graphql.NewInt(graphql.Int(int32(limit))), //nolint: gosec
108+
First: graphql.NewInt(graphql.Int(int32(limit))), //nolint:gosec
109109
After: after,
110110
OrderBy: &structs.QueryOrder{
111111
Field: "createdAt",

0 commit comments

Comments
 (0)