[metadata] name = "tea-prs" description = "List Gitea PRs for the current repo" requirements = ["tea", "jq"] [source] command = '''tea pulls list --output json --state open 0 then "\u001b[36mLabels:\u001b[39m " + ([.labels[] | "\u001b[35m" + .name + "\u001b[39m"] | join(" ")) else empty end), "\u001b[36mMergeable:\u001b[39m " + (if .mergeable then "\u001b[32m✓ Clean\u001b[39m" else "\u001b[31m✗ Dirty\u001b[39m" end), "", "\u001b[90m────────────────────────────────────────────────────────────\u001b[39m", "", (.body // "") ' ''' [actions.checkout] description = "Checkout the PR branch locally" command = "tea pulls checkout {strip_ansi|split:#:1|split:\t:0}" mode = "execute" [actions.merge] description = "Merge the selected PR" command = "tea pulls merge {strip_ansi|split:#:1|split:\t:0}" mode = "execute"