SCM Web Hooks for reviewboard : Phase 1 [WIP]
Review Request #5483 — Created Feb. 16, 2014 and discarded
Generate url infrastructure for hosting services so that they can be called ro access web hooks. All code has been commented out because I was testing another change.
from __future__ import unicode_literals
import base64
import json
import logging
import mimetools
from django.utils.translation import ugettext_lazy as _
from djblets.util.compat import six
from djblets.util.compat.six.moves.urllib.parse import urlparse
from djblets.util.compat.six.moves.urllib.request import (
Request as URLRequest,
HTTPBasicAuthHandler,
urlopen)
from pkg_resources import iter_entry_points
class HostingService(object):
"""An interface to a hosting service for repositories and bug trackers.
HostingService subclasses are used to more easily configure repositories
and to make use of third party APIs to perform special operations not
otherwise usable by generic repositories.
A HostingService can specify forms for repository and bug tracker
configuration.
It can also provide a list of repository "plans" (such as public
repositories, private repositories, or other types available to the hosting