sloria/sphinx-issues

expected remote repo roles to use Gitlab when defining Gitlab URIs in configuration

jensfriisnielsen opened this issue · 1 comments

For instance if the following is in conf.py:

issues_uri = "https://gitlab.com/graphviz/graphviz/issues/{issue}"
issues_pr_uri = "https://gitlab.com/graphviz/graphviz/merge_requests/{pr}"
issues_commit_uri = "https://gitlab.com/graphviz/graphviz/commit/{commit}"

Then writing .rst:

:issue:`fdroid/fdroidserver#1`

Points to Github at https://github.com/fdroid/fdroidserver/issues/1

I expected it to point to Gitlab.

It should be mentioned that gitlab instances can be also locally distributed.
The role should handle this also correctly:

i.e. https://gitlab.company.local/group/project/issues/{issue}

To be most flexible would be to be able to define the urls in the followin scheme:

issues_uri = "https://gitlab.com/{group=graphviz}/{project=graphviz}/issues/{issue}"
issues_pr_uri = "https://gitlab.com/{group=graphviz}/{project=graphviz}/merge_requests/{pr}"
issues_commit_uri = "https://gitlab.com/{group=graphviz}/{project=graphviz}/commit/{commit}"

This way it would be very flexible to be used even with other issue systems.