Sun, 08 Jun 2014 23:24:46 +0300
- axed the python interfacing part completely..
pull-request.sh | file | annotate | diff | comparison | revisions | |
pullreq_to_mantisbt.py | file | annotate | diff | comparison | revisions |
--- 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
--- 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)