fix(repo): correct default visibility in repo create help
Description
The help for glab repo create --internal says the flag is the default:
--internal Make project internal: visible to any authenticated user. Default.That is not what happens. runCreateProject starts with an empty visibility and only sets
opts.Visibility when --internal, --private, or --public is passed. With no flag, glab sends
no visibility field, and GitLab gives the new project the instance's default project visibility
(Gitlab::CurrentSettings.default_project_visibility, see Project#initialize in
app/models/project.rb). On GitLab.com, and on most instances, that is private, not internal.
So a user who reads the help and leaves out the flag, expecting an internal project, gets a different visibility.
This MR:
- Removes "Default." from the
--internalflag help. - Adds one sentence to the command description: if you don't pass
--private,--internal, or--public, the project uses the default project visibility of your GitLab instance. - Regenerates
docs/source/repo/create.mdwithmake gen-docs.
No behaviour change.
Related Issues
None found. I searched open and closed issues and merge requests for "repo create visibility", "project create visibility", "default visibility", "internal visibility", and "visibility".
How has this been tested?
go run ./cmd/gen-docs/docs.go(same asmake gen-docs): onlydocs/source/repo/create.mdchanged.go build ./...go vet ./internal/commands/project/create/go test ./internal/commands/project/create/ ./cmd/gen-docs/pass.- Read the code path in
internal/commands/project/create/project_create.go:opts.Visibilityis only set whenvisibility != "".
This contribution was prepared with the help of an AI assistant. I reviewed the changes and take responsibility for them.