aicommit/aicommit.clj

18 lines
671 B
Clojure

#!/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)