David Caro has posted comments on this change. Change subject: Added the common libraries for the hooks to use ......................................................................
Patch Set 3: (3 inline comments) .................................................... File hooks/lib/bz.sh Line 36: else Line 37: local cookie_jar="$(conf.t_get bz_cookie_jar)" Line 38: [[ -f ${cookie_jar?You have to login to bugzilla first, see bz.login} ]] Line 39: bug_cache="/tmp/bz_cache.$PPID.${bug_id}.${btype}" Line 40: wget -qO - \ Yes, there is a python sdk for bugzilla, but when I wrote these scripts I took a look on it and saw no easy way for adding external bug trackers (after that I've tried to figure out how to use it to update trackers with no luck :S, I'll have to ask someone from bugzilla). The fast alternative was writing this with bash, so I did. I still want to do it in python, if I have the time to do it I will. Line 41: --load-cookies "$cookie_jar" \ Line 42: --save-cookies "$cookie_jar" \ Line 43: "https://bugzilla.redhat.com/show_bug.cgi?id=${bug_id}${options}" \ Line 44: | tee "$bug_cache" Line 160: # Use that url instead of the default one (https://bugzilla.redhat.com) Line 161: # Line 162: bz.login() Line 163: { Line 164: local server_url="https://bugzilla.redhat.com" Ok, it should be easy enough to put it as a configuration parameter with redhat bugzilla as the default. Line 165: local OPTIND bug_id plain_bug Line 166: while getopts "s:b:" option; do Line 167: case $option in Line 168: s) server_url="$OPTARG";; Line 341: # POST -> MODIFIED Line 342: # Line 343: # If it's a revert any source status is allowed Line 344: # Line 345: bz.update_status() The check is done in the hook itself, as this function is generic for the upstream and downstream hooks. I'll send the other patches next week for you to see the whole picture. Line 346: { Line 347: bug_id="${1?}" Line 348: new_status="${2?}" Line 349: commit_id="${3?}" -- To view, visit http://gerrit.ovirt.org/15389 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a10060cff5c25e8bd8e2f73654208a90cec70d8 Gerrit-PatchSet: 3 Gerrit-Project: gerrit-admin Gerrit-Branch: master Gerrit-Owner: David Caro <dcaro...@redhat.com> Gerrit-Reviewer: David Caro <dcaro...@redhat.com> Gerrit-Reviewer: Eyal Edri <ee...@redhat.com> Gerrit-Reviewer: Itamar Heim <ih...@redhat.com> Gerrit-Reviewer: Moran Goldboim <mgold...@redhat.com> Gerrit-Reviewer: Ohad Basan <oba...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches