Posted on
Format repo - GitHub Action to format your code with comfort
What I built
I made aGitHub action that automatically formats thePython andJavaScript code after each commit and pushes it to the repository.
Category Submission:
DIY Deployments
App Link
App ishere.
Screenshots
Description
The action installsblack _ and _prettier and uses them to formatPython andJavaScript code. After usinggit commands, changes are pushed to the repository.
Link to Source Code
Code ishere.
Permissive License
Background (What made you decide to build this particular app? What inspired you?)
First, I wanted to make an action that would automatically push commits to GitLab and BitBucket, like a mirror. But there were difficulties with the API of these services. Then I decided to implement my old idea - an action that automatically formats the code. I tried to do it before with Docker and now with js, and it turned out to be much easier.
How I built it (How did you utilize GitHub Actions or GitHub Codespaces? Did you learn something new along the way? Pick up a new skill?)
I used the libraries fromactions/toolkit to create my action. It's more comfortable than when I did it with Docker. I looked at all the libraries, and most of all:actions/core,actions/exec andactions/github.
Additional Resources/Info
To use it, you need to enableworkflow read:write
in the settings.
Top comments(0)
For further actions, you may consider blocking this person and/orreporting abuse