GitHub Automation, migrating issues.

60 views
Skip to first unread message

Matthias Bussonnier

unread,
Dec 27, 2016, 8:50:48 AM12/27/16
to IPython developers list, jup...@googlegroups.com
Hi all,

[Cross posting IPython-dev and Jupyter Google group]

Hope you are enjoying the lasts few days of 2016 !

I've been recently working on GitHub automation, in particular we have
local scripts that we need to run locally to do some common tasks on
github, like migrating issues, backporting PR... etc.

It is a bit inconvenient as you have to interrupt your workflow, go to
a terminal, and issues commands you never remember the syntax, and
need to copy/past issues url. So I decided to write a bot to do some
of these chores for us when it is mentioned.

Right now it only respond to a limited number of commands, but you
should be able to activate it on any repository and it will respond to
commands as long as you are admin (migration requires you to be admin
on both repositories, for example). You do _not_ need to host it.

It is hardcoded (for now) to respond only to me, but I can easily
whitelist more people if asked[4].

For now I've name it Mr Meeseeks, which you will understand if you've
seen Rick and Morty season 1. Otherwise you can watch the relevant
part [1].

Here is the first example of usage on the IPython and Jupyter org[2]:

> @Meeseeksdev[bot] migrate to jupyter/qtconsole

Replicated issue ipython/ipython#1322 to jupyter/qtconsole#177 [3]

Mr Meeseeks also know how to backport PR for small repositories
(cherry pick -m merge commit) and submit a PR on the branch you;d like
to backport to. On a merged PR:

> @Meeseeksdev[bot] backport to 1.x

I'm hoping to extend that a bit to extend the functionalities and let
user tag/untag (with a limited set of tag ?). There is a bunch of
possibility but right now this is using a GitHub Beta API so things
possible are limited.

At some point it could allow a number of truster user to be able have
a finer grain permission model than GitHub and let everyone access to
issue tagging/closing/opening, restarting test without always giving
commit rights. I'm thinking about how to have per org/repo
configuration/customisation/isolation. I'm also hoping to convince
GitHub to extend their API to allow for automatic fixes on PR and/or
help to find workaround the limitations.

This mail is already a bit long, I'll develop how we can improve this
somewhere else.

If you have any questions ...

Cheers,
--
Matthias

[1]: Warning, "Rick and Morty" is known to have harsh language and
character behavior. This extract should be relatively gentle though.
https://www.youtube.com/watch?v=qUYvIAP3qQk (duration 1min8sec)
[2]: https://github.com/ipython/ipython/issues/1322#issuecomment-269317754
[3]: https://github.com/jupyter/qtconsole/issues/177
[4]: https://github.com/MeeseeksBox/

Jonathan Frederic

unread,
Dec 27, 2016, 11:47:35 AM12/27/16
to IPython developers list, jup...@googlegroups.com

I love the name of the bot!


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CANJQusUXf0nigFYmmMLfbVhdLnbn8gOW8sMiXQ-HL2Hqz51cWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Fernando Perez

unread,
Dec 30, 2016, 5:22:12 PM12/30/16
to Project Jupyter, IPython developers list
On Tue, Dec 27, 2016 at 5:50 AM, Matthias Bussonnier <bussonnie...@gmail.com> wrote:
Hi all,

[Cross posting IPython-dev and Jupyter Google group]

Hope you are enjoying the lasts few days of 2016 !

I've been recently working on GitHub automation, in particular we have
local scripts that we need to run locally to do some common tasks on
github, like migrating issues, backporting PR... etc.

[...]

Matthias, this is excellent, many thanks!  Once you're happy with the workflow and perhaps a few more folks have kicked the tires, this would make a great little team tutorial/demo that we can record and have available for the future...

Happy New Year!

Cheers


MinRK

unread,
Jan 2, 2017, 7:01:24 AM1/2/17
to Project Jupyter
Very cool, thanks Matthias!

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

Matthias Bussonnier

unread,
Jan 9, 2017, 10:12:36 AM1/9/17
to jup...@googlegroups.com
Hi all,

The bot is slowly coming along, I've whitelisted a few more people and
org [1] but did not get much people using it or giving me feedback.

Reminder, the usage is relatively simple, in a comment on an issue or
PR, mention the bot followed by what you want it to do. I'm trying to
keep the readme[3] up to date.

Assuming you had the right set of permissions, right now you can:
- migrate issues
- backport PR.

I added a couple functionality mainly allowing you to do things by mail.
- close
- reopen
- add labels
- remove labels

If you install the bot on your own fork[2] of a repository you should
be able to also:
- have the bot automatically fix pep8 on your PRs.

It only touches the lines you have already changed thanks to pep8radius.
The necessity to install it on your fork is a limitation for now, I'm
hoping to circumvent.

It also now auto deploys from GitHub to heroku, which should ease the
development.
--
M


[1] : https://github.com/MeeseeksBox/MeeseeksDev/blob/master/meeseeksdev/__init__.py#L4-L15
[2] : https://github.com/integration/meeseeksdev
[3] : https://github.com/MeeseeksBox/MeeseeksDev#what-can-a-meeseeksbox-do-
>> email to jupyter+u...@googlegroups.com.
>> To post to this group, send email to jup...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jupyter/CANJQusUXf0nigFYmmMLfbVhdLnbn8gOW8sMiXQ-HL2Hqz51cWg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CAHNn8BUkyUa4H4D5uGZ6KoKvDs3t1A%2BanPre4APbefEoyob9Qw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages