# Gitea workflow ## Branch flow `main` → `test` → `dev` → feature branches. `test` is the default branch, protected, merge-only. For a brand-new empty repo: create `test` from `main`, then `dev` from `test`. ## Posting with `tea` When posting to Gitea with `tea` (issues, comments, PRs): - Run it in the **foreground**. - **Use the right body argument** — there is no `--body` flag and no read-from-file option: - `tea issues create` / `tea pulls create`: body is `--description` / `-d` - `tea comment []`: body is a **positional** argument (no flag) - **Never put `\n` escape sequences in the body.** `tea` stores the string verbatim — it does not interpret escapes, so any `\n` you pass appears *literally* in the posted text. The body must already contain real newlines: write it to a file (the Write tool, or `printf` — never `echo "...\n..."`), then pass it by command substitution, e.g. `-d "$(cat body.md)"` or `tea comment 42 "$(cat body.md)"`. Inline heredocs and `\n`-laden argument strings are what cause the literal `\n`. - **Confirm it actually posted** — check the exit code *and* re-read the created item; verify the body renders with real line breaks, not literal `\n`. `tea` can fail silently. - **Write subcommands hang on inherited stdin.** Even with the body passed as an argument, `tea` (`comment`, `issues edit`, `issues close`, `pulls create`, …) reads stdin; in a non-TTY shell the inherited stdin never sends EOF, so the command blocks until it is killed. **Fix: redirect stdin — append `` (note: `tea issues view ` does *not* print the full body). - **Show comments:** `tea issue --comments`. Comments are hidden by default, but this flag renders them — you do **not** need the API to read comments. - **Edit an existing issue body:** `tea issues edit -d "$(cat body.md)"