Under some circumstances, it is useful to be able to add an extra set of ccs to a newly created bug. Add a check for a file 'extra-cc' which contains e-mails to add to a new bug.
Signed-off-by: Laura Abbott <[email protected]> --- src/plugins/reporter-bugzilla.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/plugins/reporter-bugzilla.c b/src/plugins/reporter-bugzilla.c index 38f48ef..c074d51 100644 --- a/src/plugins/reporter-bugzilla.c +++ b/src/plugins/reporter-bugzilla.c @@ -638,8 +638,22 @@ int main(int argc, char **argv) if (dd) { report_result_t *reported_to = find_in_reported_to(dd, tracker_str); + char *extra = dd_load_text_ext(dd, "extra-cc", + DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE | + DD_FAIL_QUIETLY_ENOENT); + dd_close(dd); + if (extra != NULL) { + char *email = strtok(extra, "\n"); + while (email != NULL) { + log(_("Adding extra cc %s to bug report\n"), email); + rhbz_mail_to_cc(client, new_id, email, /* require mail notify */ 0); + email = strtok(NULL, "\n"); + } + free(extra); + } + if (reported_to && reported_to->url) { log(_("Adding External URL to bug %i"), new_id); -- 2.4.1
