Skip to content

Commit

Permalink
update: parsable update summary in gerrit topic
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Ruzicka committed Feb 17, 2015
1 parent 3c5694e commit 09bd0df
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion rdopkg/actionmods/update.py
Expand Up @@ -119,6 +119,19 @@ def update_rdoinfo_check(update):
helpers.confirm("Submit anyway?")


def update_summary(update):
u = defaultdict(set)
for build in update.builds:
u[build.repo].add(build.dist)
s = ''
for rls in sorted(u.keys()):
if s:
s += '/'
s += rls
for dist in u[rls]:
s += '_' + dist
return s


class UpdateInfo(object):
def __init__(self, upf, update, authors,
Expand Down Expand Up @@ -162,7 +175,8 @@ def submit_update_file(self, id, msg=''):
with self.repo_dir():
if not os.path.isfile(upfile_path):
raise exception.UpdateFileNotFound(path=upfile_path)
branch = 'update/%s' % id
update = rdoupdate.actions.check_file(upfile_path)
branch = update_summary(update)
commit_msg = "New %s" % id
if msg:
commit_msg += "\n\n%s\n" % msg
Expand Down

0 comments on commit 09bd0df

Please sign in to comment.