-
Notifications
You must be signed in to change notification settings - Fork 80
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
Readme update action #187
Readme update action #187
Conversation
scripts/update-readme.ts
Outdated
const config = JSON.parse(configData); | ||
|
||
// If tech exists in mapping, use mapped name, otherwise use "Other" | ||
const tech = techs[config.tech] || techs["other"]; |
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.
do you think it would make sense to default to the lowercase version of the tech if it doesnt existi n the mapping?
say someone adds "angular" as the tech, could just list out "angular" or a title cased version
another idea is to throw an error if the tech doesn't exist to force it to create a match. on top of that, you can add a validation on Pull Request to make sure the tech exists in the list, if it doesnt, the person making the PR needs to add it to the list
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.
Yeah this makes sense, added these features in the latest commit
nice one, i assume its tested, hard for me to test i would assume. do you think this should run on PR or commits to |
… in the list, remove "Other" tech
@colbyfayock I think it's better to comment on the PR as the everything will be merged along with the PR. Here's how the process looks like. |
The error details section is now changed to "Missing tech(s)" and it'll include names of techs that aren't added in |
awesome thanks @max-programming we'll see how it goes 🙌 |
@colbyfayock One thing I forgot to mention is that you have to enable this option in the repository settings |
already done! thanks |
@max-programming This may not be working properly during the checkout portion. Check out this workflow error. |
@bradgarropy I'll fix this up and let you know ✌️ |
Fixes at #193 |
This PR adds a github action that runs a script to update examples in the
README.md
file based on theconfig.json
andtechs.json
filesWhat has changed:
techs.json
file containing key-value pairs of all techs in READMEconfig.json
file in each example