ci: amend single commits when auto-formatting queue-main branches

Modify the formatting workflow to check the number of commits since
the merge-base with origin/main. If there's exactly one commit
since the merge-base, amend that commit instead of adding a new
formatting commit. For multiple commits, continue to add a new
commit as before.

Co-Authored-By: sketch <hello@sketch.dev>
diff --git a/webui/src/utils.ts b/webui/src/utils.ts
index b60a0fa..f3c9714 100644
--- a/webui/src/utils.ts
+++ b/webui/src/utils.ts
@@ -1,7 +1,7 @@
 /**
  * Escapes HTML special characters in a string
  */
-export function escapeHTML(str: string): string {
+export function escapeHTML(str: string): string { 
   return str
     .replace(/&/g, "&amp;")
     .replace(/</g, "&lt;")