Skip to content

Conversation

@LeahMarieBush
Copy link
Contributor

@LeahMarieBush LeahMarieBush commented Dec 10, 2024

Description

🎟️ Asana task

This PR creates a PRODUCT_CONFIG object that can be used across the repo to access any product config information. This mainly gets used in the migration scripts but also is used across a few other scripts in the repo. I also added the productSlug attribute to contain the product name that the repo belongs to. For example, terraform-docs-agents content shows up in the terraform section of dev-portal so the productSlug for that section is 'terraform'.

Testing

  • All-docs-paths: go to /api/all-docs-paths and verify that the paths are working
  • content/[productSlug]/doc/[version]/[...docsPath]: go to example or other pages and verify that content gets returned as expected
  • add-version-to-internal-links: go to example and verify that links include the version (v0.15.x)
  • build-target-repos: check out this branch and run the command below. Verify that it works as expected with no errors
node ./scripts/migrate-content/migrate-content.mjs terraform 
  • clone-all-repos: check out this branch and run the command below. Verify that .content-source-repos directory is created and contains docs repos
node ./scripts/migrate-content/clone-all-repos.mjs 

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2024

Vercel Previews Deployed

Name Status Preview Updated (UTC)
Dev Portal ✅ Ready (Inspect) Visit Preview Dec 12, 2024, 3:46 PM
Unified Docs API ✅ Ready (Inspect) Visit Preview Dec 12, 2024, 3:31 PM

@LeahMarieBush LeahMarieBush marked this pull request as ready for review December 10, 2024 22:37
@LeahMarieBush LeahMarieBush requested a review from a team as a code owner December 10, 2024 22:37
@LeahMarieBush LeahMarieBush requested review from EnMod and removed request for a team December 10, 2024 22:37
@RubenSandwich RubenSandwich self-requested a review December 11, 2024 15:08
Copy link
Contributor

@EnMod EnMod left a comment

Choose a reason for hiding this comment

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

Deferring to @RubenSandwich for a final sign-off, but LGTM!

Copy link
Contributor

@RubenSandwich RubenSandwich left a comment

Choose a reason for hiding this comment

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

Overall looks good. Let's just add a key to repoConfig "unversionedDoc: boolean" or "versionedDoc: boolean" you choice, as I believe that will help clean up certain parts of our code.

If you feel that that work would be better in a PR, as this PR already contains a lot of changes, then I will approve this and we can make a new ticket for that work.

Copy link
Contributor

@RubenSandwich RubenSandwich left a comment

Choose a reason for hiding this comment

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

Looks great. 👍🏻

@LeahMarieBush LeahMarieBush merged commit e83035f into main Dec 12, 2024
3 checks passed
@LeahMarieBush LeahMarieBush deleted the leah/feat/add-product-config branch December 12, 2024 20:00
im2nguyen pushed a commit that referenced this pull request Mar 6, 2025
* WIP

* feat: add PRODUCT_CONFIG

* remove comment and add types to PRODUCT_CONFIG

* remove console log

* fix attribute name

* add attribute comment

* remove unnecessary comment

* add versionedDocs to product config
hashibot-web added a commit that referenced this pull request Apr 11, 2025
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.

3 participants