pullreq_to_mantisbt.py

changeset 5
9d63b4f82112
parent 4
7c02e457e6ab
equal deleted inserted replaced
4:7c02e457e6ab 5:9d63b4f82112
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

mercurial