pull requests extension

30 views
Skip to first unread message

Yann Hodique

unread,
Jan 16, 2012, 7:41:42 AM1/16/12
to Magit
Hey,

I thought I'd just share some piece of code that I wrote, and that's
helping me coping with the pull requests we receive on the github
magit repository.

This basically a simple extension that adds a new section "Pull
requests" to the magit-status buffer, allowing to fetch and manipulate
commits associated with the request (since they are real commit objects,
you can do pretty much whatever you want with them).

This allows reviewing the code with a good level of flexibility, and
with a reasonable level of automation (fare more reasonable than the
evil "Merge pull request" button in the github UI anyway :)).

code is here: https://github.com/sigma/magit-gh-pulls

Note that it depends on another one of my libraries:
https://github.com/sigma/magit-gh-pulls (a wannabe generic client
library for GitHub API) which itself also depends on
https://github.com/sigma/pcache

Yeah, I know... anyway, all this should be available on marmalade, so it
should all be a M-x package-install magit-gh-pulls away.

This extension and its dependencies are still in very early stages of
development, so expect a few bugs here and there.

Hope this can be useful anyway.

Yann.

--
Too much knowledge never makes for simple decisions.

-- CROWN PRINCE RAPHAEL CORRINO, Discourses on Leadership

Yann Hodique

unread,
Jan 16, 2012, 7:56:36 AM1/16/12
to Magit
>>>>> "Yann" == Yann Hodique <yann.h...@gmail.com> writes:

> Note that it depends on another one of my libraries:
> https://github.com/sigma/magit-gh-pulls (a wannabe generic client
> library for GitHub API)

Ooops, should be https://github.com/sigma/gh.el

Thanks Eli for noticing :)

Yann.

--
Like many culinary delicacies, revenge is a dish best savored slowly,
after long and delicate preparation.

-- EMPEROR ELROOD IX, Deathbed Insights

Rémi Vanicat

unread,
Jan 16, 2012, 12:34:48 PM1/16/12
to Yann Hodique, Magit
Yann Hodique <yann.h...@gmail.com> writes:

> Hey,
>
> I thought I'd just share some piece of code that I wrote, and that's
> helping me coping with the pull requests we receive on the github
> magit repository.
>
> This basically a simple extension that adds a new section "Pull
> requests" to the magit-status buffer, allowing to fetch and manipulate
> commits associated with the request (since they are real commit objects,
> you can do pretty much whatever you want with them).
>
> This allows reviewing the code with a good level of flexibility, and
> with a reasonable level of automation (fare more reasonable than the
> evil "Merge pull request" button in the github UI anyway :)).
>

It realy look cool. I will look at it, soon.
--
Rémi Vanicat

Thorsten Jolitz

unread,
Dec 1, 2012, 8:40:47 AM12/1/12
to ma...@googlegroups.com

> Yann Hodique <yann.h...@gmail.com> writes:
>
>> Hey,
>>
>> I thought I'd just share some piece of code that I wrote, and that's
>> helping me coping with the pull requests we receive on the github
>> magit repository.

Hallo,

I just installed

,-----------------------
| magit-gh-pulls 0.3
`-----------------------

from the package manager and tried to use Magit (via ' p) for a pull
request I recieved on github, but get the following error message:

,-----------------------------------------------------------------------------------
| Debugger entered--Lisp error: (json-readtable-error)
| signal(json-readtable-error nil)
|
| #[nil ...
| [char json-readtable record json-skip-whitespace :json-eof
| functionp apply signal json-readtable-error end-of-file nil] 4
| ("/home/tj/gitclone/emacs24-starter-kit/elpa/json-1.2/json.elc"
| . 13542)]()
|
| funcall(#[nil ...
| [char json-readtable record json-skip-whitespace :json-eof functionp
| apply signal json-readtable-error end-of-file nil] 4
| ("/home/tj/gitclone/emacs24-starter-kit/elpa/json-1.2/json.elc" .
| 13542)])
|
|
| json-read()
| magithub-retrieve-synchronously(("repos" "show" "tj64" "epil"))
| magithub-cached-repo-obj(nil nil)
| magithub-repo-parent-collaborators()
| magithub-read-pull-request-recipients()
| (list (magithub-read-pull-request-recipients))
| call-interactively(magithub-pull-request nil nil)
`-----------------------------------------------------------------------------------

PS
,--------------------------------------------------------------------------------------
| GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.2) of 2012-11-18 on eric
`--------------------------------------------------------------------------------------

--
cheers,
Thorsten

Yann Hodique

unread,
Dec 1, 2012, 1:35:43 PM12/1/12
to ma...@googlegroups.com
Hi Thorsten,

it seems the error you have is related to magithub, not magit-gh-pulls.

Thanks,

Yann.

--
When faced with necessary actions, there are always choices. So long as the
job gets done.

-- COUNT HASIMIR FENRING, Dispatches from Arrakis

Reply all
Reply to author
Forward
0 new messages