lewiscawte / CIA.vc

Automatically exported from code.google.com/p/cia-vc
1 stars 0 forks source link

add optional authentification to xmlrpc commit pushes #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. You will need to have this in a python script:

class CIA:
        def __init__(self, project, server="http://cia.navi.cx",
module="Issue tracker"):
                self.project=project
                self.module=module
                self.server=xmlrpclib.ServerProxy(server)

        def message(self, ticket, author, message):
                ticket=" #%s" % ticket
                generator="<generator><name>CIA Trac
plugin</name><version>0.1</version></generator>"

source="<source><project>%s</project><module>%s</module></source>" % \
                        (self.project, self.module)

body="<body><commit><revision>%s</revision><author>%s</author><log>%s</log></com
mit></body>"
% \
                (ticket, author, message)

                return "<message>"+generator+source+body+"</message>"

        def __call__(self, ticket, author, message):
                body=self.message(ticket, author, message)
                self.server.hub.deliver(body)

cia = CIA(project="cia", server="http://cia.navi.cx", module="ticket " + "new")
cia("31337", "This message got send without authentication", "[%s] %s %s" %
("31337", "xmlrpc lacks authentication"
, "http://cia.vc/")) 

2. Then you need to adjust the project name like e.g. just take one you
find here:
http://cia.vc/account/bot-cloud/
http://cia.vc/stats/project

3. Run the python script by: python script.py

What is the expected output? What do you see instead?

The expected output will be your advertisment on the irc channel
belonging to the project.

What version of the product are you using? On what operating system?

Please provide any additional information below.

It needs an xmlrpc authentication to secure the behaviour.
Sorry for spoiling the Ticket-Summary by bad words.

Original issue reported on code.google.com by rfroehli...@gmail.com on 26 Feb 2008 at 10:05

GoogleCodeExporter commented 9 years ago
I call this a feature request.

Thanks for sharing your script with the wide world, let's count the days until 
the 
kiddies find it.

Original comment by Unbearab...@gmail.com on 26 Feb 2008 at 12:02

GoogleCodeExporter commented 9 years ago
Oh, that script is part of your own link here:
http://cia.vc/doc/clients/

Original comment by rfroehli...@gmail.com on 26 Feb 2008 at 12:33