Skip to content

Commit

Permalink
aicommits 1.5.1 (new formula)
Browse files Browse the repository at this point in the history
* aicommits 1.5.1 (new formula)
* aicommits: use default livecheck

Closes #125882.

Co-authored-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
  • Loading branch information
2 people authored and BrewTestBot committed Mar 17, 2023
1 parent 1c2e5c5 commit 6da90e5
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Formula/aicommits.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
require "language/node"

class Aicommits < Formula
desc "Writes your git commit messages for you with AI"
homepage "https://github.com/Nutlope/aicommits"
url "https://registry.npmjs.org/aicommits/-/aicommits-1.5.1.tgz"
sha256 "cc2d9011a3ef1eb7317078c9154753412f3cb42f8a73dccc1cd8f84744c57a72"
license "MIT"

depends_on "node"

def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
end

test do
assert_match "The current directory must be a Git repository!", shell_output("#{bin}/aicommits", 1)

system "git", "init"
assert_match "No staged changes found. Make sure to stage your changes with `git add`.",
shell_output("#{bin}/aicommits", 1)
touch "test.txt"
system "git", "add", "test.txt"
assert_match "Please set your OpenAI API key via `aicommits config set OPENAI_KEY=<your token>`",
shell_output("#{bin}/aicommits", 1)
end
end

0 comments on commit 6da90e5

Please sign in to comment.