Add commit current changes workflow - #490
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9a7b0bcdc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| (unless (fboundp 'ai-code-call-gptel-sync) | ||
| (user-error "GPTel commit message generation is not available")) | ||
| (let ((message | ||
| (ai-code-call-gptel-sync |
There was a problem hiding this comment.
Avoid truncating the staged diff before message generation
When the staged diff makes this prompt exceed 1,000 characters, ai-code-call-gptel-sync truncates the entire question according to the default ai-code-gptel-sync-max-length, so the model usually receives only the beginning of a nontrivial diff. This contradicts the workflow's promise to generate from the exact staged diff and can produce a misleading commit message that omits the main changes; this call needs to bypass or explicitly raise that limit for commit generation.
Useful? React with 👍 / 👎.
Summary
Add a
Commit current changesaction underC-c a v.The workflow:
git add -Agit push -uThe implementation is kept in a small lazy-loaded
ai-code-commit.elmodule so the existing GitHub/PR workflow remains unchanged apart from the new action.Tests
Added ERT coverage for explicit messages, AI-generated messages, push behavior, and
C-c a vdispatch.