Hello,
if you like me in the past committed a fix to Spacewalk repo
referencing bugzilla which is not public, you might find the following
code useful. Just add it to .git/hooks/commit-msg and do
chmod a+x .git/hooks/commit-msg.
bugzilla_id=$( perl -lne 'if (/^(\d+) -/) { print $1 } exit' $1)
if [ -n "$bugzilla_id" ] ; then
if GET
"https://bugzilla.redhat.com/show_bug.cgi?id=$bugzilla_id&ctype=xml" | grep -q
'<bug error="NotPermitted">' ; then
echo "Bugzilla [$bugzilla_id] does not seem to be public.
Aborting."
exit 1
fi
fi
--
Jan Pazdziora
Senior Software Engineer, Satellite Engineering, Red Hat
_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel