-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Improve validation and automation for chain JSON files #6394
base: master
Are you sure you want to change the base?
Conversation
Add validation checks and update workflows for chain JSON files. * **tools/schemaCheck.js**: - Add checks to ensure `shortName` and `name` fields are unique across all chain JSON files. - Add checks to ensure icons referenced in chain JSON files exist in the `_data/icons` directory and follow the correct format. * **.github/workflows/validate_json.yml**: - Add a step to run the `tools/schemaCheck.js` script to validate the JSON schema of the chain files. * **.github/workflows/stale.yml**: - Configure the workflow to manage stale issues and PRs, ensuring unresolved issues are closed after a certain period of inactivity. * **README.md**: - Add a section to explain the automated validation process using GitHub Actions workflows. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/ethereum-lists/chains?shareId=XXXX-XXXX-XXXX-XXXX).
You successfully submitted a PR! Due to the amount of PRs coming in: we will only look at PRs that the CI is happy with. We can also not hold your hand getting the CI green - just look how others that where merged did it and RTFM. So as long as there is any CI check that reports an error - no human will look at this. You might be able to ask for some support after supporting the project - e.g. by sending funds to lists.eth. When you fixed things after a requested change - then you also need to (re-)request a review. |
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.
The uniqueness of (short)names is already checked in the Kotlin side - we should not duplicate it (and also have different behavior as the names are normalized)
To format the JSON files according to the style defined in `.prettierrc.json`, use the `prettier` tool. Run the following command to format all existing JSON files: | ||
|
||
``` | ||
npx prettier --write _data/*/*.json | ||
``` |
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.
this is already stated in another part of the README - do not think it should be repeated. Let's keep things DRY
Add validation checks and update workflows for chain JSON files.
tools/schemaCheck.js:
shortName
andname
fields are unique across all chain JSON files._data/icons
directory and follow the correct format..github/workflows/validate_json.yml:
tools/schemaCheck.js
script to validate the JSON schema of the chain files..github/workflows/stale.yml:
README.md:
For more details, open the Copilot Workspace session.