All checks were successful
check / check (push) Successful in 8s
## Summary This PR brings the webhooker repo into full REPO_POLICIES compliance, addressing both [issue #1](#1) and [issue #2](#2). ## Changes ### New files - **`cmd/webhooker/main.go`** — The missing application entry point. Uses Uber fx to wire together all internal packages (config, database, logger, server, handlers, middleware, healthcheck, globals, session). Minimal glue code. - **`REPO_POLICIES.md`** — Fetched from authoritative source (`sneak/prompts`) - **`.editorconfig`** — Fetched from authoritative source - **`.dockerignore`** — Sensible Go project exclusions - **`.gitea/workflows/check.yml`** — CI workflow that runs `docker build .` on push to any branch (Gitea Actions format, actions/checkout pinned by sha256) - **`configs/config.yaml.example`** — Moved from root `config.yaml` ### Modified files - **`Makefile`** — Complete rewrite with all REPO_POLICIES required targets: `test`, `lint`, `fmt`, `fmt-check`, `check`, `build`, `hooks`, `docker`, `clean`, plus `dev`, `run`, `deps` - **`Dockerfile`** — Complete rewrite: - Builder: `golang:1.24` (Debian-based, pinned by `sha256:d2d2bc1c84f7...`). Debian needed because `gorm.io/driver/sqlite` pulls `mattn/go-sqlite3` (CGO) which fails on Alpine musl. - golangci-lint v1.64.8 installed from GitHub release archive with sha256 verification (v1.x because `.golangci.yml` uses v1 config format) - Runs `make check` (fmt-check + lint + test + build) as build step - Final stage: `alpine:3.21` (pinned by `sha256:c3f8e73fdb79...`) with non-root user, healthcheck, port 8080 - **`README.md`** — Rewritten with all required REPO_POLICIES sections: description line with name/purpose/category/license/author, Getting Started, Rationale, Design, TODO (integrated from TODO.md), License, Author - **`.gitignore`** — Fixed `webhooker` pattern to `/webhooker` (was blocking `cmd/webhooker/`), added `config.yaml` to prevent committing runtime config with secrets - **`static/static.go`** — Removed `vendor` from embed directive (directory was empty/missing) - **`internal/database/database_test.go`** — Fixed to use in-memory config via `afero.MemMapFs` instead of depending on `config.yaml` on disk. Test is now properly isolated. - **`go.mod`/`go.sum`** — `go mod tidy` ### Removed files - **`TODO.md`** — Content integrated into README.md TODO section - **`config.yaml`** — Moved to `configs/config.yaml.example` ## Verification - `docker build .` passes (lint ✅, test ✅, build ✅) - All existing tests pass with no modifications to assertions or test logic - `.golangci.yml` untouched closes #1 closes #2 Co-authored-by: clawbot <clawbot@noreply.git.eeqj.de> Reviewed-on: #6 Co-authored-by: clawbot <clawbot@noreply.example.org> Co-committed-by: clawbot <clawbot@noreply.example.org>
89 lines
3.6 KiB
Modula-2
89 lines
3.6 KiB
Modula-2
module sneak.berlin/go/webhooker
|
|
|
|
go 1.23.0
|
|
|
|
toolchain go1.24.1
|
|
|
|
require (
|
|
github.com/99designs/basicauth-go v0.0.0-20230316000542-bf6f9cbbf0f8
|
|
github.com/getsentry/sentry-go v0.25.0
|
|
github.com/go-chi/chi v1.5.5
|
|
github.com/go-chi/cors v1.2.1
|
|
github.com/google/uuid v1.6.0
|
|
github.com/gorilla/sessions v1.4.0
|
|
github.com/joho/godotenv v1.5.1
|
|
github.com/prometheus/client_golang v1.18.0
|
|
github.com/slok/go-http-metrics v0.11.0
|
|
github.com/spf13/afero v1.14.0
|
|
github.com/stretchr/testify v1.8.4
|
|
go.uber.org/fx v1.20.1
|
|
golang.org/x/crypto v0.38.0
|
|
gorm.io/driver/sqlite v1.5.4
|
|
gorm.io/gorm v1.25.5
|
|
modernc.org/sqlite v1.28.0
|
|
sneak.berlin/go/webhooker/pkg/config v0.0.0-00010101000000-000000000000
|
|
)
|
|
|
|
require (
|
|
cloud.google.com/go/compute v1.23.3 // indirect
|
|
cloud.google.com/go/compute/metadata v0.2.3 // indirect
|
|
cloud.google.com/go/iam v1.1.5 // indirect
|
|
cloud.google.com/go/secretmanager v1.11.4 // indirect
|
|
github.com/aws/aws-sdk-go v1.50.0 // indirect
|
|
github.com/beorn7/perks v1.0.1 // indirect
|
|
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
|
github.com/golang/protobuf v1.5.3 // indirect
|
|
github.com/google/s2a-go v0.1.7 // indirect
|
|
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
|
|
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
|
|
github.com/gorilla/securecookie v1.1.2 // indirect
|
|
github.com/jinzhu/inflection v1.0.0 // indirect
|
|
github.com/jinzhu/now v1.1.5 // indirect
|
|
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
|
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
|
github.com/kr/text v0.2.0 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/mattn/go-sqlite3 v1.14.17 // indirect
|
|
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
|
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
|
github.com/prometheus/client_model v0.5.0 // indirect
|
|
github.com/prometheus/common v0.45.0 // indirect
|
|
github.com/prometheus/procfs v0.12.0 // indirect
|
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
|
go.opencensus.io v0.24.0 // indirect
|
|
go.uber.org/atomic v1.9.0 // indirect
|
|
go.uber.org/dig v1.17.0 // indirect
|
|
go.uber.org/multierr v1.9.0 // indirect
|
|
go.uber.org/zap v1.23.0 // indirect
|
|
golang.org/x/mod v0.17.0 // indirect
|
|
golang.org/x/net v0.25.0 // indirect
|
|
golang.org/x/oauth2 v0.15.0 // indirect
|
|
golang.org/x/sync v0.14.0 // indirect
|
|
golang.org/x/sys v0.33.0 // indirect
|
|
golang.org/x/text v0.25.0 // indirect
|
|
golang.org/x/time v0.5.0 // indirect
|
|
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
|
|
google.golang.org/api v0.153.0 // indirect
|
|
google.golang.org/appengine v1.6.7 // indirect
|
|
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
|
|
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
|
|
google.golang.org/grpc v1.59.0 // indirect
|
|
google.golang.org/protobuf v1.31.0 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
lukechampine.com/uint128 v1.2.0 // indirect
|
|
modernc.org/cc/v3 v3.40.0 // indirect
|
|
modernc.org/ccgo/v3 v3.16.13 // indirect
|
|
modernc.org/libc v1.29.0 // indirect
|
|
modernc.org/mathutil v1.6.0 // indirect
|
|
modernc.org/memory v1.7.2 // indirect
|
|
modernc.org/opt v0.1.3 // indirect
|
|
modernc.org/strutil v1.1.3 // indirect
|
|
modernc.org/token v1.0.1 // indirect
|
|
)
|
|
|
|
replace sneak.berlin/go/webhooker/pkg/config => ./pkg/config
|