AuroraEditor / Aurora-Editor-Bot

This repo contains the code of our Github bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo

Aurora Editor GitHub Webhook Bot

Aurora Care Bear

Twitter Follow Discord


This is the repository for the Aurora Editor GitHub Webhook bot.
The bot is used to automate some tasks in the AuroraEditor organization.

Run

create a config.php file in the root directory with the following contents:

<?php
$settings = array(
    "username" => "my-bot-name",
    "admins" => array(
        "0xWDG",
        "my-bot-name"
    ),
    "github_token" => "GITHUB TOKEN",
    "discord_webhook" => "DISCORD WEBHOOK",
    "serverURL" => "Https url for debugging"
);

Note
Change all values to your own settings/values.

Run the webhook

Upload this to your server and serve it with PHP.

Tests

This section tells you how to test different payloads.

Note
Some payloads may not work in your environment.
if you have not the correct rights to AuroraEditor/Aurora-Editor-Bot.

Run all tests

sh test_all_payloads.sh

Run test (issue.json)

This simulates a new issue Aurora-Editor-Bot #24.

php index.php issue.json

Run test (please_assign_me.json)

This simulates a new comment in Aurora-Editor-Bot #24 saying @aurora-care-bear please assign me.

php index.php please_assign_me.json

Run test (pr.json)

This simulates a new PR Aurora-Editor-Bot #25.

php index.php pr.json

Run test (pr_reject.json)

This simulates a new comment in Aurora-Editor-Bot #25 from an admin saying @aurora-care-bear please reject this pr..

Warning
This will not execute if my-bot-name is not an admin.

php index.php pr_reject.json

Run test (pr_accept.json)

This simulates a new comment in Aurora-Editor-Bot #25 from an admin saying @aurora-care-bear please accept this pr..

Warning
This will not execute if my-bot-name is not an admin.

php index.php pr_accept.json

Run test (pr_closed.json)

This simulates the Aurora-Editor-Bot #25 being closed without merge, this should not trigger any action.

php index.php pr_closed.json

Run test (pr_merged.json)

This simulates the Aurora-Editor-Bot #25 being merged.

php index.php pr_merged.json

About

This repo contains the code of our Github bot

License:MIT License


Languages

Language:PHP 96.5%Language:Shell 3.5%