Commit 4ce6b280 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

HgGitRepository#hg_env_for_write: don't fail if user is nil

This is for now a corner case, but we'll treat it in a more
appropriate manner right afterwards.

--HG--
branch : heptapod
parent ea5386ac7e01
......@@ -407,10 +407,10 @@ def hg_env_for_write(user)
# these would still be directly linked to authenticated
# user info
'HEPTAPOD_SKIP_ALL_GITLAB_HOOKS' => "yes",
'HEPTAPOD_USERINFO_ID' => user.id.to_s,
'HEPTAPOD_USERINFO_USERNAME' => user.username,
'HEPTAPOD_USERINFO_NAME' => user.name,
'HEPTAPOD_USERINFO_EMAIL' => user.email,
'HEPTAPOD_USERINFO_ID' => user&.id.to_s,
'HEPTAPOD_USERINFO_USERNAME' => user&.username,
'HEPTAPOD_USERINFO_NAME' => user&.name,
'HEPTAPOD_USERINFO_EMAIL' => user&.email,
'GL_REPOSITORY' => @gl_repository, # for Heptapod 0.13
# for Heptapod 0.12:
'HEPTAPOD_PROJECT_ID' => @gl_repository.rpartition('-')[-1],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment