Skip to content

Commit 1977903

Browse files
authored
keep the existing tracking issue text when updating it (#292)
1 parent 2bdc665 commit 1977903

File tree

1 file changed

+11
-1
lines changed
  • crates/rust-project-goals-cli/src

1 file changed

+11
-1
lines changed

crates/rust-project-goals-cli/src/rfc.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,19 @@ fn initialize_issues<'doc>(
361361

362362
let link_text = goal_document_link(timeframe, &desired_issue.goal_document);
363363
if !existing_issue.body.contains(&link_text) {
364+
// Let's update the tracking issue to the new goal description, while keeping
365+
// the old text in case we need it. It's surprisingly hard to get out of GH
366+
// otherwise.
367+
let body = format!(
368+
"{desired_body}\n---\nNote: we have updated the body to match the \
369+
{timeframe} goal. Your original text is preserved below. \
370+
<details>\n{existing_body}\n</details>",
371+
desired_body = desired_issue.body,
372+
existing_body = existing_issue.body,
373+
);
364374
actions.insert(GithubAction::UpdateIssueBody {
365375
number: existing_issue.number,
366-
body: desired_issue.body,
376+
body,
367377
});
368378
}
369379

0 commit comments

Comments
 (0)