Stylelint is a mighty, modern linter that helps you avoid errors and enforce conventions in your styles. Inside each action we can find out what exactly went wrong. For example, here the action tells us that there are unused variables in the code:įor now, we only check the format of the js files. It is not very good. Attention should be paid not only to js files, as there are usually other file formats that developers pay less attention to. Let's fix this and add additional linters to protect our code. Now in each pull request to the branch we need we will see the result of the action. If all is well, the action will be passed:īut if we broke something the action will fail: ![]() ![]() To prohibit merging a pull request when linting fails, go to the repository settings and set the merge rules for the branch you want. To do this we need to check the Require status checks to pass before merging checkbox and select the checks we need. In our case, this is Linting (the name is taken from the action config). In the github interface, the runs will look like this: That's it, we took apart a small but useful example of the github action! It is forbidden to use a shell commands with custom actions. ![]() You can find many ready-made actions in the marketplace uses - specify the name of custom actions if we want to use it.name - needed to be displayed in the github interface.
0 Comments
Leave a Reply. |