I don't like one thing about #661: It defaults the PR title to the last commit message. However, whenever I make a PR, my last commit is generally not the main commit of the branch, but a clean-up or maintenance commit. Which means that my PRs are almost always created with nonsensical titles.
I suggest this workflow:
To get the same results as the current workflow, the only change is that you have to double-tap Enter to immediately accept the suggested PR name. In the current workflow you would press Enter only once. I think this is an acceptable trade-off.
We could also have this based on the branch name by default like github does in the web ui.
Additionally, I would love for the ability to have a second text box below a title prompt that allows you to enter a description. We enforce our PRs to have descriptions via CI, so every PR I open from VS code starts by failing with no description. I then need to manually rebuild because description edits don't kick off CI.
More generally, I think just being able to open a draft of a PR where we can edit any of the properties (assignee, labels, etc) before actually creating it is probably the way to go. That would give it feature parity with github's web interface for creating PRs (which this is attempting to displace).
I'd suggest to make this an opt-in in the settings instead.
The Github extension by https://github.com/KnisterPeter/vscode-github handles it this way:
If the boolean setting is true{
asks for PR title in a dialog
}
If false{
it uses default of the latest commit message
}
I agree with @daedalus28, I would expect a github tool to behave just like github web interface does. The way it is implemented right now feels a bit clumsy, where you have to create the PR and then clean up the things it did that you didn't really want or need.
Maybe a setting, where you can choose where the suggested title is coming from, either from the branch name or last commit, or custom.
I don't see why it can't be a select box with:
<select>
<option>Use Latest Commit Message</option
<option>Use Branch Name</option
<option>Use Custom Message</option> // makes open dialog default to if press esc, use last commit message
<option>Ask Every Time</option> // opens a dialog with the same options, sets for just that PR
</select>
Thanks so much for this feature!
Yeah this is honestly one of the best features added this year.
More generally, I think just being able to open a draft of a PR where we can edit any of the properties (assignee, labels, etc) before actually creating it is probably the way to go. That would give it feature parity with github's web interface for creating PRs (which this is attempting to displace).
Draft PR's I feel should be a feature, but also should have their own Issue for it.
@GeorgeWL There should be an existing command for draft PRs, GitHub Pull Requests: Create Draft Pull Request. Perhaps it would be more discoverable if we had a single command that would ask if you wanted to publish the PR as a draft or not at the start?
I think what they're proposing however is just a setting in the settings ui for "Always Draft PRs" or similar.
@RMacfarlane
I think single command would end up making the process slower for all those who don't have any interest in Draft PRs tbh.
Most helpful comment
We could also have this based on the branch name by default like github does in the web ui.
Additionally, I would love for the ability to have a second text box below a title prompt that allows you to enter a description. We enforce our PRs to have descriptions via CI, so every PR I open from VS code starts by failing with no description. I then need to manually rebuild because description edits don't kick off CI.
More generally, I think just being able to open a draft of a PR where we can edit any of the properties (assignee, labels, etc) before actually creating it is probably the way to go. That would give it feature parity with github's web interface for creating PRs (which this is attempting to displace).