Skip to main content

MeeseeksBox

A base for stateless GitHub Bot.

See what is a MrMeeseeks and a MeeseeksBox

Hosted for you

We host MeeseeksBoxes and will expose them as GitHub Integrations so you don’t have to host and run your own, but you can if you want, it should be pretty simple.

The advantage of having One and only one box, is to do cross repository operations.

What can a MeeseeksBox do ?

@MrMeeseeks Hello

Respond with

Hello {user} look at me, I’m Mr Meeseeks

To test whether a Meeseeks understand you.

@MrMeeseeks backport [to]

If issued from a PR which is merged, attempt to backport (cherry-pick the merge commit) on an older branch and submit a PR with this backport (on said branch)

No option to push directly.

Repo admins only

@MrMeeseeks pep8ify

(in progress)

If issued from a PR, will apply autopep8 to the current lines changed by this PR, and push an extra commit to it that fixes pep8.

Code in progress and due to GitHub API limitation only works if MrMeeseeks also available on Source repo of the PR.

Repo admins only, plan to make it available to PR author as well.

@MrMeeseeks migrate [to]

Needs MeeseeksBox to be installed on both current and target repo. Command issuer to be admin on both.

MrMeeseeks will open a similar issue, replicate all comments with links to first, migrate labels (if possible).

Simple extension.

Most extension and new command for the MeeseeksBox are only one function, for example here is how to let everyone request the zen of Python:

from textwrap import dedent

@everyone
def zen(*, session, payload, arguments):
    comment_url     = payload['issue']['comments_url']
    session.post_comment(comment_url,
    dedent(
        """
        Zen of Pyton ([pep 20](https://www.python.org/dev/peps/pep-0020/))
        ```
        >>> import this
        Beautiful is better than ugly.
        Sparse is better than dense.
        ....
        Although never is often better than *right* now.
        Namespaces are one honking great idea -- let's do more of those!
        ```
        """
    ))

The session object is authenticated with the repository the command came from. If you need to authenticate with another repository with MeeseeksBox installed yield the org/repo slug.

@admin
def foo(*, session, payload, argument):
    other_session = yield 'MeeseeksBox/MeeseeksBox'
    if other_session:
        print('you are allowed to access MeeseeksBox/MeeseeksBox')
        other_session.do_stuff()
    else:
        session.post_comment("Sorry Jerry you are not allowed to do that.")

Why do you request so much permission ?

GitHub API does not allow to change permissions once given. We don’t want you to go though the process of reinstalling all integrations.

We would like to request less permission if necessary.

Setup.

These are the environment variable that need to be set.

  • INTEGRATION_ID The integration ID given to you by GitHub when you create an integration

  • BOTNAME Name of the integration on GitHub, should be without the leading @, and with the [bot]. This is used for the bot to react to his own name, and not reply to itself…

TODO

Metadata

Release files for meeseeksbox 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for meeseeksbox 0.0.4
File Interpreter ABI Platform
meeseeksbox-0.0.4-py3-none-any.whl Python 3 none any Details

Release files / meeseeksbox-0.0.4-py3-none-any.whl

Download URL meeseeksbox-0.0.4-py3-none-any.whl
Size 175.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
082cfb6cb6f6ab16f1984cb0c911352d6229fca1a289a9c9dffb8d865a1b0241
BLAKE2b-256 checksum
How to use checksums
31a2dd717642990f31ca89e70298c5e87f6a550082980991f4e4e0f244fcf535
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page