github/janky — pull request #127 by Iristyle (2012-12-18 22:52:03+00:00)
Title: Provide additional parameter in ci setup / Hubot endpoint to accept template

When there are lots of jobs that have more than one standard build configuration, the current match up of `job` to `job.xml.erb`, with only a single fallback of `default.xml.erb` is inconvenient. If there is a secondary standard build configuration, then every job that uses that secondary build configuration has to now have a `name.xml.erb` file instead of being able to share a single file.

I would like to see an additional parameter at the `_hubot` route named `template` in addition to `nwo` and `name`.

At the moment when the command is issued from Hubot to Janky, you may perform a `ci setup owner/repo name` -- and then that name is matched to `config/name.xml.erb` to find a custom template if it exists. I would like to see the command extended to `ci setup owner/repo name template` that would look for `config/template.xml.erb`

Changes would have to be made at

* https://github.com/github/janky/blob/master/lib/janky/hubot.rb#L15 - To accept the post parameter `template`
* https://github.com/github/janky/blob/master/lib/janky/repository.rb#L164 - To accept / use the new `template` param to find the file on disk
* https://github.com/github/hubot-scripts/blob/master/src/scripts/janky.coffee#L91 - To modify the `setup` command to accept an optional `template` parameter as the final parameter

I think that's it to make this work... thoughts? /cc @rsanheim