372
372
def report_to_launchpad(mp, message, revision, status=None, vote=None):
373
"""Set the status and send a message to Launchpad for an merge proposal.
375
:param mp: handle to merge proposal
376
:param message: text message to post as a message
377
:param revision: revision number for the proposal
378
:param status: Launchpad status to set the propsal to
379
:param vote: how the message should vote on the proposal
374
382
mp.setStatus(status=status, revid=revision)
376
mp.createComment(review_type=get_config_option('launchpad_review_type'),
385
review_type=get_config_option('launchpad_review_type'),
378
387
subject=get_vote_subject(mp),
381
mp.createComment(review_type=get_config_option('launchpad_review_type'),
391
review_type=get_config_option('launchpad_review_type'),
382
392
subject=get_vote_subject(mp),
386
396
def get_template_args(result, revision, build_url, merge_url):
397
"""Collect a set of information for rendering templates
399
:param result: Result of the tests, either PASSED or FAILED
400
:param revison: The revision number of the merge
401
:param build_url: URL to the build triggered in jenkins
402
:param merge_url: URL to the merge proposal
387
404
jenkins = get_json_jenkins()
389
406
args['result'] = result