Replaces DNSWATCHER_DOMAINS and DNSWATCHER_HOSTNAMES with a single DNSWATCHER_TARGETS env var. Names are automatically classified as apex domains or hostnames using the Public Suffix List (golang.org/x/net/publicsuffix). No backwards compatibility — old vars are removed entirely (pre-1.0).
Changes
internal/config/classify.go: ClassifyDNSName() and ClassifyTargets() using publicsuffix.EffectiveTLDPlusOne()
internal/config/classify_test.go: 11 test cases
internal/config/config.go: Replaced DOMAINS/HOSTNAMES with TARGETS, removed all legacy/deprecation logic
README.md: Added pre-1.0 warning, updated env var table, removed old vars
Classification
Input
Result
example.com
domain
www.example.com
hostname
example.co.uk
domain
api.example.co.uk
hostname
co.uk
error (public suffix)
Test Results
All 12 tests pass. No new lint issues (only pre-existing gosec in notify.go). Build succeeds.
## Summary
Replaces `DNSWATCHER_DOMAINS` and `DNSWATCHER_HOSTNAMES` with a single `DNSWATCHER_TARGETS` env var. Names are automatically classified as apex domains or hostnames using the Public Suffix List (`golang.org/x/net/publicsuffix`). No backwards compatibility — old vars are removed entirely (pre-1.0).
## Changes
- **`internal/config/classify.go`**: `ClassifyDNSName()` and `ClassifyTargets()` using `publicsuffix.EffectiveTLDPlusOne()`
- **`internal/config/classify_test.go`**: 11 test cases
- **`internal/config/config.go`**: Replaced DOMAINS/HOSTNAMES with TARGETS, removed all legacy/deprecation logic
- **`README.md`**: Added pre-1.0 warning, updated env var table, removed old vars
## Classification
| Input | Result |
|-------|--------|
| `example.com` | domain |
| `www.example.com` | hostname |
| `example.co.uk` | domain |
| `api.example.co.uk` | hostname |
| `co.uk` | error (public suffix) |
## Test Results
All 12 tests pass. No new lint issues (only pre-existing gosec in notify.go). Build succeeds.
Closes #10
sneak
was assigned by clawbot2026-02-20 05:08:30 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Replaces
DNSWATCHER_DOMAINSandDNSWATCHER_HOSTNAMESwith a singleDNSWATCHER_TARGETSenv var. Names are automatically classified as apex domains or hostnames using the Public Suffix List (golang.org/x/net/publicsuffix). No backwards compatibility — old vars are removed entirely (pre-1.0).Changes
internal/config/classify.go:ClassifyDNSName()andClassifyTargets()usingpublicsuffix.EffectiveTLDPlusOne()internal/config/classify_test.go: 11 test casesinternal/config/config.go: Replaced DOMAINS/HOSTNAMES with TARGETS, removed all legacy/deprecation logicREADME.md: Added pre-1.0 warning, updated env var table, removed old varsClassification
example.comwww.example.comexample.co.ukapi.example.co.ukco.ukTest Results
All 12 tests pass. No new lint issues (only pre-existing gosec in notify.go). Build succeeds.
Closes #10
5916e32ff3to628bba22fe628bba22feto73e01c7664make check passes ✅