diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml new file mode 100644 index 0000000..e47f8f6 --- /dev/null +++ b/.github/workflows/pr-agent.yml @@ -0,0 +1,29 @@ +name: PR Agent +on: + pull_request: + types: [opened, reopened, ready_for_review, synchronize] + issue_comment: + types: [created, edited] +jobs: + pr_agent_job: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + contents: write + checks: write + if: ${{ github.event.sender.type != 'Bot' }} + steps: + - name: PR Agent action step + uses: the-pr-agent/pr-agent@570f67ed5fc8db5be74c18df070bc20079b64b0d # v0.41.0 + env: + OPENAI_KEY: ${{ secrets.OPENAI_KEY }} + OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + github_action_config.auto_review: "true" + github_action_config.auto_describe: "true" + github_action_config.auto_improve: "true" + github_action_config.pr_actions: '["opened", "reopened", "ready_for_review", "synchronize"]' + config.model: "openai/preview/Kimi-K2.7-Code" + config.fallback_models: '["openai/preview/Qwen3.6-35B-A3B","openai/gpt-oss-120b"]' + config.custom_model_max_tokens: 32000 diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..2516d20 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,37 @@ +version: "2" +run: + tests: true +linters: + enable: + - govet + - ineffassign + - staticcheck + - unused + - bodyclose + - gocognit + - dupl + - errcheck + - modernize + - errname + - errorlint + - prealloc + + settings: + gocognit: + min-complexity: 15 + dupl: + threshold: 100 + modernize: + disable: + - plusbuild + errcheck: + exclude-functions: + - fmt.Fprintf + - (io.Closer).Close + - (*os.File).Close + - (*net.TCPConn).Close + - (*net.TCPListener).Close + - (*bytes.Buffer).Write + - (*strings.Builder).WriteString + - (*net/http.Server).Close + - (net.Listener).Close