Skip to content

doc: update command-line.en-us.md to match CLI provided by gitea 1.12.4 #12865

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

Closed
wants to merge 3 commits into from
Closed

doc: update command-line.en-us.md to match CLI provided by gitea 1.12.4 #12865

wants to merge 3 commits into from

Conversation

nodiscc
Copy link
Contributor

@nodiscc nodiscc commented Sep 15, 2020

ref. #2436

@zeripath zeripath added the type/docs This PR mainly updates/creates documentation label Sep 15, 2020
@codecov-commenter
Copy link

Codecov Report

Merging #12865 into master will decrease coverage by 0.04%.
The diff coverage is 65.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12865      +/-   ##
==========================================
- Coverage   43.17%   43.13%   -0.05%     
==========================================
  Files         654      654              
  Lines       72218    72201      -17     
==========================================
- Hits        31182    31144      -38     
- Misses      35985    36001      +16     
- Partials     5051     5056       +5     
Impacted Files Coverage Δ
modules/migrations/gitlab.go 1.04% <0.00%> (-0.01%) ⬇️
routers/user/notification.go 40.17% <0.00%> (-0.37%) ⬇️
modules/repository/repo.go 43.31% <60.00%> (+0.73%) ⬆️
services/pull/pull.go 40.78% <78.57%> (-0.79%) ⬇️
modules/migrations/gitea.go 6.87% <100.00%> (+0.17%) ⬆️
modules/migrations/github.go 81.28% <100.00%> (+0.15%) ⬆️
modules/util/timer.go 42.85% <0.00%> (-42.86%) ⬇️
modules/indexer/stats/queue.go 52.94% <0.00%> (-23.53%) ⬇️
modules/indexer/stats/db.go 43.47% <0.00%> (-17.40%) ⬇️
modules/queue/unique_queue_channel.go 58.06% <0.00%> (-6.46%) ⬇️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81ed47c...7377859. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 15, 2020
Copy link
Contributor

@bagasme bagasme left a comment

Choose a reason for hiding this comment

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

ack

@zeripath
Copy link
Contributor

I actually think this might be more confusing than just keeping the documentation up-to-date.

For example, the way this document is structured is that it looks like the gitea doctor command only does recreate-tables - however the reality is that gitea doctor recreate-tables is just a specific subcommand.

gitea doctor runs various checks, most of which can be viewed through --list and run individually with --run with autofixing by --fix. gitea doctor recreate-tables is a different thing - it's not a check.

Now, you could argue that gitea doctor should gain another subcommand checks but this documentation elides that subtly and makes it worse.

@6543
Copy link
Member

6543 commented Sep 21, 2020

@nodiscc it would be nice if you just update outdated parts :)

@nodiscc
Copy link
Contributor Author

nodiscc commented Sep 21, 2020

keeping the documentation up-to-date

I think the best way to keep up to date is to use the actual help text the program outputs, don't you think?

the gitea doctor command only does recreate-tables - however the reality is that gitea doctor recreate-tables is just a specific subcommand.

I don't think recreate-table still exists in the current version. I don't see any mention of recreate-table when I run gitea doctor --list. I think I just copied it from the previous version of the doc without checking. So that part was outdated too :) I will update accordingly.

if you just update outdated parts

As I said most of this is outdated, and a maintenance burden, it's so much easier to copy-paste the output of --help since the program outputs a nice help text. Might as well update the whole page and get it right

I'll update this ASAP

@jolheiser
Copy link
Member

Something to note, the CLI library we use also supports a ToMarkdown func that might be useful.

See sip's docs.go and the result.

@nodiscc
Copy link
Contributor Author

nodiscc commented Nov 3, 2020

Sorry for the lag, I have updated my patch. You can view the resulting file here

I think the best way to keep up to date is to use the actual help text the program outputs, don't you think?

Something to note, the CLI library we use also supports a ToMarkdown func that might be useful.

That would indeed be the best solution. I tried, and failed (several times, think I'm not ready for golang yet). If you can send a patch implementing this I would gladly have a look. In the meantime I think this PR makes it better than the current version

@nodiscc
Copy link
Contributor Author

nodiscc commented Nov 3, 2020

Merge conflict, I will update the patch for the command-line of v1.12.5

@nodiscc
Copy link
Contributor Author

nodiscc commented Nov 11, 2020

Updated and rebased on master

@nodiscc
Copy link
Contributor Author

nodiscc commented Dec 17, 2020

@jolheiser @zeripath @6543 @bagasme ping, does this look ok to merge?

Result can be seen here

@techknowlogick
Copy link
Member

@nodiscc
Could you remove:

DEFAULT CONFIGURATION:
     CustomPath:  /usr/local/bin/custom
     CustomConf:  /usr/local/bin/custom/conf/app.ini
     AppPath:     /usr/local/bin/gitea
     AppWorkPath: /usr/local/bin

from the two outputs that have it? As these are likely not the defaults for many (and even if they were) some support requests may come not understanding that the their paths may be different.

Otherwise, this LGTM

@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 17, 2020
@lunny
Copy link
Member

lunny commented Dec 18, 2020

Please resolve the conflict files.

@nodiscc nodiscc closed this Jun 26, 2021
@nodiscc nodiscc deleted the update-cli-doc branch June 26, 2021 13:22
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants