TOPIC: APACHE SUBVERSION
Generating Git commit messages automatically using aicommit and OpenAI
25th October 2025One of the overheads of using version control systems like Subversion or Git is the need to create descriptive messages for each revision. Now that GitHub has its copilot, it now generates those messages for you. However, that still leaves anyone with a local git repository out in the cold, even if you are uploading to GitHub as your remote repo.
One thing that a Homebrew update does is to highlight other packages that are available, which is how I got to learn of a tool that helps with this, aicommit. Installing is just a simple command away:
brew install aicommit
Once that is complete, you now have a tool that generates messages describing very commit using GPT. For it to work, you do need to get yourself set up with OpenAI's API services and generate a token that you can use. That needs an environment variable to be set to make it available. On Linux (and Mac), this works:
export OPENAI_API_KEY=<Enter the API token here, without the brackets>
Because I use this API for Python scripting, that part was already in place. Thus, I could proceed to the next stage: inserting it into my workflow. For the sake of added automation, this uses shell scripting on my machines. The basis sequence is this:
git add .
git commit -m "<a default message>"
git push
The first line above stages everything while the second commits the files with an associated message (git makes this mandatory, much like Subversion) and the third pushes the files into the GitHub repository. Fitting in aicommit then changes the above to this:
git add .
aicommit
git push
There is now no need to define a message because aicommit does that for you, saving some effort. However, token limitations on the OpenAI side mean that the aicommit command can fail, causing the update operation to abort. Thus, it is safer to catch that situation using the following code:
git add .
if ! aicommit 2>/dev/null; then
echo " aicommit failed, using fallback"
git commit -m "<a default message>"
fi
git push
This now informs me what has happened when the AI option is overloaded and the scripts fallback to a default option that is always available with git. While there is more to my git scripting than this, the snippets included here should get across how things can work. They go well for small push operations, which is what happens most of the time; usually, I do not attempt more than that.
Keeping an eye on WordPress development III
11th March 2008If the milestone date was to be believed, WordPress 2.5 was due yesterday. However, it has yet to show up, and a brief look at WordPress Trac reveals why: loads of outstanding tickets relating to bugs. In fact, there seem to be more tickets associated with this than other releases. I suppose that we can expect the new release when we see it then. Interestingly, the administration screen theming references have been removed from the pre-release version, so that's a functionality for a future release, and it's not difficult to see why. Otherwise, the style of the screens in the latest Subversion revision looks a bit smarter and my blog themes are not getting broken. For my online blogs, I'll be sticking with 2.3.3 for now.
Keeping an eye on future WordPress releases
16th February 2008While I haven't mentioned WordPress in a while, it's now heading for version 2.5 after 2.4 was skipped. Because I want to ensure that upgrading doesn't cause problems for my blogs, I have been picking up nightly builds with Subversion from WordPress.org. The following is the command to be used, which it works fine on my Ubuntu system in the folder where I want the WordPress installation directory to live. If you wish to find out more about Subversion, there is a free book on the web.
svn co http://svn.automattic.com/wordpress/trunk/
The main event is the new dashboard, and that seems to be taking cues from Movable Type (I gave that a whirl recently, so I may say something here about it yet). Everything is still there, along with tantalising hints of prospects for customisation. In the interim, you can change the front page feeds so that they originate from other than the world of WordPress, not a bad thing given that I found WordPress Planet feeds were annoying often. Alternate theme support for the dashboard seems to be on the to-do list, as is something for plugins; we'll see what comes of the latter. Otherwise, nothing seems to be changed or, more importantly, broken, and I am able to get a mirror of my outdoors blog up and running with the only problems of any note coming from the new web address, not at all major. For now, I'll continue to keep tabs on what's happening; being forewarned of any future problems is a big bonus.
Update:
Recently, I found a good summary of what to expect on Blog Herald. This is one for a return visit, methinks.