-
Notifications
You must be signed in to change notification settings - Fork 253
Updated Wiki Format #3311
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
base: main
Are you sure you want to change the base?
Updated Wiki Format #3311
Conversation
…e.g. table format for cli options.
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.
Pull request overview
This PR adds a new wiki format option to the azcopy doc command, enabling automatic generation of GitHub Wiki-style documentation with improved readability through structured tables for CLI switches and flags.
Key Changes:
- Introduced
--format wikiflag to generate GitHub Wiki-compatible markdown documentation - Implemented table-based format for flags with columns for name, type, default value, and description
- Updated CI workflow to use the new wiki format for automated documentation updates
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cmd/docWiki.go | New file implementing WikiGenerator with command and flag info extraction, markdown table generation, and template-based rendering |
| cmd/doc.go | Added format flag with "wiki" and "default" options; integrated WikiGenerator for wiki format |
| .github/workflows/update-wiki-docs.yml | Updated to use --format wiki flag in documentation generation step |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| filename := filepath.Join(g.OutputDir, commandToWikiFilename(cmd)+".md") | ||
| return os.WriteFile(filename, buf.Bytes(), 0644) |
Copilot
AI
Dec 2, 2025
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.
File permissions 0644 allow world-readable access. Consider using 0600 or 0640 to restrict read access to owner/group only, especially since these files may be written to arbitrary locations specified by user input.
| return os.WriteFile(filename, buf.Bytes(), 0644) | |
| return os.WriteFile(filename, buf.Bytes(), 0600) |
Co-authored-by: Copilot <[email protected]>
Description
New document format for easier readability by creating a table for all CLI switches.
Added the --format wiki option to the doc command to enable automatic wiki generation.
Preview: https://github.com/derdanu/azure-storage-azcopy/wiki/azcopy
Type of Change
Markdown formatter for Github Wiki.
How Has This Been Tested?
./azcopy doc --format wiki
INFO: GitHub Wiki documentation generated in: ./doc