Skip to content
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

sl pr submit overwrites PR title and description #256

Open
aliceliu opened this issue Nov 23, 2022 · 8 comments
Open

sl pr submit overwrites PR title and description #256

aliceliu opened this issue Nov 23, 2022 · 8 comments
Assignees

Comments

@aliceliu
Copy link

It seems like running sl pr submit always updates the PR title and description. Is there a way to disable this behavior so it doesn't overwrite the title and description updates I make on Github? It would also be nice if sl pr submit uses the existing pull request template when creating the PR for the first time.

For context my repo has a pull request template and I usually fill out the details on github.com after creating the PR, so having sl pr submit overwrite this anytime I make changes is not ideal. I could use sl push to get around this but that doesn't handle updating the whole stack.

@sggutier
Copy link
Contributor

Currently there isn't a way of disabling this behavior or to integrate templates into this, as far as I know. Let me see what we can do about this.

@elegios
Copy link

elegios commented Nov 25, 2022

Perhaps #191 could be a thing to look at at the same time, in case the changes required for this issue could also be made to support that?

@bolinfest bolinfest self-assigned this Dec 17, 2022
@bolinfest
Copy link
Contributor

I agree we should improve this, but FYI, sl pr submit rewrites your pull request body using the current contents of your commit message. If you ended up writing the changes back to your commit message, things would work out, but I realize that's annoying.

I'll see what we can do here.

@lazopm
Copy link

lazopm commented Apr 13, 2023

This makes sapling pretty unusable. I need to edit the PR description separately from the commit message.

  • Pushing a commit for every description edit is overkill, starts a new CI build, spams PR history
  • I need to add stuff like screenshots and tables, this is hard to do in the terminal.

From my time at meta the way it worked was that after you updated a diff title/description in the UI, it would be "out of sync" and stop updating it when a new version was submitted. There was a hg sync command that would update your commit message with the latest UI's version as well to bring them back in sync.

@bolinfest Right now I'm running my own build with the code that updates PRs commented out. Something like I described above would be awesome. Would you be open to a stopgap solution that simply disables updating PRs after the initial creation with a config flag?

ui.update_gh_pr = false

I would be happy to contribute this

@wonjae-2352
Copy link

Could we get any update or action item on this? If @lazopm can contribute on this, that will be great

@chrisirhc
Copy link

chrisirhc commented Jun 29, 2023

A --no-rewrite-body argument for submit could be also be a step towards adjusting this behavior. If that's easier as a first step. It'd make sapling much more usable. Users can alias pr submit with this argument as needed.

@vuduchild
Copy link
Contributor

vuduchild commented Nov 22, 2023

I've submitted #780 to propose one possible way of addressing this issue - by only updating the stack list section of the PR description while leaving the title and rest of the body intact.

@alex-statsig
Copy link
Contributor

Currently there isn't a way of disabling this behavior or to integrate templates into this, as far as I know. Let me see what we can do about this.

I did land #633 to allow for templates, but it requires the latest build of sapling. I also was able to use it for templates in my local extension build, but it doesnt seem to work with the real extension still yet (perhaps I could get some help debugging this by someone with more knowledge, is there a special version of sapling used by the extension?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants