Forum: Rails-core (closed, excessive spam) Lighthouse Rake Tasks

Posted by Scott Chacon (schacon)
on 2008-05-04 03:40
(Received via mailing list)
I just added a patch adding rake tasks to the rails project that list
and help apply patches in Lighthouse using the LH API.  This is to
help the patch application section of the new 'Sending Patches' page:

http://rails.lighthouseapp.com/projects/8994-ruby-...

It adds the following rake tasks:

rake patch:list           # list all open patch tickets
rake patch:show:ticket    # show patch ticket, include ID=XX
rake patch:show:attach    # outputs actual patch file, include ID=XX
rake patch:show:comments  # lists all comments on a ticket and adds up
the +1s
rake patch:setup          # setup your token, TOKEN=XXXX..
rake patch:comment        # review a patch - comment and optionally +1
it

One of the cooler things is that you don't need to go to LH and
download a patch file to apply it.  You can do something like this:

$ rake patch:show:attach ID=102 | git am

If this doesn't belong in the core, I can release it as a script or
something, I just thought it would be useful to build up rake tasks
that help simplify and solidify the patching process.

Let me know what you think.

Thanks,
Scott
Posted by Rick Olson (Guest)
on 2008-05-06 01:54
(Received via mailing list)
Hah, very cool.  Though I'd personally think it should be a plugin.
I'm not sure it's really needed for the majority of framework users vs
the (relatively) few contributors.

Also, maybe it should be prefixed with a 'rails' rake namespace?

On 5/3/08, Scott Chacon <schacon@gmail.com> wrote:
>  rake patch:show:ticket    # show patch ticket, include ID=XX
>  $ rake patch:show:attach ID=102 | git am
>
--
Rick Olson
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com
Posted by James Adam (Guest)
on 2008-05-09 15:29
(Received via mailing list)
On Tue, May 6, 2008 at 12:54 AM, Rick Olson <technoweenie@gmail.com> 
wrote:
>
> Hah, very cool.  Though I'd personally think it should be a plugin.
> I'm not sure it's really needed for the majority of framework users vs
> the (relatively) few contributors.

I'm not sure how it would work as a plugin (since a rails repo != a
rails app), but maybe if we could install it for use with sake[1],
then contributors could use it pretty easily.

[1]: http://errtheblog.com/posts/60-sake-bomb

--
* J *
 ~
Posted by Scott Chacon (schacon)
on 2008-05-27 22:16
(Received via mailing list)
I just released this as a ruby script:

http://github.com/schacon/git-lighthouse

It is something like git-trac - you can setup your account by running
this in your 'rails' checkout:

git config lighthouse.account rails
git config lighthouse.projectId 8994

Then you can list open tickets that have patches like this:

$ git-lh list

Date  Num  Attch  Title
05/01  87  1  Dependencies shouldn't swallow errors from required files.
05/02  94  2  quote_string don't work with some postgres drivers
05/08  142  1  belongs_to association not updated when assigning to 
foreign key
05/14  191  0  Belongs to polymorphic association assignment with new
records doesn't
05/14  192  1  AR Test failure on latest mysql

You can then test a patch like this:

$ git-lh checkout 94

Which will stash any changes that are pending, checkout the commit
closest to the time that ticket was created into a new branch called
'ticket94', and apply the patch.

Anyhow, hope you find it useful - let me know if there are any other
features that you would find helpful.

Scott
This topic is locked and can not be replied to.