Giter Club home page Giter Club logo

issue-bot's Introduction

Godot Issuebot

Simple bot to ferry between rocket.chat and Github. If you want to run one for yourself you can build the container.

What does it do? It will add issue/pr links to messages that mention a valid issue. Either by typing #1335 to go to the default repository or repository#345 for a particular one. The bot will edit the message in question and add links, description, and status to the message.

Shortnames can be configured which could for instance map proposals#1 to godot-proposals#1 for commonly used repositories.

screenshot

Environment variables

The following environment variables are supported:

  • BOT_DEBUG - optional Turn on exessive debug messages when set
  • REPOSITORY_SHORTNAME_MAP - optional A space separated list form of shortname:fullname ... with repository shorthands and full names
  • DEFAULT_AVATAR_URL - required url to some image if gh can't provide an avatar
  • DEFAULT_REPOSITORY - required default repository to search if a 'bare' issue # gets sent
  • ROCKET_WS_URL - required url to the rocket.chat server (wss://chat.godotengine.org/websocket)
  • ROCKET_USERNAME - required username of the rocket.chat user to login as
  • ROCKET_PASSWORD - required password of the rocket.chat user
  • GITHUB_PROJECT - required github project to search in
  • GITHUB_USERNAME - required username to use for the github APIs
  • GITHUB_TOKEN - required github user token to authenticate to the APIs with

Running without a container

Requirements are pretty small, only python-requests and python-websockets are required. After that make sure you set the above env variables and you're good to go!

Running the bot through podman

Docker users can probable just replace podman with docker

  • clone the repostiory
  • podman build . -t issuebot:latest
  • podman run -it --env-file=env issuebot:latest

example env file:

BOT_DEBUG=true
DEFAULT_AVATAR_URL=https://chat.godotengine.org/avatar/github
DEFAULT_REPOSITORY=godot
GITHUB_PROJECT=godotengine
ROCKET_WS_URL=wss://chat.godotengine.org/websocket
ROCKET_USERNAME=github
ROCKET_PASSWORD=supersecret
GITHUB_USERNAME=hpvb
GITHUB_TOKEN=verysecret
REPOSITORY_SHORTNAME_MAP="assetlib:godot-asset-library demos:godot-demo-projects docs:godot-docs proposals:godot-proposals"

issue-bot's People

Contributors

aaronfranke avatar akien-mga avatar hpvb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

issue-bot's Issues

Use the correct fields after talking to rocket.chat

We currently use the following to construct the attachments:

                "author_icon": avatar_url,
                "author_link": issue['html_url'],
                "author_name": f"{repository.title()} [{issue_type}]: {issue['title']}  #{issue['number']}",
                "text": status,
                "ts": msg['ts'],

The reason for this is that on mobile tiles and tile links do not show up. However on desktop using this means that we can not collapse the extra fields. This smells like a bug somewhere but I'm not entirely sure where.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.