Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.13
version: v2.13.2
args: --verbose

- uses: hadolint/hadolint-action@v3.5.0
Expand All @@ -30,7 +30,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
go: ["1.25"]
go: ["1.26", "1.27"]
include:
- os: ubuntu-latest
go-build: ~/.cache/go-build
Expand All @@ -55,9 +55,9 @@ jobs:
path: |
${{ matrix.go-build }}
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
${{ runner.os }}-go-${{ matrix.go }}-
- name: Run Tests
run: |
go test -race -cover -coverprofile=coverage.out ./...
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ go test -v -run TestName ./...
### Linting

```bash
# Run golangci-lint (requires golangci-lint v2.6)
# Run golangci-lint (requires golangci-lint v2.13)
golangci-lint run --verbose

# Check Dockerfile
Expand Down Expand Up @@ -128,7 +128,7 @@ go run .

## Code Style & Standards

- Go version: 1.25
- Go version: 1.26
- Linter configuration in `.golangci.yml` includes: gosec, govet, staticcheck, errcheck, and formatting tools (gofmt, gofumpt, goimports, golines)
- Security scanning via gosec is enabled; intentional security exceptions are marked with `#nosec` comments
- All tests should include race detection (`-race` flag)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.25-alpine AS builder
FROM golang:1.26-alpine AS builder

# Build arguments for version injection
ARG VERSION=dev
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/appleboy/LLM-action

go 1.25.0
go 1.26.0

require (
github.com/appleboy/com v1.2.0
github.com/sashabaranov/go-openai v1.41.2
github.com/appleboy/com v1.2.1
github.com/sashabaranov/go-openai v1.42.1
)

require github.com/yassinebenaid/godump v0.11.1
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github.com/appleboy/com v1.2.0 h1:3jyA+yVofe/uzPHHa7Xrsj7rnDy1sZn/8pYHdzHB3GQ=
github.com/appleboy/com v1.2.0/go.mod h1:XK2kV+JWz/gkzsDPotNJL+aS6XCy5GNlbiTWGvIhqIU=
github.com/sashabaranov/go-openai v1.41.2 h1:vfPRBZNMpnqu8ELsclWcAvF19lDNgh1t6TVfFFOPiSM=
github.com/sashabaranov/go-openai v1.41.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/appleboy/com v1.2.1 h1:4bqaVFSxy1Q3mRotTIcF8TLryTet0652iNDNVV16skM=
github.com/appleboy/com v1.2.1/go.mod h1:KKYavyU5ejOp8c4vW+daKMf6Dw2DxE9IjqmWAhy0huo=
github.com/sashabaranov/go-openai v1.42.1 h1:9nK2UgDVVSIyoEUNDeWqu3Ttj8EqCO6FT8HK0Cv8VEo=
github.com/sashabaranov/go-openai v1.42.1/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/yassinebenaid/godump v0.11.1 h1:SPujx/XaYqGDfmNh7JI3dOyCUVrG0bG2duhO3Eh2EhI=
github.com/yassinebenaid/godump v0.11.1/go.mod h1:dc/0w8wmg6kVIvNGAzbKH1Oa54dXQx8SNKh4dPRyW44=
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func buildChatRequest(
// max_completion_tokens so existing configs keep working.
req.MaxCompletionTokens = config.MaxTokens
default:
req.MaxTokens = config.MaxTokens
req.MaxTokens = config.MaxTokens //nolint:staticcheck // Preserve max_tokens for compatible services and non-reasoning models.
}

if isReasoningModel(config.Model) {
Expand Down
3 changes: 2 additions & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ func TestBuildChatRequest(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
req := buildChatRequest(tt.config, messages, nil)

if req.MaxTokens != tt.expectedMaxTokens {
if req.MaxTokens != tt.expectedMaxTokens { //nolint:staticcheck // Verify legacy max_tokens compatibility.
//nolint:staticcheck // Report the legacy field.
t.Errorf("MaxTokens = %d, want %d", req.MaxTokens, tt.expectedMaxTokens)
}
if req.MaxCompletionTokens != tt.expectedMaxCompletionTokens {
Expand Down
Loading