dotfiles

feat(jj): add `Sign-off` footer in draft config template

Signed-off-by: Seongmin Lee <boltlessengineer@proton.me>

+18
+18
jj/config.toml
··· 2 2 3 3 [ui] 4 4 default-command = ["log", "--no-pager"] 5 + should-sign-off = true 5 6 # diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"] 6 7 # merge-editor = "vimdiff" 7 8 # conflict-marker-style = "git" ··· 17 18 18 19 [git] 19 20 write-change-id-header = true 21 + 22 + [templates] 23 + draft_commit_description = ''' 24 + concat( 25 + coalesce(description, default_commit_description, "\n"), 26 + if( 27 + config("ui.should-sign-off").as_boolean() && !description.contains("Signed-off-by: " ++ author.name()), 28 + "\nSigned-off-by: " ++ author.name() ++ " <" ++ author.email() ++ ">", 29 + ), 30 + surround( 31 + "\nJJ: This commit contains the following changes:\n", "", 32 + indent("JJ: ", diff.summary()), 33 + ), 34 + "\nJJ: ignore-rest\n", 35 + diff.git(), 36 + ) 37 + '''