Skip to content
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

Improve CLI code and descriptions #28482

Merged
merged 3 commits into from Dec 15, 2023
Merged

Improve CLI code and descriptions #28482

merged 3 commits into from Dec 15, 2023

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Dec 15, 2023

image

@wxiaoguang wxiaoguang added this to the 1.22.0 milestone Dec 15, 2023
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 15, 2023
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 15, 2023
@github-actions github-actions bot added modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin modifies/docs labels Dec 15, 2023
cmd/main.go Outdated
app.Usage = "A painless self-hosted Git service"
app.Description = `By default, Gitea will start serving using the web-server with no argument, which can alternatively be run by running the subcommand "web".`
app.Description = `Gitea program contains "web" and other subcommands. If no subcommand is given, it starts the web server by default. Use "web" subcommand for more web server arguments, user other subcommands for other features.`
Copy link
Member

@delvh delvh Dec 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
app.Description = `Gitea program contains "web" and other subcommands. If no subcommand is given, it starts the web server by default. Use "web" subcommand for more web server arguments, user other subcommands for other features.`
app.Description = `The gitea binary contains multiple subcommands, among them "web" . If no subcommand is given, the web server is started. Use the "web" subcommand to configure how the web server is started, or another subcommand for other purposes.`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a fan of using "the" everywhere.

See the screenshot and old sentences, we never say "the Gitea web server", "Dump the Gitea files", "output the CLI document".

When to Use 'A,' 'An,' or 'The'

https://gallaudet.edu/student-success/tutorial-center/english-center/grammar-and-vocabulary/definite-and-indefinite-articles/when-to-use-a-an-or-the/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason that I think we should put "web" subcommand before others: it is the default one and is the only one most users really need.

I am not a native English speaks but among them "web" reads strange to me.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 15, 2023
@wxiaoguang wxiaoguang changed the title Improve CLI code Improve CLI code and descriptions Dec 15, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 15, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Dec 15, 2023
@lunny lunny enabled auto-merge (squash) December 15, 2023 15:15
@lunny lunny merged commit 047c69b into go-gitea:main Dec 15, 2023
25 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Dec 15, 2023
@wxiaoguang wxiaoguang deleted the fix-cli branch December 15, 2023 18:41
zjjhot added a commit to zjjhot/gitea that referenced this pull request Dec 16, 2023
* upstream/main:
  Update docs for DISABLE_QUERY_AUTH_TOKEN (go-gitea#28485)
  Improve CLI code and descriptions (go-gitea#28482)
  Remove unnecessary forgot password link in delete user section (go-gitea#28355)
fuxiaohei pushed a commit to fuxiaohei/gitea that referenced this pull request Jan 17, 2024
* Close go-gitea#28444 
* Actually, it doesn't need to use that trick because it looks like it
is not necessary, no user really needs it
* Remove the hidden (legacy) "doctor" subcommand and update documents
* Fix "actions" usage


![image](https://github.com/go-gitea/gitea/assets/2114189/3c2b34a7-4f92-4a6c-96fd-9505e413d4ec)
silverwind pushed a commit to silverwind/gitea that referenced this pull request Feb 20, 2024
* Close go-gitea#28444 
* Actually, it doesn't need to use that trick because it looks like it
is not necessary, no user really needs it
* Remove the hidden (legacy) "doctor" subcommand and update documents
* Fix "actions" usage


![image](https://github.com/go-gitea/gitea/assets/2114189/3c2b34a7-4f92-4a6c-96fd-9505e413d4ec)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin modifies/docs size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cli.HelpFlag = nil can be used now when update urfave/cli to v2.26.0
5 participants