-
Notifications
You must be signed in to change notification settings - Fork 359
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
Add script for formatting/sorting YAML files #1237
base: main
Are you sure you want to change the base?
Conversation
It looks like the dry run passed with the |
Is this intended to supersede #1129 ? |
Oops, I hadn't realized that there was already another PR open! Feel free to do whatever you'd like with this PR. I'll clean up the merge conflict in case anyone plans to merge this |
19c3de2
to
2f75845
Compare
``` Formatting hackclub.com.yaml hackclub.com.yaml | 512 +++++++++++++++++++++++++------------------------------ 1 file changed, 242 insertions(+), 270 deletions(-) Formatting hackclub.org.yaml hackclub.org.yaml | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) Formatting hackclub.io.yaml hackclub.io.yaml | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) Formatting hackedu.us.yaml hackedu.us.yaml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) Formatting hack.af.yaml hack.af.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Formatting bulckcah.com.yaml bulckcah.com.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Formatting dino.icu.yaml dino.icu.yaml | 378 +++++++++++++++++++++++------------------------------------ 1 file changed, 151 insertions(+), 227 deletions(-) Formatting dinosaurbbq.org.yaml dinosaurbbq.org.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Formatting hack.club.yaml Formatting hackclub.app.yaml hackclub.app.yaml | 64 +++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) Formatting hackfoundation.org.yaml hackfoundation.org.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Formatting wackclub.com.yaml wackclub.com.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Formatting bank.engineering.yaml bank.engineering.yaml | 102 +++++++++++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 51 deletions(-) Formatting scrap.dev.yaml scrap.dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Formatting scrapbook.dev.yaml scrapbook.dev.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Formatting cpu.land.yaml cpu.land.yaml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) Formatting aisafety.dance.yaml aisafety.dance.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) Formatting nonprofit.new.yaml ```
2f75845
to
830716e
Compare
I think the one thing this PR is missing is a check script that can be run with CI to make sure the format doesn't break through future PRs. If that happens I think this would be great :) |
I already had that in my PR, but if there's a reason it wasn't merged I'm happy to make changes or turn this over to @garyhtou. |
This PR adds a
bin/format
script that usesbash
andyq
to format & sort the YAML files.It first checks the zones in
config/production.yaml
to see which files contain DNS declarations. Then, it usesyq
to sort the keys and pretty print.The script also provides a small diffstat when ran.