-
Notifications
You must be signed in to change notification settings - Fork 69
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
Implement migrate
sub-command
#314
Merged
Merged
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
3e86e3a
Add migrate subcommand
SBGoods 5168362
Change migrated file extensions to `.md.tmpl`
SBGoods 6cc8db5
Finish `migrate` subcommand implementation
SBGoods cc4b712
resolve merge dependencies
SBGoods 952eaff
Remove `-help` output check
SBGoods 9d76267
Add changelog entry
SBGoods a67b696
Update changelog entry
SBGoods fd96f85
fix changelog entry
SBGoods 5240d47
Remove `--old-website-source-dir` flag and support migrating `docs/` …
SBGoods ae83428
Support converting files with any file extension to `.md.tmpl`
SBGoods 32170f3
Refactor `Migrate()` method
SBGoods fcc2b0b
Skip `layout` front matter
SBGoods c608fd9
Fix linting errors
SBGoods 14d65a6
Merge remote-tracking branch 'origin/main' into SBGoods/migrate-command
SBGoods ecbdd11
Add comment to generated templates explaining functionality
SBGoods 02f970e
Remove `website/` directory at the end of migration
SBGoods d687f35
Fix `ineffassign` lint error
SBGoods 84a9af4
Update README.md
SBGoods b9d1018
Resolve comments from code review
SBGoods File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: FEATURES | ||
body: 'migrate: Added new `migrate` subcommand that migrates existing provider docs using the | ||
rendered website source directories (`website/docs/` or `/docs/`) to a `terraform-plugin-docs`-supported | ||
templates directory.' | ||
time: 2023-12-20T14:12:44.820323-05:00 | ||
custom: | ||
Issue: "314" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
At first glance, it wasn't immediately obvious what the input directories were vs. the output directory without reading the help text. Would it be confusing/misleading to name the
--templates-dir
as--output-dir
?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.
I think the name should be the same to keep it in parity with the
generate
command with the same flag. If we changed the flag to something like--output-dir
it might not be obvious to the user that they would need to specifygenerate --template-dir
to that directory after migration.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.
Ah okay that's helpful context! Makes sense to me 👍🏻