fj issue create --template / pr create --template: use repo templates #172

Closed
opened 2026-06-15 15:01:14 +00:00 by stephen · 0 comments
Owner

Problem

Repos shipping issue/PR templates (.gitea/ISSUE_TEMPLATE, .gitea/PULL_REQUEST_TEMPLATE) get no help; create starts from an empty body. gh issue create --template picks one.

Acceptance criteria

  • fj issue create --template <name> preloads the chosen template body (opens $EDITOR unless -b / -F given); with no name on a TTY, list the repo's templates to pick from.
  • fj pr create --template <name> likewise.
  • Read templates via the Forgejo templates API where available, else read the files from the default branch; clear message when the repo has none.

Value

Consistent issue/PR hygiene; less copy-paste for template-driven repos.

Priority

p3 (niche; partly worked around by -F/--body-file).

Dependencies / sequencing

Build after #165 so it reuses the create body-resolution / editor path. Template-API availability varies by build (verify, with a default-branch-file fallback).

Overlap

Shares body-population plumbing with #165 (create --fill); sequence after it.

## Problem Repos shipping issue/PR templates (`.gitea/ISSUE_TEMPLATE`, `.gitea/PULL_REQUEST_TEMPLATE`) get no help; `create` starts from an empty body. `gh issue create --template` picks one. ## Acceptance criteria - [ ] `fj issue create --template <name>` preloads the chosen template body (opens `$EDITOR` unless `-b` / `-F` given); with no name on a TTY, list the repo's templates to pick from. - [ ] `fj pr create --template <name>` likewise. - [ ] Read templates via the Forgejo templates API where available, else read the files from the default branch; clear message when the repo has none. ## Value Consistent issue/PR hygiene; less copy-paste for template-driven repos. ## Priority p3 (niche; partly worked around by `-F/--body-file`). ## Dependencies / sequencing Build after #165 so it reuses the create body-resolution / editor path. Template-API availability varies by build (verify, with a default-branch-file fallback). ## Overlap Shares body-population plumbing with #165 (`create --fill`); sequence after it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rasterstate/fj#172
No description provided.