test: Use t.Context() instead of context.Background() by alexandear · Pull Request #3750 · google/go-github
This PR replaces context.Background() with t.Context() in tests. T.Context has been available since Go 1.24.
Additionally, it enables the usetesting linter to automatically suggest using t.Context() in future PRs.
The PR also modifies the helper function createRandomTestRepository by adding a *testing.T parameter. This simplifies integration tests that rely on this function.