From: Mel Hatzis <mel@wattes.org>
To: Tim Buck <tbuck@rrinc.com>
Cc: help-gnats@gnu.org
Subject: Re: Different mail-format or on-change action for particular Category
Date: Wed, 25 May 2005 00:24:00 -0000 [thread overview]
Message-ID: <4293BDEB.7060907@wattes.org> (raw)
In-Reply-To: <84B55544-0322-420B-B055-86C4499A8EAA@rrinc.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tim Buck wrote:
> Is there any way to have GNATS use a different mail-format or apply
> a different on-change action depending on the category of the PR,
> or depending on whether or not a PR is marked confidential?
Not currently, however I've developed exactly this functionality
for my employer and it's proved to be extremely useful. I was planning
on incorporating this to the official GNATS project over the next month
or two.
The way it works is that each mail-format definition has a
mandatory 'trigger' associated with it (e.g. "on-create",
"on-append", etc). Furthermore, each trigger can be specified with
an optional condition constraining when the trigger is "fired".
So, a mail-format definition in dbconfig looks like:
#
# This format is used for initial PRs that end up as pending PRs.
#
mail-format "initial-pr-notification-pending" {
trigger on-create "Category==\"pending\""
from-address {
"From:" | "From"
}
to-addresses {
fixed-address "gnats-admin" "Reply-To:" | "From:"
"Notify-List"
}
...etc
}
The GNATS code is modified so that rather than sending email
notifications of hardwired mail-format names, it sends email
based on the triggers. You can have multiple mail-formats
defined to trigger "on-create" for example (nominally with
different trigger conditions) and the relevant notifications
will be sent out based on which trigger conditions are applicable
to the state of the PR.
The mail-format names are essentially unused...they have been
retained for potential logging/error reporting.
- --
Mel Hatzis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCk73qNF74HmYqaSERAstTAJ0bVv/9CDUHbk3KQ9wcNysXkqwYiQCgmQQZ
EwcMk5KY29IOSVAt4n8NyPs=
=qQM7
-----END PGP SIGNATURE-----
_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnats
next prev parent reply other threads:[~2005-05-25 0:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-24 20:41 Tim Buck
2005-05-24 22:32 ` Chad Walstrom
2005-05-25 0:24 ` Mel Hatzis [this message]
2005-05-25 1:54 ` Tim Buck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4293BDEB.7060907@wattes.org \
--to=mel@wattes.org \
--cc=help-gnats@gnu.org \
--cc=tbuck@rrinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).