Add workflow file to check alphabetical sort order of list items #1307
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.
Hi,
I was working on a GitHub action that checks if the list items in a markdown file are alphabetically sorted. The idea is that every time a pull request is created with someone contributing an item to the list, a workflow will get automatically triggered which will check the markdown file in the source branch, and if it's alphabetically sorted, the action will pass. If it's not alphabetically sorted, then the action will fail and should prevent the branch from being merged. The action's console output will let the user know what are the unsorted list items from the markdown file.
I thought this repository might find this useful given the ever-growing list of amazing developer portfolios.
Summary of changes
How to implement it?
Add branch protection rule
in the repository settings.master
as the name of the branch to protect.Require status checks to pass before merging
check box. And then from the search field, type the workflow job name as pictured below, and then select it.How will it look like in action?
Have a look at ClydeDz#3 to see this in action.