mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +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):
|
||||
"""Return a http request to be sent to github"""
|
||||
for repo in self.browse(cr, uid, ids, context=context):
|
||||
if not repo.token:
|
||||
return
|
||||
try:
|
||||
match_object = re.search('([^/]+)/([^/]+)/([^/.]+(.git)?)', repo.base)
|
||||
if match_object:
|
||||
|
Loading…
Reference in New Issue
Block a user