Skip to content

Conversation

@majiayu000
Copy link

Summary

This PR fixes #859

Changes

  • Added GitHub workflow to automatically generate CLI reference documentation when changes are made to cmd/notation
  • Created cmd/notation/doc.go with gendoc build tag for documentation generation using cobra/doc
  • Refactored cmd/notation/main.go to use !gendoc build tag and export NewRootCommand() function for reuse
  • Created cmd/notation/root.go containing the NewRootCommand() function that initializes the root cobra command
  • Added Makefile target cli-docs for manual CLI documentation generation
  • Updated .gitignore to exclude generated docs/cli/ directory
  • Updated dependencies to include github.com/spf13/cobra/doc for markdown generation

The workflow automatically creates a pull request when CLI commands change, similar to the minder project workflow referenced in the issue.

Testing

  • All unit tests pass
  • Build succeeds
  • Manual CLI docs generation works with make cli-docs
  • Generated markdown files are properly formatted

Generated with Claude Code

- Add GitHub workflow to auto-generate CLI docs when cmd/notation changes
- Create doc.go with build tag for documentation generation
- Refactor main.go to export NewRootCommand function
- Add Makefile target 'cli-docs' for manual doc generation
- Add docs/cli/ to .gitignore

Implements auto-generation of CLI reference documentation similar to the
minder project workflow. Documentation is generated using cobra/doc and
creates markdown files for all CLI commands.

Fixes notaryproject#859

Signed-off-by: majiayu000 <1835304752@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support auto-generated CLI reference doc in the notation repo

1 participant