fix(deps): update module github.com/google/go-github/v72 to v81 by renovate-sh-app[bot] · Pull Request #574 · grafana/github-datasource
| datasource | package | from | to | | ---------- | ------------------------------- | ------- | ------- | | go | github.com/google/go-github/v72 | v72.0.0 | v81.0.0 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
itsmylife
deleted the
renovate/github.com-google-go-github-v72-81.x
branch
itsmylife added a commit that referenced this pull request
Feb 12, 2026…ng (#629) ## Summary Fixes a nil pointer dereference panic caused by the interaction between go-github v81's `ErrorResponse.Is` and the SDK's `guessErrorStatus` function. go-github v76 (bumped from v72 to v81 in #574) changed `ErrorResponse.Is` from a simple type assertion to calling `errors.As(target, &v)` on the target. See PR: google/go-github#3739 The SDK's `guessErrorStatus` (`backend/status.go:112`) passes typed nil targets (`(*url.Error)(nil)`) to `errors.Is`. When `errors.Is` walks the error chain and reaches `*github.ErrorResponse`, the v81 `ErrorResponse.Is` calls `errors.As` on that typed nil, which tries to call `Unwrap()` on the nil receiver — causing a nil pointer dereference panic. The fix adds `sanitizeGitHubError` which converts `*github.ErrorResponse` to a plain error at the `addErrorSourceToError` boundary, preserving the error message while stripping the problematic `Is` method from the error chain. ## Manual reproduction steps 1. Run Grafana with the github-datasource plugin (v2.5.0) 2. Configure the GitHub datasource with a valid personal access token 3. Open Explore (or create a panel) and select the GitHub datasource 4. Set query type to **Workflows** (or **Code Scanning**) 5. Set **Owner** to `grafana`, **Repository** to `this-repo-does-not-exist` 6. Run the query 7. Observe the panic in Grafana server logs: `panic triggered error="runtime error: invalid memory address or nil pointer dereference"` With this fix applied, the query returns a proper error response instead of panicking. Fixes grafana/oss-big-tent-squad#183
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters