mirror of
https://git.madhouse-project.org/actions/nix-flake-update-pr.git
synced 2024-11-23 12:09:15 +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:
parent
130d7bfc05
commit
2ce6092f3c
1 changed files with 15 additions and 0 deletions
|
@ -13,6 +13,21 @@ nfup_setup_credentials() {
|
||||||
|
|
||||||
nfup_update() {
|
nfup_update() {
|
||||||
nix flake update --commit-lock-file
|
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() {
|
nfup_push() {
|
||||||
|
|
Loading…
Reference in a new issue