Add allowed-(guide|resource)-subcategories and allowed-(guide|resource)-subcategories-file arguments to validate#456
Merged
rainkwan merged 20 commits intohashicorp:mainfrom Mar 19, 2025
justinretzolk:main
Merged
Add allowed-(guide|resource)-subcategories and allowed-(guide|resource)-subcategories-file arguments to validate#456rainkwan merged 20 commits intohashicorp:mainfrom justinretzolk:main
allowed-(guide|resource)-subcategories and allowed-(guide|resource)-subcategories-file arguments to validate#456rainkwan merged 20 commits intohashicorp:mainfrom
justinretzolk:main
Conversation
Closed
Contributor
|
Hi @justinretzolk, Thank you for your contribution. Everything looks good to me, I would just say to update the changelog under |
Member
Author
|
Thanks @rainkwan! I got those changelog entries pushed (neat tool, by the way!) |
rainkwan
approved these changes
Mar 19, 2025
Contributor
rainkwan
left a comment
There was a problem hiding this comment.
Checks are passing and everything looks good, thank you again for the contribution.
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR adds options to the
validatecommand to check whether thesubcategorydefined in the YAML frontmatter is within a specified allowlist. This was inspired byYakDriver/tfproviderdocs, which is used by the AWS Provider and AzureRM provider to achieve this functionality.While working on this, I noticed a bug here that led to the incorrect detection of
guidesfiles vs.resource/data-sourcefiles (relErrwasnilwhether files were indocs/resourcesordocs/guides). A fix for that bug is included in this PR.