-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add username flag in create-user command #6534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6534 +/- ##
==========================================
- Coverage 40.35% 40.34% -0.01%
==========================================
Files 405 405
Lines 54251 54251
==========================================
- Hits 21895 21890 -5
- Misses 29340 29345 +5
Partials 3016 3016
Continue to review full report at Codecov.
|
cmd/admin.go
Outdated
return errors.New("Cannot set both --name and --username flags") | ||
} | ||
if !c.IsSet("name") && !c.IsSet("username") { | ||
return errors.New("One of --name and --username flags must be set") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not
return errors.New("One of --name and --username flags must be set") | |
return errors.New("One of --name or --username flags must be set") |
docs/content/doc/usage/command-line.en-us.md should be updated as part of this PR as well to document the change (probably fine to just change name to username there) |
Hmm actually, since this is tagged 1.9.0 the docs should probably include mention of both options since they aren't versioned at all (I forget!). People downloading a current release wouldn't have access to this change. Maybe something like "As of gitea 1.9.0, use the --username flag instead" |
If I understand well, the doc on gitea.io comes from the master branch. Something like And for the example, keeping the --name flag and adding a comment |
Do you want me to squash commits to clean history before merging ? |
@ngourdon oh no. Don’t worry about that, we will do that. Thanks for PR :) |
My pleasure 😄 |
Ensure consistency of name/username flags between create-user and change-password commands
fix #6174