Resolve Conversation with Commit
When working through a review, I like to resolve conversations with one commit per conversation request. Right now the workflow is pretty cumbersome, I create the commit via vscode source editor, then copy the commit ID, then paste it into the conversation request as "Resolved<commitID>" and finally close the issue.
I would like a "Fix with Commit" button on a conversation that will take my staged changes (or all changes if none staged) and once clicked, automate these steps:
- Commit to the PR
- Update the conversation where the button was clicked with a new "Resolved <commitId>" comment
- Resolve the conversation.
I would like to work on this, any suggestions on where to start, things to consider ? @alexr00
I don't think we should reinvent the wheel (or the git commit flow) for this. An alternative flow:
- Commit to the PR
- Go to the conversation that you want to resolve
- Click a new "Resolve with Existing Commit" action
- A picker shows to choose which commit resolves the conversation.
- User chooses which commit applies to this conversation
- An automatic reply is added to the conversation with the text "Resolved with
" - The conversation is resolved
@JustinGrote what do you think of this?
While not ideal, it's a reasonable compromise, thanks @alexr00!
@mohamedamara1 if you want to work on this then please feel free. https://github.com/microsoft/vscode-pull-request-github/issues/5710#issuecomment-1991397726 outlines the flow.
The "Resolve thread" command shows how to resolve a thread:
https://github.com/microsoft/vscode-pull-request-github/blob/92476fcb79c94cdfdbd8fc99ad1749f7640f7207/src/commands.ts#L942-L955
The "create comment" command shows how to reply to a comment:
https://github.com/microsoft/vscode-pull-request-github/blob/92476fcb79c94cdfdbd8fc99ad1749f7640f7207/src/commands.ts#L998-L1010
I don't know if this action should be given the same prominence as the existing "resolve" action. It could be placed here instead:
https://github.com/microsoft/vscode-pull-request-github/blob/92476fcb79c94cdfdbd8fc99ad1749f7640f7207/package.json#L2473-L2474
This is where the current resolve action is:
https://github.com/microsoft/vscode-pull-request-github/blob/92476fcb79c94cdfdbd8fc99ad1749f7640f7207/package.json#L2408-L2409