Paso 1 — Resolver número de PR
$ gh pr view --json number,body -q '.number'
87
Paso 3 — Obtener ticket Linear del comentario linear-code
$ gh issue view 42 --repo nutripaw-io/nutripaw --json comments \
-q '.comments[] | select(.author.login=="linear-code") | .body' \
| grep -Eioe '[a-z]+-[0-9]+' | head -1
NP-312
Paso 4 — Leer descripción actual del PR
$ gh pr view 87 --json body -q '.body'
Fix coupon validation logic for Premium plan users during checkout flow.
The discount was being skipped due to an incorrect `plan_type` comparison in `checkout_service.py`.
Paso 5-6 — Construir nuevo body y actualizar PR
$ gh pr edit 87 --body "$(cat <<'EOF'
Fix coupon validation logic for Premium plan users during checkout flow.
The discount was being skipped due to an incorrect \`plan_type\` comparison in \`checkout_service.py\`.
#### Issues
* Resolves: #42
* Resolves: NP-312
EOF
)"
✓ PR #87 actualizado correctamente
Paso 7 — Confirmar URL
$ gh pr view 87 --json url -q '.url'
https://github.com/nutripaw-io/nutripaw/pull/87