* Python script to send mail
@ 2017-02-28 8:00 Gargi Sharma
2017-02-28 8:28 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Gargi Sharma @ 2017-02-28 8:00 UTC (permalink / raw)
To: outreachy-kernel
[-- Attachment #1.1: Type: text/plain, Size: 190 bytes --]
Hi,
I wrote a script to send a mail to all the maintainers for the most recent
patch.
Please find the script attached with this mail. Appreciate any feedback you
might have.
Thanks,
Gargi
[-- Attachment #1.2: Type: text/html, Size: 240 bytes --]
[-- Attachment #2: send-email.py --]
[-- Type: text/x-python, Size: 1261 bytes --]
'''
Author: Gargi Sharma
Script to sending a mail for the most recent patch/patchset.
To send a patchset, specify the directory where all the patches
for the patchset are present.
'''
import commands
from subprocess import call
import sys
import os
#the command for shell to execute
command = 'git send-email --to=outreachy-kernel@googlegroups.com'
if(len(sys.argv)<2):
print "Please specify a patch/patchset directory to send."
sys.exit()
#if the patch/patchset if for the iio driver include the iio mailing list
if(argv[2]=="iio"):
command = command + " --cc=linux-iio@vger.kernel.org"
#get the maintainer list for the most recent commit
maintainer_list = commands.getstatusoutput('git show HEAD | perl scripts/get_maintainer.pl --separator , --nokeywords --nogit --nogit-fallback --norolestats --nol')[1]
#cc individual maintainer on the list
maintainers = maintainer_list.split(',')
for maintainer in maintainers:
command = command + ' --cc='+ maintainer[maintainer.find("<")+1:maintainer.find(">")]
#add the patch/patchset to the command
command = command+" "+ sys.argv[1]
#split the individual terms in the command for input to call
input_arg = command.split(" ")
#call the function that runs git send-mail from the shell
call(input_arg)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] Python script to send mail
2017-02-28 8:00 Python script to send mail Gargi Sharma
@ 2017-02-28 8:28 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2017-02-28 8:28 UTC (permalink / raw)
To: Gargi Sharma; +Cc: outreachy-kernel
On Tue, 28 Feb 2017, Gargi Sharma wrote:
> Hi,
>
> I wrote a script to send a mail to all the maintainers for the most recent patch.Please find the script attached with this mail. Appreciate any feedback you might have.
Thanks for sharing it!
julia
>
> Thanks,
> Gargi
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAOCi2DHRWdVv_LXRcQ60Xs_NmkroOf4jBbW2NKF%3D0ckfzd391w%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-28 8:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 8:00 Python script to send mail Gargi Sharma
2017-02-28 8:28 ` [Outreachy kernel] " Julia Lawall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.