mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot_merge: don't blow the fetch loop when a PR has no label
No test because I don't understand how / why it's triggered, it's just that some PRs don't have a label. I assumed the issue occurred when the source branch or even repo (cross-repo PR) was deleted, but it doesn't seem to trigger the issue (or in any case not in as short a time as a test, maybe GH eventually does some vacuuming which causes the issue? Anyway we may eventually want to reclaim these PRs (allowing a lack of label and treating them like the patch-\d labels: with no semantic value) however the simplest thing to do for now is to just ignore the corresponding PR. closes #101
This commit is contained in:
parent
55ece42d8f
commit
0cd587fce7
@ -148,7 +148,13 @@ class Project(models.Model):
|
||||
if not f:
|
||||
return
|
||||
|
||||
f.repository._load_pr(f.number)
|
||||
self.env.cr.execute("SAVEPOINT runbot_merge_before_fetch")
|
||||
try:
|
||||
f.repository._load_pr(f.number)
|
||||
except Exception:
|
||||
self.env.cr.execute("ROLLBACK TO SAVEPOINT runbot_merge_before_fetch")
|
||||
_logger.exception("Failed to load pr %s, skipping it", f.number)
|
||||
self.env.cr.execute("RELEASE SAVEPOINT runbot_merge_before_fetch")
|
||||
|
||||
# commit after each fetched PR
|
||||
f.active = False
|
||||
|
Loading…
Reference in New Issue
Block a user