# HG changeset patch # User Santeri Piippo # Date 1402259086 -10800 # Node ID 9d63b4f82112c79e7744be4455a773d1490ed152 # Parent 7c02e457e6ab13588957947ce3896df8a4b803fb - axed the python interfacing part completely.. diff -r 7c02e457e6ab -r 9d63b4f82112 pull-request.sh --- a/pull-request.sh Sun Jun 08 19:24:37 2014 +0300 +++ b/pull-request.sh Sun Jun 08 23:24:46 2014 +0300 @@ -115,14 +115,4 @@ -d "$json" \ -o "$response" \ "https://api.bitbucket.org/2.0/repositories/${upstream}/pullrequests" \ - >/dev/stdout 2>&1 - -echo "response JSON: $response" - -# if [ -n "$bturl" -a -n "$btuser" -a -n "$btpass" -a -n "$ticket" ] -# then -# titlefile=$(tempfile) -# echo -n $title >$titlefile -# python $selfpath/pullreq_to_mantisbt.py "$bturl" "$btuser" "$btpass" "$ticket" "$response" "$titlefile" -# rm $titlefile -# fi \ No newline at end of file + >/dev/stdout 2>&1 \ No newline at end of file diff -r 7c02e457e6ab -r 9d63b4f82112 pullreq_to_mantisbt.py --- a/pullreq_to_mantisbt.py Sun Jun 08 19:24:37 2014 +0300 +++ b/pullreq_to_mantisbt.py Sun Jun 08 23:24:46 2014 +0300 @@ -34,11 +34,11 @@ suds_client = Client ('https://%s/api/soap/mantisconnect.php?wsdl' % bturl, \ plugins=[ImportDoctor (suds_import)]) -data = suds_client.service.mc_issue_get (btuser, btpass, ticket) +data={} +data["status"]={} data["status"]["id"] = 60 suds_client.service.mc_issue_update (btuser, btpass, ticket, data) note = {} note["text"] = "https://bitbucket.org/%s/%s/pull-request/%s" % (match.group(1), match.group(2), match.group(3)) noteid = suds_client.service.mc_issue_note_add (btuser, btpass, ticket, note) -print "Pullrequest notice posted to mantisbt: https://%s/view.php?id=%s#c%s" % (bturl, ticket, noteid) - +print "Pull request notice posted to mantisbt: https://%s/view.php?id=%s#c%s" % (bturl, ticket, noteid)