Fiz Um Scriptzinho Pra Me Ajudar A Escrever Commits Com Emojis

Então, acho que vocês já devem conhecer o Conventional Commits, é o tipo de coisa que você não da muita bola no começo, mas te ajuda a ser melhor descritivo nas mensagens dos commits.

Em vista disso, criaram uma ferramenta usando com Javascript que te ajuda escrever esses commits bonithinhos com mais facilidade, o cz-cli. Pro pessoal mais fresco, como eu, também têm o cz-emoji que troca o tipo das mensagens por emojis -- por exemplo, escrever ":sparkles: Criada a rota que retorna a lista de usuários em HTML" ao invés de "feat: Criada a rota que retorna a lista de usuários em HTML"

E eu gosto de emojis nos meus commits, mas eu não gosto de depender do Node pra isso, seilá... Não me parece muito certo. Então eu decidi criar o meu próprio script que faça isso. Talvez essa parada também seja útil pra vocês também. Pra mais informações detalhadas, da uma conferida no README do projeto.

Vô tentar mostrar o log de um projeto recente aqui com git log --format="%s" | sed 's/^\(.*\)$/+ *\1*/' | xclip:

  • :construction: wip (mock): now creating the base connection at main and other stuff in a different function
  • :construction: wip (mock): now the insert_new_user function uses a connection object instead of arguments
  • :card_file_box: db: added a primary key to the relationship talbe, now it should have unique pairs
  • :recycle: refactoring (mock): the insert_dummy.py script now warns the user if the username already was added
  • :recycle: refactoring: using private controller methods inside the router package
  • :recycle: refactoring: moving the InitRouter function to the router package too
  • :recycle: refactoring: moved the router controller functions to its own package
  • :recycle: refactoring: created a separated function to search for the user then return an HTML string
  • :sparkles: feature: added a .env.example file to help contributors
  • :whale: docker (fix): using the 'db' hostname instead of the network name...
  • :ambulance: quickfix (docker): copying all files to the app container, the other way the build failed
  • :bug: fix: now the code can connect to the database, the search route is working now
  • :clipboard: impl!: now expecting the environment variables present in the .env file
  • :sparkles: feature!: created a function to get environment variables but returns an error if empty
  • :recycle: refactoring!: now importing the environment variables from the .env file
  • :heavy_plus_sign: dep-add!: github.com/joho/godotenv
  • :sparkles: feature!: now the /search/user is working just fine with the database connection
  • :heavy_plus_sign: dep-add: added the postgres dependencies to this project
  • :sparkles: feature: created a database module that connect and saves it in a global connection var
  • :iphone: iphone: created the /search/user route that only logs the query, db connection not done
  • :sparkles: feature (html): added the search for, with htxm get request already setted up
  • :sparkles: feature: now printing some logging messages to help duck debugging
  • :heavy_plus_sign: dep-add: charmbracelet/log
  • :recycle: refactoring: created a router function to handle the routes, now the main is free for setup
  • :sparkles: feature: now the code checks for the PORT varialbe to start the server
  • :recycle: refactoring: moved the TemplatesRenderer to its own local package
  • :lipstick: ui: added the Index page and the base partial that it uses, that's my structure
  • :sparkles: feature!: added a TemplateRenderer struct to make the front-end stuff easier to handle
  • :whale: docker: using custom profiles in docker-compose.yml, easier to choose which container run
  • :whale: docker: now using the :8080 port inside containers, :8000 is used for local development
  • :art: style (mock): updated the import order on the insert_dummy.py script
  • :sparkles: feature (mock): created the insert_new_user function, it will help my development in the future
  • :heavy_plus_sign: dep-add (mock): added psycopg2 library to connect to the postgres db server via the python script
  • :heavy_plus_sign: dep-add (mock): added a requirements.txt file, because the bcrypt lib is not builtin to python...
  • :whale: docker (fix): not ignoring the migrate.sql file, the db.Dockerfile depends on it
  • :construction: wip (mock): now it also accepts command line options arguments to connect to a db server
  • :construction: wip (mock): now the insert_dummy.py script can load the .env variables too
  • :whale: docker (.dockerignore): now the images will copy only the necessary files to build the containers
  • :whale: docker: added project's custom image to the docker-cmopose file, it rebuilds on changes
  • :whale: docker: created a Dockerfile to build the project, it expects the .env PORT variable
  • :see_no_evil: see-no-evil: removed the comment lines and added possible build file names to be ignored
  • :sparkles: feature: created simple http server to test the behavior of this docker setup
  • :whale: docker: removed the profile lines, everything is running on a dev environment after all
  • :whale: docker (db): updated the docker-compose.yml file to accept this new db.Dockerfile to build
  • :whale: docker (db): now the db.Dockerfile will only copy the migrate.sql file to the container
  • :alembic: experiment (db): trying to use a migrate.sql file to create the db table set
  • :truck: mv (db): moved the postgres docker file to the root of the project as a .Dockerfile file
  • :whale: docker (db): created the minimal setup to build a postgres development enviroment with pgadmin
  • :construction: wip (mock): started the creation of a small python script to insert dummy users to the db
  • :tada: init: license, readme & hello world in go

Deixando aqui também a dica pra quem usa vscode. Existe essa extensão que integra muito bem com a UI do vsccode. https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits

Achei muito bacana a dica da extensão, [rafaeljustino](https://www.tabnews.com.br/rafaeljustino). Já usava uma outra, mas essa achei mais interessante.