Wikis: provide repo usage type in environment variables
At least two repositories can be attached to GitLab project: the main one, and the wiki (some changes done for GitLab 11.10.0 prepare for more, see heptapod changeset 754b3795ec6b12df77ca269143c51b45c0a51317).
It is customary in GitLab to express this together with the project id in the GL_REPOSITORY
parameter, with values such as project-123
and wiki-123
. This is passed over in various ways. In Heptapod, we find this GL_REPOSITORY
in the repo environment, derived either from system environment or WSGI environment.
We're already exposing the numeric HEPTAPOD_PROJECT_ID
to external hooks, see heptapod#72 (closed). It is necessary to provide the additional information. I don't feel like changing the semantics of HEPTAPOD_PROJECT_ID
, so I'd prefer to add a new environment variable, but that's debatable.
In GitLab, this is called repo_type
, with values project
or wiki
, which is ironically quite ambiguous in Heptapod context. Perhaps, in the Mercurial backend of Heptapod a HEPTAPOD_REPOSITORY_TYPE
would be clear? It's already known at that point that we are in a Mercurial repository anyway.
@andre.klitzing do you have an opinion?