Git Product home page Git Product logo

open-bot's Introduction

open-bot

An unopinionated bot driven by a configuration file in the repository.

  • Operates on issue/PRs
  • Triggered by webhook event or manual batch processing (CLI)
  • Rules specify behavior
  • Runs on AWS with serverless

Configuration

  • Add the bot's webhook to the webhooks in the repo/org configuration (content type json, events: Issue comment, Issues, Pull request, Pull request review, Pull request review comment, Status)
  • Create a open-bot.yaml file in the repository root.
  • Add the bot name to the yaml file (bot property)
  • Add rules to the rules property (array) see Rules

How does it work?

It checks all filters to get the lastest date where the filter matches. If not all filters match it stops here.

For each action it checks if and when the action was already applied. If yes it compares action date if lastest filter date and breaks if action was applied after filter match. Elsewise it runs the action.

This means: It makes sure that actions runs once after filters match. If filters match again, actions run again.

Deploy your own bot

  • Clone the repo
  • Run yarn
  • Run node open-bot configurate and answer questions
  • Run yarn run deploy-prod to deploy the bot (takes a while)
  • Run node open-bot to gain access to the other tools, i. e. batch processing

Contributing

Add new filters or actions

  • Add a file in the folder
  • Edit the index.js file
  • Test it locally with node open-bot process some/repo#123 --settings open-bot.yaml --simulate
  • Send a PR

License

Free for open-source projects.

Get in contact with me if you want to use it for private repos.

open-bot's People

Contributors

chrisdothtml avatar dependabot[bot] avatar dominikguzei avatar evenstensberg avatar ferhatelmas avatar ndelangen avatar okonet avatar sokra avatar

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.