Skip to content

Commit d995a2e

Browse files
committed
Add automated commit target with AI-generated commit messages
1 parent 04ec2e3 commit d995a2e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,12 @@ lint-cicd:
3838
echo "$(YELLOW)Please run 'make format' locally to fix these issues.$(NC)"; \
3939
exit 1; \
4040
fi
41-
@echo "$(GREEN)All code quality checks passed!$(NC)"
41+
@echo "$(GREEN)All code quality checks passed!$(NC)"
42+
43+
# A convenience Makefile target that runs
44+
commit: lint test
45+
$(info Generating commit message...)
46+
export COMMIT_MESSAGE="$(shell q chat --no-interactive --trust-all-tools "Understand pending local git change and changes to be committed, then infer a commit message. Return this commit message only" | tail -n 1 | sed 's/\x1b\[[0-9;]*m//g')" && \
47+
git add . && \
48+
git commit -am "$${COMMIT_MESSAGE}" && \
49+
git push

0 commit comments

Comments
 (0)