-
Notifications
You must be signed in to change notification settings - Fork 3
PR description updates should preserve custom text #46
Copy link
Copy link
Open
Labels
domain: CollaborationPlatformimportance: 1 - must haveMust be implemented for the product to be completeMust be implemented for the product to be completeurgency: 3 - no urgencyWe have an indefinite amount of time to complete thisWe have an indefinite amount of time to complete thiswork type: implementationA task that primarily involves bashing codeA task that primarily involves bashing code
Milestone
Metadata
Metadata
Assignees
Labels
domain: CollaborationPlatformimportance: 1 - must haveMust be implemented for the product to be completeMust be implemented for the product to be completeurgency: 3 - no urgencyWe have an indefinite amount of time to complete thisWe have an indefinite amount of time to complete thiswork type: implementationA task that primarily involves bashing codeA task that primarily involves bashing code
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:
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.