1
0
Fork 0
mirror of https://git.madhouse-project.org/actions/nix-flake-update-pr.git synced 2024-11-30 15:19:14 +01:00

nfup_update: Add markdown formatting to the auto commit

After updating the lock file, reformat the commit message so that the
updates are wrapped in a code block, because that looks nicer.

Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
This commit is contained in:
Gergely Nagy 2024-04-12 08:42:50 +02:00
parent 130d7bfc05
commit 2ce6092f3c
No known key found for this signature in database

View file

@ -13,6 +13,21 @@ nfup_setup_credentials() {
nfup_update() {
nix flake update --commit-lock-file
subject="$(git show -s --format=format:%s)"
message="$(git show -s --format=format:%b)"
preamble="$(echo "${message}" | head -n 1)"
update="$(echo "${message}" | tail -n +3)"
git commit --amend --message="${subject}
${preamble}
\`\`\`
${update}
\`\`\`
"
}
nfup_push() {