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

10%: Enforce component health for new components #10750

Draft
wants to merge 7 commits into
base: latest
Choose a base branch
from

Conversation

karinathomasbbc
Copy link
Contributor

@karinathomasbbc karinathomasbbc commented Mar 31, 2023

Overall changes

Adding a script to ensure that component health metadata is added for all new components going forward.

The script does the following:

  • gets a list of all components within the src/app directory which have an index.stories file
  • gets a list of all components within the src/app directory which have a metadata.json file
  • has an "allow list" for all of the existing components which have a stories file but don't have a metadata.json file
  • if a component does not have a metadata.json file, but the path to that component is not in the allow list, then the script will fail

The component health check script is hooked into the PR checks, so if we add a new component, and do not add a metadata.json file, then the Misc Checks will fail.

In order to get the build to pass, the preferred option is to add a metadata.json file for the component

Code changes

  • Add a new script - scripts/componentHealthCheck
  • Add a new yarn script as a shortcut to run the script: yarn test:component-health
  • Invoke the component health check from the misc checks github action

Testing

Helpful Links

Coding Standards

Repository use guidelines

@karinathomasbbc karinathomasbbc self-assigned this Mar 31, 2023
@karinathomasbbc karinathomasbbc changed the title 10% Enforce component health new components 10%: Enforce component health for new components Mar 31, 2023
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.

1 participant