refactor: route unauthenticated client through Factory

Description

  • docs: disallow mutable package-level globals
  • refactor: use Factory.UnauthenticatedClient in check-update and whatsnew
  • refactor: add UnauthenticatedClient to Factory

Route unauthenticated API client creation through cmdutils.Factory, drop mutable package-level clientCreator variables, and add a guardrail against mutable globals in review instructions.

Resolves #8640 (closed)

How has this been tested?

  • make lint passed with 0 issues.
  • go test -race passed for cmdutils, whatsnew, and update with t.Parallel().
  • Verified live glab check-update and glab whatsnew --latest against gitlab.com.

Screenshots:

image

Edited by Zishan Ahmad

Merge request reports

Loading
Loading