-
Notifications
You must be signed in to change notification settings - Fork 111
chore: update local git config when user changes Che Theia git settings #1319
Conversation
depends on eclipse-che/che#21147 |
Codecov Report
@@ Coverage Diff @@
## main #1319 +/- ##
==========================================
+ Coverage 32.78% 36.74% +3.95%
==========================================
Files 290 330 +40
Lines 9885 11393 +1508
Branches 1457 1572 +115
==========================================
+ Hits 3241 4186 +945
- Misses 6641 7202 +561
- Partials 3 5 +2
Continue to review full report at Codecov.
|
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.
LGTM
9f92e3f
to
2f0286f
Compare
I have just started a workspace using this editor definition, and although the git user and email are set in Theia preferences, Theia still shows the warning in the status bar: Note that theia git email and username preferences were set previously, in another workspace. |
@l0rd |
Thanks @vinokurig I will test it later |
I have tried this PR and there is a problem. Theia now creates a configmap with the gitconfig. But if a gitconfig ConfigMap already existed in the namespace we will end up with 2 ConfigMaps:
And then workspaces will fail to start. |
As discussed a couple of weeks ago I think that Theia should not create or update the git configmap. It should instead:
|
Other acceptance criteria:
|
Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
PR update:
|
To test this PR run a factory:
|
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.
I have tried your Theia image as mentioned in this PR description. I don't understand why I am asked to configure my git config email when it's already configured: Note that I had a theia preferences configmap: kubectl cm workspace-preferences-configmap -o json | jq -r '.data[]' | jq .
{
"git.user.email": "mario.loriedo@gmail.com",
"git.user.name": "Mario"
} |
seems ok to me, thanks for updating the PR |
@l0rd @azatsarynnyy we are going to merge this PR after 2 days. |
What does this PR do?
home/theia/.gitconfig
is updated with a new value, local gitconfig<project directory>/.git/config
is updated with the value automatically.Screenshot/screencast of this PR
What issues does this PR fix or reference?
eclipse-che/che#21115
How to test this PR?
run factory:
gitconfig
settings e.g.user.name
anduser.email
.See: The
gitconfig
settings are present.PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.
Happy Path Channel
HAPPY_PATH_CHANNEL=stable