Added aicommit.clj script to migrate to babashka clojure.

This commit is contained in:
ilguappo 2024-08-10 06:26:06 -07:00
parent 7476e27e01
commit abd32275ba
Signed by: ilguappo
GPG Key ID: 98486F29C8969FD0

18
aicommit.clj Normal file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bb
(require '[babashka.curl :as curl]
'[babashka.process :as p])
(def url "https://speedtest-ams2.digtalocean.com/")
(def system-msg "
You are an expert programmer that values clear, unambiguous communication and are specialized in generating concise and informative git commit messages.
Your task is to generate a concise, informative git commit message based on the following git diff.
Be sure that the commit message reflects the entire diff.
It is very important that the entire commit is clear and understandable.
Only reply with the commit message and nothing else.
")
(def diff (p/check (p/sh "git" "diff" "--cached")))
(println diff)