This plugin is designed to respond to issues with a predefined message. It is useful for no-reply repositories, where users are directed to a different platform for support or to a parent repository for issues etc.
- Clone and install dependencies.
bun install
- Define your plugin's settings.
plugins:
- uses:
- plugin: http://localhost:4000
with:
automatedResponses:
"daemon-responder": "This is a no-reply repo, please visit the link in the issue description. Thank you!"
- Launch the plugin.
bun worker
- Launch the kernel (in Kernel repository).
bun dev
- Test your plugin by commenting on an issue you defined in step two.
bun worker
- to run the worker locally.- To trigger the worker,
POST
requests to http://localhost:4000/ with an event payload similar to:
await fetch("http://localhost:4000/", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
stateId: "",
eventName: "",
eventPayload: "",
settings: "",
ref: "",
authToken: "",
}),
});
A full example can be found here.
For testing purposes, the worker can be deployed through the Worker Deploy and Worker Delete workflows. It requires to
create a personal Cloudflare Account, and fill the CLOUDFLARE_ACCOUNT_ID
and CLOUDFLARE_API_TOKEN
within your
GitHub Action Secrets.