mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[IMP] runbot_merge: logging of comment commands (or lack thereof)
This commit is contained in:
parent
381c504584
commit
0725c77323
@ -100,7 +100,7 @@ def handle_pr(event):
|
|||||||
'github_login': author_name,
|
'github_login': author_name,
|
||||||
})
|
})
|
||||||
|
|
||||||
_logger.info("%s: %s:%s (%s)", event['action'], repo.name, pr['number'], author.github_login)
|
_logger.info("%s: %s:%s (%s) (%s)", event['action'], repo.name, pr['number'], pr['title'].strip(), author.github_login)
|
||||||
if event['action'] == 'opened':
|
if event['action'] == 'opened':
|
||||||
# some PRs have leading/trailing newlines in body/title (resp)
|
# some PRs have leading/trailing newlines in body/title (resp)
|
||||||
title = pr['title'].strip()
|
title = pr['title'].strip()
|
||||||
@ -188,6 +188,14 @@ def handle_comment(event):
|
|||||||
if 'pull_request' not in event['issue']:
|
if 'pull_request' not in event['issue']:
|
||||||
return "issue comment, ignoring"
|
return "issue comment, ignoring"
|
||||||
|
|
||||||
|
_logger.info(
|
||||||
|
'comment: %s %s:%s "%s"',
|
||||||
|
event['sender']['login'],
|
||||||
|
event['repository']['full_name'],
|
||||||
|
event['issue']['number'],
|
||||||
|
event['comment']['body'],
|
||||||
|
)
|
||||||
|
|
||||||
env = request.env(user=1)
|
env = request.env(user=1)
|
||||||
partner = env['res.partner'].search([('github_login', '=', event['sender']['login']),])
|
partner = env['res.partner'].search([('github_login', '=', event['sender']['login']),])
|
||||||
pr = env['runbot_merge.pull_requests'].search([
|
pr = env['runbot_merge.pull_requests'].search([
|
||||||
|
@ -455,6 +455,12 @@ class PullRequests(models.Model):
|
|||||||
if ps is not None
|
if ps is not None
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not commands:
|
||||||
|
_logger.info("found no commands in comment of %s (%s) (%s%s)", author.github_login, author.display_name,
|
||||||
|
comment[:50], '...' if len(comment) > 50 else ''
|
||||||
|
)
|
||||||
|
return 'ok'
|
||||||
|
|
||||||
applied, ignored = [], []
|
applied, ignored = [], []
|
||||||
for command, param in commands.items():
|
for command, param in commands.items():
|
||||||
ok = False
|
ok = False
|
||||||
|
Loading…
Reference in New Issue
Block a user