Python Bitbucket post管理服务挂钩
我想将提交消息获取到我的web应用 我正在做以下工作:Python Bitbucket post管理服务挂钩,python,git,githooks,webhooks,bitbucket-api,Python,Git,Githooks,Webhooks,Bitbucket Api,我想将提交消息获取到我的web应用 我正在做以下工作: 在我的git存储库中,添加了一个POST url为的POST服务 http://localhost:9000/myGitHook/or http://167.34.56.13:9000/myGitHook/ 在my URL.py中,我有: URLS = [r'/', Main, : : (r'/myGitHook/', GitHook), : : ]
URLS = [r'/', Main,
:
:
(r'/myGitHook/', GitHook),
:
:
]
上述url已正确映射到以下处理程序:
class GitHook(tornado.web.RequestHandler):
def get(self, *args, **kwargs):
print self.request
#do something
def post(self, *args, **kwargs):
print self.request
#do something
提前感谢。Bitbucket服务器需要访问您的钩子,而在本地主机上则无法访问。您可以尝试使用或类似的工具,它将代理您的本地web服务器并使其可供公众使用