]> git.giacomolli.uk - onechat/commitdiff
Format issue bodies and comments with mdformat
authorAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 18:54:56 +0000 (15:54 -0300)
committerAnderson A. Giacomolli <agiacomolli@gmail.com>
Fri, 6 Nov 2026 18:54:56 +0000 (15:54 -0300)
Issue bodies and comments go through mdformat with the repository
configuration, so they wrap and number lists as every other Markdown
file does. mdformat joins trailer lines into one line, so the text is
formatted first and the trailers are added after it.

.agents/skills/issues/SKILL.md

index f782536c34fa99cd969b8c76fe2b540e547c029b..47672fcc3f3cf4dd9f3ead39d311ddc6f390d5db 100644 (file)
@@ -23,6 +23,9 @@ commands in the Nix development shell.
   imperative mood, with no final period.
 - Write the body in Markdown. State the result for the user, the scope,
   and how to check it.
   imperative mood, with no final period.
 - Write the body in Markdown. State the result for the user, the scope,
   and how to check it.
+- Format each body and comment with `mdformat -` in the repository, so
+  that it uses `.mdformat.toml`. mdformat joins trailer lines into one
+  line, so format the text first and add the trailers after it.
 - Add a comment with `git bug bug comment new ID -m TEXT` for progress
   that matters: decisions made with the user, measurements, and checks
   that could not run.
 - Add a comment with `git bug bug comment new ID -m TEXT` for progress
   that matters: decisions made with the user, measurements, and checks
   that could not run.
@@ -60,6 +63,9 @@ Push the issues with `git bug push` when the repository has a remote.
 This example creates an issue:
 
 ```sh
 This example creates an issue:
 
 ```sh
+body=$(mdformat - < body.md)
 git bug bug new --non-interactive -t 'Decide the root wake interval' \
 git bug bug new --non-interactive -t 'Decide the root wake interval' \
-  -m "$(cat body.md)"
+  -m "$body
+
+Parent: 180a674"
 ```
 ```