gitea.tea/cmd/flags
Lunny Xiao bfda25be63 Read issue/PR description from stdin or a file (#1096)
Closes #1095.

`tea issues create` and `tea pulls create` now resolve the description in the same way as comments: when stdin is piped and neither `--description` nor `--description-file` is given, the body is read from stdin. Both create and edit commands also accept:

```text
--description-file <path>   # '-' reads stdin
```

This avoids the PowerShell 5.1 argument mangling and ANSI code page issues described in #1095.

## Changes

- Add `--description-file` to `issues create`, `issues edit`, `pulls create`, and `pulls edit`.
- Create commands fall back to piped stdin when no description flag is set.
- Add unit tests for the new body resolution.

---------

Co-authored-by: bircni <bircni@icloud.com>
Reviewed-on: https://gitea.com/gitea/tea/pulls/1096
Reviewed-by: bircni <bircni@icloud.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2026-08-23 12:46:22 +00:00
..
body.go Read issue/PR description from stdin or a file (#1096) 2026-08-23 12:46:22 +00:00
body_test.go Read issue/PR description from stdin or a file (#1096) 2026-08-23 12:46:22 +00:00
csvflag.go update import path to use gitea.dev (#1003) 2026-05-23 17:26:43 +00:00
generic.go fix(labels): add org label for ls and pr (#1017) 2026-06-24 17:46:12 +00:00
generic_test.go Move sdk from code.gitea.io/sdk/gitea to gitea.dev/sdk (#1006) 2026-05-26 04:51:09 +00:00
issue_pr.go Read issue/PR description from stdin or a file (#1096) 2026-08-23 12:46:22 +00:00