Skip to content
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

[scraper]: Add support for deducing resource name from file path #172

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

ulucinar
Copy link
Collaborator

@ulucinar ulucinar commented Mar 9, 2023

Description of your changes

This PR adds support for deducing resource name from the markdown file's path if the scraper cannot extract it from the markdown file. It also adds the optional --resource-prefix command-line option to the scraper so that the calling repo can specify the prefix to be used as a prefix for the name extracted from the markdown file path. For example, for the hashicorp/google, this prefix is google because the markdown files are named with this prefix concatenated by the resource's name, e.g., google_network_management_connectivity_test.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Tested via the upbound/provider-gcp here.
Also tested against the upbound/provider-{aws,azure}.

if scraper cannot extract it from the markdown file.

Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Copy link
Member

@sergenyalcin sergenyalcin left a comment

Choose a reason for hiding this comment

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

Thanks @ulucinar LGTM!

@ulucinar ulucinar merged commit acc1fd6 into crossplane:main Mar 9, 2023
@ulucinar ulucinar deleted the name-from-path branch March 9, 2023 20:06
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.

2 participants