docs(whatsnew): document show_whats_new config and env var
Summary
The whatsnew banner introduced in !3335 (merged) can already be disabled via
the show_whats_new config key or the GLAB_SHOW_WHATS_NEW env var,
but neither was surfaced in the two doc pages a user would actually
look at to find an opt-out:
- https://docs.gitlab.com/cli/#environment-variables — generated from
the
help:environmentannotation ininternal/commands/root.go. - https://docs.gitlab.com/cli/config/#synopsis — generated from the
Longdescription ininternal/commands/config/config.go.
Reported in #8374 by a user who was trying to suppress the banner in
scripted glab repo clone output.
What's in here
- Add
GLAB_SHOW_WHATS_NEWto thehelp:environmentannotation ininternal/commands/root.go. - Add
show_whats_newto theCurrent respected settingsbullet list ininternal/commands/config/config.go. - Regenerate
docs/source/_index.mdanddocs/source/config/_index.mdviamake gen-docs.
Follow-up
There is a broader gap here: internal/config/schema.go is the
declared source of truth for every config key and env var glab knows
about, but the two cobra strings above are hand-maintained and have
drifted from it (several keys/env vars in the schema are not
documented in either place). A follow-up issue will track refactoring
those strings to be generated from KeySchema so this kind of miss
can't happen again.
Test plan
-
glab helpshowsGLAB_SHOW_WHATS_NEWin the ENVIRONMENT VARIABLES block. -
glab config --helpshows theshow_whats_newbullet. -
docs/source/_index.mdanddocs/source/config/_index.mdregenerate cleanly undermake gen-docs(no further diff).