Repository navigation
Commit b8497f3
authored
feat(deps): upgrade go-github to v89 (#2395)
## What
- Upgrade the direct `go-github` dependency from `v72` to `v89` (latest major) in the in-repo `github://` source driver (`internal/migrate/source/github`), and update the package doc reference. Vendor is regenerated through the repo dep flow (vendor is gitignored; CI re-vendors via `make dep`).
- Adapt to v89's redesigned client construction: `NewClient` now takes functional options and returns an error, and `WithAuthToken` is a package-level option rather than a `*Client` method. The driver builds an options slice and returns the constructor error. The `github://[user:token@]owner/repo[/path][#ref]` URL contract and runtime behavior are unchanged.
- Non-goal: this does not drop `golang.org/x/oauth2` (the driver never used it) and makes no functional or URL changes — it is a version bump plus the minimal API adaptation.
## Why
- Keep the direct `go-github` dependency current. `v72` was a conservative pick when the in-repo driver replaced the upstream golang-migrate GitHub driver; nothing forced it over the latest major. Moving to `v89` now reduces future major-version churn and aligns the service with the version we intend to propose upstream to `golang-migrate/migrate` (golang-migrate/migrate#1410).
- Security-neutral by design: both `v72` and `v89` are free of `golang.org/x/crypto/openpgp`, so this does not change the GO-2026-5932 outcome — it is maintenance, not the fix. The openpgp finding stays cleared (verified below).
## Testing
- `make lint` - passed (Go: 0 issues; Ruby: 27 files, no offenses)
- `make sec` - passed (exit 0). govulncheck: code affected by 0 vulnerabilities; GO-2026-5932 remains only an uncalled module-level note on `golang.org/x/crypto`, and `go mod why golang.org/x/crypto/openpgp` reports the package is not needed. Trivy: 0 vulnerabilities for `go.mod` and `test/Gemfile.lock`.
- `go build -mod vendor ./...` - passed; `go vet` - passed; `go mod verify` - all modules verified.
- Validation gap: the authenticated `github://` path (`WithAuthToken`) is not exercised locally or by CI. The feature fixture is a public repository, so only the unauthenticated path runs end-to-end. The auth change is a mechanical swap to go-github's documented v89 option, but it has no runtime proof in this repo.
- `make features` - not run locally (needs Postgres); CI exercises the `github://` scenarios end-to-end for the unauthenticated path.
AI-assisted-by: [Claude Code](https://claude.com/claude-code)1 parent c9f029f commit b8497f3
4 files changed
Lines changed: 16 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
392 | 391 | | |
393 | 392 | | |
394 | 393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
| |||
0 commit comments