-
Notifications
You must be signed in to change notification settings - Fork 981
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
ensure-alphabetize should add a commit with alphabetized data if needed #991
Comments
Some actions that may be useful, most stars first: |
@mlinksva What exactly would resolve this problem? Changing the entry itself would break the link, right? |
The tests seem to fail when new countries are added... |
The tests sometimes fail when new countries are added because extra spaces are present, probably when adding a new line the via the web editor which indents to the previous level. government.github.com/.github/workflows/ensure-alphabetize.yml Lines 28 to 31 in 95b66b0
The above sorts and overwrites the file, as a side effect without any extra spaces. It fails if diff has any output, whether from extra spaces or need to sort. The idea would be to commit the overwritten file if there is any diff, and push that commit, autocorrecting a file that differs from the canonical (including sorted) output rather than failing and requiring manual fixup. |
Hopefully just like this example https://github.com/marketplace/actions/add-commit#automated-linting |
Nearly working in #1011 (comment) |
The tests pass now in #1043. |
That would be nice.
It's easy to cause the test to fail if one forgets how
-
sorts in a word or even adds superfluous space characters.The text was updated successfully, but these errors were encountered: