Skip to content

Feat: Add support for PR templates #204

@esacteksab

Description

@esacteksab

tp creates a markdown file with GFM encapsulating a plan's output, then I typically have done a gh pr create -F plan.md where plan.md is the markdown file created by tp. But passing -F overwrites the repository's PR template's body replacing the content/body with plan.md, which isn't ideal, because the template exists for a reason. Ideally, tp could amend the plan's output to the PR template, or inject it into the template.

I tried gh pr create -plan.md -T my_template and -F or -f aren't allowed with -T/--template.

I'm not entirely sure how to solve this, maybe allow tp to take a -T/--template flag itself. I'm not sure if it should use the default convention naming pattern or if I should expect a full or relative path to the template. But I think the easiest thing to do would be to just read in the contents of the template file, then writing plan.md to the end of the template, it may require changing the layout of the template. It might be nice to do a <!-- tp start --> and <!-- tp stop --> and put the contents of the plan.md inside the block.

Pull request templates
Creating a pull request template

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions