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

Add support for gitlab links #56

Open
3 tasks
ukos-git opened this issue Mar 22, 2020 · 0 comments
Open
3 tasks

Add support for gitlab links #56

ukos-git opened this issue Mar 22, 2020 · 0 comments

Comments

@ukos-git
Copy link

Currently, there is built-in support for GitHub links.

if 'github' in url:
commit_url = url + '/commit/' + self.commit.hexsha

Gitlab links are constructed the same way, so to allow gitlab we would have to write:

hosts = ['github', 'gitlab']
if (host in url for host in hosts):

additional (optional) modifications

  • adapt the naming schema of the function _github_link to something more generic
  • add an additional sphinx modifier no_github_link --> no_link
  • adapt the documentation

Related #11

ukos-git added a commit to ukos-git/sphinx-git that referenced this issue Mar 22, 2020
These changes allow to add links in the for gitlab repositories. The
logic in `_github_link` stays the same as before using basic url
checking. The option can be deactivated in the sphinx directive using
`no_github_link`.

OddBloke#56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant