Re: [Spacewalk-devel] Commits should reference public bugzillas

2009-04-10 Thread Jan Pazdziora
On Wed, Apr 08, 2009 at 11:03:02AM +0200, Jan Pazdziora wrote:
> 
> Hello,
> 
> if you like me in the past committed a fix to Spacewalk repo

Note!

If you've for some reason parsed my previous email in such a way that
it made you think the commit hook is in the repo on fedorahosted.org
so you are automatically covered while running git push, please
re-read that previous email.

Thank you,

-- 
Jan Pazdziora
Senior Software Engineer, Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] Commits should reference public bugzillas

2009-04-08 Thread Jan Pazdziora

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 
'' ; 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
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel