Add btype to protonmsg

Fixes: https://pagure.io/koji/issue/1217
This commit is contained in:
Jana Cupova 2021-06-21 08:25:10 +02:00 committed by Tomas Kopecek
parent cfcf900e25
commit e689602be5
3 changed files with 54 additions and 12 deletions

View file

@ -17,7 +17,7 @@ from proton.reactor import Container
import koji
from koji.context import context
from koji.plugin import callback, convert_datetime, ignore_error
from kojihub import QueryProcessor, InsertProcessor
from kojihub import QueryProcessor, InsertProcessor, get_build_type
CONFIG_FILE = '/etc/koji-hub/plugins/protonmsg.conf'
CONFIG = None
@ -210,11 +210,13 @@ def prep_build_state_change(cbtype, *args, **kws):
old = koji.BUILD_STATES[old]
new = koji.BUILD_STATES[kws['new']]
address = 'build.' + new.lower()
btypeinfo = get_build_type(kws['info'])
kws['info'] = _strip_extra(kws['info'])
props = {'type': cbtype[4:],
'name': kws['info']['name'],
'version': kws['info']['version'],
'release': kws['info']['release'],
'btypes': btypeinfo,
'attribute': kws['attribute'],
'old': old,
'new': new}