From abd32275ba7813c1296c89978beff662e25a718e Mon Sep 17 00:00:00 2001 From: anaxios Date: Sat, 10 Aug 2024 06:26:06 -0700 Subject: [PATCH] Added aicommit.clj script to migrate to babashka clojure. --- aicommit.clj | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 aicommit.clj diff --git a/aicommit.clj b/aicommit.clj new file mode 100644 index 0000000..040d72d --- /dev/null +++ b/aicommit.clj @@ -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) \ No newline at end of file