clszzyh / elixir_bot

πŸš€ A Github Bot by Elixir.

Home Page:https://clszzyh.github.io/elixir_bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ci Hex.pm Hex.pm Documentation

demo

Usage

## .github/workflows/event.yml
name: event

on:
  workflow_dispatch:
  issue_comment:
    types: [created, edited]
  issues:
    types: [opened, edited]

jobs:
  exbot:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: clszzyh/elixir_bot@main

Eval Elixir Code

Create an issue or comment with

​```elixir
## @ex-bot
r factorial = fn
  1 -> 1
  n -> n * factorial.(n - 1)
end

factorial.(22222)
​```

See also sand package for elixir sandbox.

Commands

Create an issue or comment with

@ex-bot {{command}} {{args}}
Command Args Description
@ex-bot ping pong
@ex-bot version print current version

TODO

  • Permission (check issue owner)
  • Dynamic invoke tentacat

About

πŸš€ A Github Bot by Elixir.

https://clszzyh.github.io/elixir_bot

License:MIT License


Languages

Language:Elixir 93.5%Language:Dockerfile 2.9%Language:HTML 2.0%Language:Shell 1.7%