Skip to main content

rewrite_pr_body

Function rewrite_pr_body 

Source
pub fn rewrite_pr_body(
    args: &[String],
    tag: &str,
    read_file: impl Fn(&str) -> Option<String>,
) -> Vec<String>
Expand description

gh pr create / gh pr edit arguments with tag added to the PR’s body: --body/-b text, or a --body-file/-F file, whose text (read by read_file) becomes the --body (stdin can’t be read twice, and a file too big to pass stays as it is). Arguments that give no body (--fill, a prompt) are left alone.