-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
add branch name into commit textarea placeholder #6156
Conversation
@vince-fugnitto Should it be updated when a branch is changed? |
@akosyakov |
Yes, I believe so. I'd make sense to adjust the placeholder whenever a branch is switched.
|
@xieyuanhuata I believe you can update the logic here to build the entire message: This will allow you to easily call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vince-fugnitto |
this.scmService.registerScmProvider(provider, { | ||
input: { | ||
placeholder: 'Message (press {0} to commit)', | ||
placeholder: `Message (${OS.type() === OS.Type.OSX ? '⌘' : 'press '}{0} to commit ${branch ? 'on \'' + branch.name + '\'' : ''})`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one should use Keybindings.acceleratorFor to create a human readable representation of a keybinding
@xieyuanhuata would be great to have this change! Are you going to update the PR? |
I have pushed a second commit that resolves the outstanding issues on this PR.
|
@westbury would you mind resolving the conflict and squashing the commits? (I can do so as well if necessary) |
@vince-fugnitto I can't squash the two commits because I am adding to the original pull-request so two authors. The two commits should be merged separately. I have however rebased. I was not sure I would be able to force-push to someone else's fork, but it seemed to allow me. |
I was thinking one commit with multiple authors or co-authors since logically the pull-request should not be broken down and if we go back in history one of the commits would not be complete. The pull-request as is still has conflicts. It would also be possible to open a new pull-request and add @xieyuanhuata as a co-author (but the pull-request comes from your branch). |
I don't think the Eclipse IP checker can process such merged commits. See for example #4279 which was merged as four commits due to multiple authors, and see comment #4279 (comment) by @akosyakov . The e-mail in the commit must be match both the sign-off and the Foundation's records, and there can only be one author e-mail per commit.
Sorry, pushed to wrong remote. |
I see! In our case if one helped out with a pull-request we generally do the following a commit: https://github.com/eclipse-theia/theia/pull/8342/commits. Of course only the author will have the credit for GitHub. I'll leave it up to your discretion however :) I'll perform a review shortly. |
@vince-fugnitto You're right. It looks like Eclipse do allow Co-authored-by. I've merged the commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@westbury the changes work very well, thank you for taking care of the issue 👍
I verified the feature using both @theia/git
and the builtins, with single and multi-repository workspaces.
Co-authored-by: Nigel Westbury <nigelipse@miegel.org> Signed-off-by: xieyuanhu <xieyuanhuata@163.com>
Signed-off-by: xieyuanhu xieyuanhuata@163.com
What it does
fix #6114 update commit textarea placeholder to include branch name
How to test
1、pull this commit and start the theia;
2、open 'Source control :Git';
Review checklist
Reminder for reviewers