-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pr body update] update stack list without overwriting PR title and body #780
Conversation
Hi @vuduchild! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@vuduchild has updated the pull request. You must reimport the pull request before landing. |
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@vuduchild has updated the pull request. You must reimport the pull request before landing. |
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@vuduchild has updated the pull request. You must reimport the pull request before landing. |
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
I really want this behaviour! Looking forward to the PR landing. |
@quark-zju merged this pull request in 802ae02. |
The current behavior of PR updates is flawed - every time one submits a new version of a PR, it is followed by an update of the title and description body of the PR. Often, the PR author would edit the PR title in Github's web UI after submission, to find their marvelous prose offhandedly deleted by Sapling.
In this diff I'm introducing a new config option (
github.preserve-pull-request-description
) to control this overwrite behavior. With the option turned on, subsequent updates only overwrite the stack listing in the PR description to reflect PR stack changes, while the actual PR description and title are left alone.Here's the new behavior in detail:
sl pr submit
sl pr submit
againAt this point, I've set the option to default to
False
to avoid surprising current users, preserving current (albeit flawed) behavior. However, I believe over time this should default to True. The reasoning being that technically the local commit and remote PR should be 2 separate entities (a PR may contain more than one commit etc).Test:
NOTE: This PR is dependant on downstream #779 which fixes a bug affecting the parsing and detection of the stack list in the PR description.