API to change milestones

Craig craig5 at pobox.com
Wed Jul 16 23:39:47 UTC 2008


Tosh, Michael J wrote:
> cp editmilestones.cgi editmilestones.pl
> Then check each reference to $cgi->params() and read an argument or
> <STDIN> instead.

Fair enough.

One small issue concerns the login. This is a script that will be run 
from another script and the entire thing is probably going to be 
automated. So, requiring a login/pw is a problem. I was thinking that 
the perl script could look for env var with the desired login to use. 
(Basic idea is to create a generic account for all "automated processes.")

As far as security, I figured that if someone has access to the scripts, 
then they probably have access to "localconfig", which means they can 
cause a lot more damage. Is this a reasonable assumption? (I realize 
that the permissions CAN be different, but I don't know how common that is.)

> (It would be pretty neat to run:
>  "echo delete \n myproduct \n mymilestone \n |editmilestones.pl")

For *my particular case*, it would probably be something like
	editmilestones.pl --add product new-milestone

("editmilestones.pl product" wuld simply give a list of the current 
milestones.)

But, I am more than open to other ideas.

> Editmilestones.cgi is only 360 or so lines and MUCH of it is comments

Ya, it seems pretty straight forward.

> and whitespace.  Be sure to submit it as a contrib script for the rest
> of us to share! ;-)

Of course. :)

> (using this script to start with is good because it already has the
> Bugzilla structure built in with validation and Bugzilla objects and
> much of the hard work is done.)

Definitely. For a newbie to the code, dealing with things like tokens 
was really more than I waned to bite off right now. :)

I'll post the script when I'm done.

Thanx for the help/ideas.

Craig



More information about the developers mailing list