fix: do not overwrite whole file
This commit is contained in:
parent
622cb26a3e
commit
b2ba972a1e
|
@ -219,7 +219,11 @@ async fn main() -> Result<()> {
|
|||
get_diff(pr, &opts.path, &client).await?;
|
||||
let pr = get_pr(pr, &client).await?;
|
||||
let title = pr.title.replace("\n", "//");
|
||||
fs::write(&opts.pr_file, format!("{} # {}", pr.number, title))?;
|
||||
let file = OpenOptions::new()
|
||||
.write(true)
|
||||
.append(true)
|
||||
.open(&opts.pr_file)?;
|
||||
writeln!(file, format!("{} # {}", pr.number, title))?;
|
||||
}
|
||||
};
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue