mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #16154
[Bug 1266630] Re: Set up an automatic gerrit hook to notify Launchpad when a new patch is created for a bug.
Success! As you can see above, the hook posted a comment to this bug
thread when I uploaded a patch with this bug number in its commit
message.
A few notes:
1. I'm keeping the patch upload message short and sweet, just the branch
name and the patch URL. This is because the full commit message gets
posted when the patch is merged, so we don't need to bother doing it
twice. Plus the commit message might change before it passes code review
anyway.
2. To minimize the amount of emails generated, I'm only posting a
comment for each change's first patchset. So if the correct bug number
isn't present in the commit message on the first patchset, you'll still
need to come into Launchpad and post the URL manually.
3. I'm also not bothering with automated posts about abandoned patches.
If a bug has abandoned patches, then likely its code review history will
be too confusing for the automated postings to help out with it, and you
should just post a comment saying "here's the real patch for this bug".
4. Draft changes won't send an email to Launchpad either. This was an
intentional decision, because we use draft changes for security patches,
so it's probably best not to automatically post their URL. If you're
publishing a draft change for a security bug, you'll still need to copy
the URL into Launchpad manually.
Anyway, I'll upload the new patchset-merged script into the mahara-
scripts repo on gitorious.
Cheers,
Aaron
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1266630
Title:
Set up an automatic gerrit hook to notify Launchpad when a new patch
is created for a bug.
Status in Mahara ePortfolio:
Fix Released
Bug description:
We've got a "change-merged" hook script set up in reviews.mahara.org,
which automatically posts a comment to Launchpad when a patch is
merged and the patch commit message contains a launchpad bug number.
I think it would be nice to have a similar script to automatically
post a comment when a patch is first uploaded into gerrit. That way, a
person looking at the Launchpad bug will be able to easily see that
there's a patch waiting to be reviewed for that bug. Currently, we ask
developers to post such a comment manually, but they often forget to
do that.
So, since there's an appropriate gerrit hook (
https://git.eclipse.org/r/Documentation/config-
hooks.html#_patchset_created ) we might as well do it automatically.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1266630/+subscriptions
References