[ADD] runbot_merge: allow resolving commits by sha

`_rec_name = 'sha'` means name_search and cross-model searches will
work much better.

Relates to #802
This commit is contained in:
Xavier Morel 2023-08-25 10:59:48 +02:00
parent 0826b3484b
commit 7bca6f0bd7

View File

@ -1711,6 +1711,7 @@ class Commit(models.Model):
statuses only, by PR pushes, by branch updates, ...
"""
_name = _description = 'runbot_merge.commit'
_rec_name = 'sha'
sha = fields.Char(required=True)
statuses = fields.Char(help="json-encoded mapping of status contexts to states", default="{}")