mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[FIX] runbot: skip github API calls if repo has no token, instead of crashing/logging an exception
Avoids spurious errors for the github status updates
This commit is contained in:
parent
e0103ed3f0
commit
7137c49ec5
@ -225,6 +225,8 @@ class runbot_repo(osv.osv):
|
|||||||
def github(self, cr, uid, ids, url, payload=None, ignore_errors=False, context=None):
|
def github(self, cr, uid, ids, url, payload=None, ignore_errors=False, context=None):
|
||||||
"""Return a http request to be sent to github"""
|
"""Return a http request to be sent to github"""
|
||||||
for repo in self.browse(cr, uid, ids, context=context):
|
for repo in self.browse(cr, uid, ids, context=context):
|
||||||
|
if not repo.token:
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
match_object = re.search('([^/]+)/([^/]+)/([^/.]+(.git)?)', repo.base)
|
match_object = re.search('([^/]+)/([^/]+)/([^/.]+(.git)?)', repo.base)
|
||||||
if match_object:
|
if match_object:
|
||||||
|
Loading…
Reference in New Issue
Block a user