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 adds validations to the actual JSON structure on each pull request, ensuring that we always have a consistent data structure that matches the given schema.
@utaninja @zelixir25 With the new system I've set up, you are a "code owner" for the drugs.json and combos.json files. If any pull requests modify either of those files, one of you will need to approve them before we can merge. This PR does have a small change to drugs.json that I found thanks to this new validation process, and I can bypass the approvals, but let's get into the habit of doing things the right way.
Both of you can ignore changes outside of those files unless you want to learn the FUN and FASCINATING world of JSON file management!!!!
codeowners - Defines who will need to approve the pull request when each of those files are changed. We can add more people eventually.
validate.yml - A github action that will run on every pull request. It basically runs the combosToDrugs.ts script and as long as no changes need to be made (alphabetization, schema validations, updating drugs.json) it will allow the pull request. This helps a ton because otherwise i would need to download the pull request and run the script myself.
settings.json - Added your usernames to the spell check definitions
package.json and package-lock.json - Defines the modules we use to run the scripts, used in every nodejs project
combo_definitions-schema.json, combos-schema.json and drugs-schema.json - These files determine the structure of the corresponding JSON files. They define which properties are valid so that it's very hard to make mistakes when modifying the json
Let me know if there are any questions!