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

#6401 Support to "alwaysSignOff" commits #6402

Merged
merged 1 commit into from
Nov 20, 2019

Conversation

JonasHelming
Copy link
Contributor

@JonasHelming JonasHelming commented Oct 16, 2019

Signed-off-by: Jonas Helming jhelming@eclipsesource.com

What it does

How to test

turn the preference on (under Git) and commit via CTRL+ENTER. Check the the commit is signed off

Review checklist

Reminder for reviewers

@akosyakov akosyakov added git issues related to git scm issues related to the source control manager and removed scm issues related to the source control manager labels Oct 16, 2019
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JonasHelming please take a look at the failing CI.


The error comes from a missing binding during the test:

testContainer = new Container();
testContainer.bind(GitRepositoryProvider).toSelf().inSingletonScope();
testContainer.bind(Git).toConstantValue(mockGit);

Adding the binding for GitPreferences worked for me locally:

...
testContainer.bind(GitPreferences).toConstantValue(<GitPreferences>{});
...

@AlexTugarev
Copy link
Contributor

Hi @JonasHelming! While this seems to work as advertised, I think it's confusing that cmd+enter behaves different to the ✔️ Commit button in that regard.

Why not aligning with vscode and implementing a general git.alwaysSignOff setting?

@JonasHelming
Copy link
Contributor Author

Hey,

thanks for the feedback, I will have a look at the failing test cases.
About the functional feedback: I agree that a "alwayssigneoff" preference setting is more consistent with VS Code. However, I personally find that a bit confusing in VS Code, because in the menue, you see

  • Commit Staged
  • Commit Staged (sign off)
    But both actually do the same. Why does the menu then even show both options if the setting is turned on? Therefore, I decided to influence the default action on CTRL+ENTER rather then "alwayssignoff". What is the sense of opening the menu and then clicking on commit (not on commit(sign off)) and still exspecting to sign off?

Maybe a potential solution is to show in the commit message text field "Message (Ctrl+Enter to commit (signed off) on {$branch}?

Another potential solution is to introduce both preferences.

Finally, if you dislike the "CTRL+ENTER" only approach, I can rework it to match VS Code exactly although as mentioned, I find that more confusing.

What do you think?

@akosyakov
Copy link
Member

It would be good to be aligned with VS Code, especially we are going to drop native extension eventually in favor of VS Code one.

…onas Helming <jhelming@eclipsesource.com>

Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
@JonasHelming JonasHelming changed the title #6401 Support to "autosignoff" commits #6401 Support to "alwaysSignOff" commits Nov 4, 2019
@JonasHelming
Copy link
Contributor Author

I have no idea, why the build on Mac fails ...

@akosyakov
Copy link
Member

restarted the job, was too many requests to GitHub to download vscode-rigrep

@akosyakov
Copy link
Member

It does not help :( is it because a fork don't get our github tokens? cc @marcdumais-work ?

@vince-fugnitto
Copy link
Member

restarted the job, was too many requests to GitHub to download vscode-rigrep

The same happens in this PR :( #6480

@marcdumais-work
Copy link
Contributor

marcdumais-work commented Nov 5, 2019

It does not help :( is it because a fork don't get our github tokens? cc @marcdumais-work ?

Yes, exactly this

https://docs.travis-ci.com/user/environment-variables/#defining-variables-in-repository-settings
These variables are not automatically available to forks.

@akosyakov
Copy link
Member

ok, so then we can ignore the build failure and merge?

@marcdumais-work
Copy link
Contributor

ok, so then we can ignore the build failure and merge?

In case of doubt we can restart the failing job - it will pass eventually.

@vince-fugnitto
Copy link
Member

ok, so then we can ignore the build failure and merge?

In case of doubt we can restart the failing job - it will pass eventually.

I've manually restarted the build, the CI is now all green :)

@akosyakov
Copy link
Member

@AlexTugarev @kittaakos Could you finish the review please? You had some comments above. Were they addressed? If so, please approve and merge.

Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good and it works as expected. It is good to merge 👍

Thank you for your help, @JonasHelming!

I have verified the changeset in Gitpod by manually adjusting both .vscode/settings.json and .theia/settings.json files, committing to the local repo, and checking the git log.

@kittaakos kittaakos merged commit 21da05e into eclipse-theia:master Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git issues related to git
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support to "alwaysSignOff" commits (via a preference)
6 participants