32 suds_import = Import ('http://schemas.xmlsoap.org/soap/encoding/', \ |
32 suds_import = Import ('http://schemas.xmlsoap.org/soap/encoding/', \ |
33 'http://schemas.xmlsoap.org/soap/encoding/') |
33 'http://schemas.xmlsoap.org/soap/encoding/') |
34 suds_client = Client ('https://%s/api/soap/mantisconnect.php?wsdl' % bturl, \ |
34 suds_client = Client ('https://%s/api/soap/mantisconnect.php?wsdl' % bturl, \ |
35 plugins=[ImportDoctor (suds_import)]) |
35 plugins=[ImportDoctor (suds_import)]) |
36 |
36 |
37 data = suds_client.service.mc_issue_get (btuser, btpass, ticket) |
37 data={} |
|
38 data["status"]={} |
38 data["status"]["id"] = 60 |
39 data["status"]["id"] = 60 |
39 suds_client.service.mc_issue_update (btuser, btpass, ticket, data) |
40 suds_client.service.mc_issue_update (btuser, btpass, ticket, data) |
40 note = {} |
41 note = {} |
41 note["text"] = "https://bitbucket.org/%s/%s/pull-request/%s" % (match.group(1), match.group(2), match.group(3)) |
42 note["text"] = "https://bitbucket.org/%s/%s/pull-request/%s" % (match.group(1), match.group(2), match.group(3)) |
42 noteid = suds_client.service.mc_issue_note_add (btuser, btpass, ticket, note) |
43 noteid = suds_client.service.mc_issue_note_add (btuser, btpass, ticket, note) |
43 print "Pullrequest notice posted to mantisbt: https://%s/view.php?id=%s#c%s" % (bturl, ticket, noteid) |
44 print "Pull request notice posted to mantisbt: https://%s/view.php?id=%s#c%s" % (bturl, ticket, noteid) |
44 |
|