Add source commit ID in commit message when pushing #6

Closed
opened 2024-10-16 10:17:45 +00:00 by reynir · 1 comment
Owner

I think it would be nice to have the source commit id in the pushed commit message. This makes it easier to figure out if there are changes to build and push.

The old implementation:

Lines 134 to 149 in aa6bcc5
let run_git_rev_parse default =
let open Bos in
let value = OS.Cmd.run_out
Cmd.(v "git" % "describe" % "--always" % "--dirty"
% "--exclude=*" % "--abbrev=0")
in
match OS.Cmd.out_string value with
| Ok (value, (_, `Exited 0)) -> value
| Ok (value, (run_info, _)) ->
Logs.warn (fun m -> m "Failed to get commit id: %a: %s"
Cmd.pp (OS.Cmd.run_info_cmd run_info)
value);
default
| Error `Msg e ->
Logs.warn (fun m -> m "Failed to get commit id: %s" e);
default

I think it would be nice to have the source commit id in the pushed commit message. This makes it easier to figure out if there are changes to build and push. The old implementation: https://git.robur.coop/robur/blog.robur.coop/src/commit/aa6bcc5277cd3839955e3b093104fc5853daef99/src/blogger.ml#L134-L149
Owner

This would as well be nice to have 👍

This would as well be nice to have 👍
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: robur/blog.robur.coop#6
No description provided.