Skip to content

PR description updates should preserve custom text #46

@taneliang

Description

@taneliang

Currently, updating the PR description will replace the whole description. Users will want to add custom text to their PRs, e.g. a summary and test plan like in MLH-Fellowship/scheduling-profiler-prototype#111.

Here's what I propose:

On PR creation: set the PR description to the existing stack description, but add a marker and a comment saying not to edit anything on top of it. We can also include the commit's body (https://www.nodegit.org/api/commit/#body) here. Something like this:

<!--
  Hello! This pull request description is partially generated by Stack Attack,
  and may contain information required by Stack Attack. Feel free to change 
  anything below the END GENERATED STACK ATTACK DESCRIPTION designator!
-->

Stack PR by [STACK ATTACK](https://github.com/taneliang/stack-attack):
- **#110 [Resize content][1/n] Break horizontal scrolling area into final-ish hierarchy**
- #107 [Resize content][2/n] Implement ResizableSplitView
- #108 [Resize content][3/n] Sync horizontal pan and zoom states
- #109 Implement User Timing marks view
- #111 Highlight React events with the same wakeable ID

<!-- END GENERATED STACK ATTACK DESCRIPTION -->

... the commit's body ...

On update: only replace everything above the marker. If the marker can't be found, just retain the whole description and insert our stack description and marker on top of it.

When this is done, our bot will also need to be updated as it currently identifies Stack Attack PRs by the presence of "Stack PR" at the start of PR descriptions.

Metadata

Metadata

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions