def make_node(rawtext, app, type_, slug, options):
    """ Create a github link """
    if app.config.github_user is None:
        raise ValueError(
            "Configuration value for 'github_user' is not set.")
    base_url = "https://github.com/%s/%s/" % (app.config.github_user,
                                              app.config.project)
    relative = '%s/%s' % (type_, slug)
    full_ref = urljoin(base_url, relative)
    set_classes(options)
    if type_ == 'issues':
        type_ = 'issue'
    node = nodes.reference(rawtext, type_ + ' ' + utils.unescape(slug),
                           refuri=full_ref, **options)
    return node
dataset/ETHPy150Open mathcamp/pypicloud/doc/extensions/github.py/make_node/original