From 00d4e2dd598ed7a834e396ba96bc439241637102 Mon Sep 17 00:00:00 2001 From: NotNite Date: Sat, 11 Jun 2022 14:05:55 -0400 Subject: [PATCH 1/5] Add Bleatbot DIP --- text/00-bleatbot.md | 80 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 text/00-bleatbot.md diff --git a/text/00-bleatbot.md b/text/00-bleatbot.md new file mode 100644 index 0000000..9db2073 --- /dev/null +++ b/text/00-bleatbot.md @@ -0,0 +1,80 @@ +- Feature Name: (fill me in with a unique ident, `my_awesome_feature`) +- Start Date: (fill me in with today's date, YYYY-MM-DD) +- DIP PR: [goatcorp/DIPs#0000](https://github.com/goatcorp/DIPs/pull/0000) +- Repo-Relevant Issue: [goatcorp/dalamud#0000](https://github.com/goatcorp/dalamud/issues/0000) + +# Summary + +[summary]: #summary + +Introducing Bleatbot, a GitHub bot designed to help manage issues and pull requests for various repositories (support, plugin submissions, DIPs, etc.). + +# Motivation + +[motivation]: #motivation + +There are many problems with GitHub issues: + +- It is difficult to provide support via GitHub issues. Franzbot (the FAQ bot in the Goat Place Discord server) does not exist outside of Discord, so the support team does not have an easy way to provide common troubleshooting steps. +- Issues and pull requests often are forgotten about and become stale, left open for extended periods of time. While Caprine Operator exists to help plugin PRs, there is no functionality to help clean up issues. +- The DIP process is manual, done by humans, even including the merge process. + +# Guide-level explanation + +[guide-level-explanation]: #guide-level-explanation + +In the comments of a issue/pull request on a goatcorp GitHub repository, members of the goatcorp GitHub group can execute any of the following commands: + +- `@bleatbot faq ` - Post an FAQ entry. +- `@bleatbot autoClose ` - Automatically close an issue after the specified time (e.g `24h`). +- `bleatbot autoMerge ` - Automatically merge a pull request after the specified time (e.g. `24h`). + +TODO + +# Reference-level explanation + +[reference-level-explanation]: #reference-level-explanation + +Bleatbot is written in TypeScript. Its source code is available in the [NotNite/bleatbot](https://github.com/NotNite/bleatbot) GitHub repository. + +It uses SQLite as its database (through Prisma), Octokit to use the GitHub API, and Koa to receive events through a webhook. + +Each GitHub repository has a webhook added to it, which points to an HTTP server the Bleatbot codebase runs. Upon an event, the webhook is triggered and validated, and the command is parsed and ran. + +# Drawbacks + +[drawbacks]: #drawbacks + +- Data storage of any kind is a liability. +- This adds complexity to the core Dalamud ecosystem, both as a result of being an additional tool and through its terminology/commands. +- Server resources are required to host Bleatbot. + +# Rationale and alternatives + +[rationale-and-alternatives]: #rationale-and-alternatives + +- As a member of the support team myself, it is annoying to either type out a long-winded sentence or redirect users to our Discord server, because we do not have the proper functionality desired. +- I chose TypeScript because I like TypeScript. This would work as well in other languages, it's just what I'm comfortable in. I have no excuses. +- I chose the libraries I used because they either fit TypeScript well, I'm comfortable with them, or they were suggested to me by ackwell. + +# Prior art + +[prior-art]: #prior-art + +Franzbot is prior art regarding the FAQ system. It has proven to be massively helpful in the Discord server, where we receive a lot more users needing support. + +Many GitHub bots with command functionality & auto merging exist for communities, but there are far too many to list. + +# Unresolved questions + +[unresolved-questions]: #unresolved-questions + +- What other features does Bleatbot need? +- Does any command need to be renamed? + +# Future possibilities + +[future-possibilities]: #future-possibilities + +- More FAQ entries +- Integration with the Caprine Operator From bc6f35ec39df5eece81c122fc394d4dbf0409e2e Mon Sep 17 00:00:00 2001 From: NotNite Date: Sat, 11 Jun 2022 14:08:17 -0400 Subject: [PATCH 2/5] add PR url --- text/00-bleatbot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/00-bleatbot.md b/text/00-bleatbot.md index 9db2073..b6ac839 100644 --- a/text/00-bleatbot.md +++ b/text/00-bleatbot.md @@ -1,6 +1,6 @@ - Feature Name: (fill me in with a unique ident, `my_awesome_feature`) - Start Date: (fill me in with today's date, YYYY-MM-DD) -- DIP PR: [goatcorp/DIPs#0000](https://github.com/goatcorp/DIPs/pull/0000) +- DIP PR: [goatcorp/DIPs#41](https://github.com/goatcorp/DIPs/pull/41) - Repo-Relevant Issue: [goatcorp/dalamud#0000](https://github.com/goatcorp/dalamud/issues/0000) # Summary From 0b67fb2cb87c02ec5b1e691d496a717301d024cf Mon Sep 17 00:00:00 2001 From: NotNite Date: Sat, 11 Jun 2022 16:12:27 -0400 Subject: [PATCH 3/5] DIP41: rename & fix commands --- text/{00-bleatbot.md => 41-bleatbot.md} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename text/{00-bleatbot.md => 41-bleatbot.md} (95%) diff --git a/text/00-bleatbot.md b/text/41-bleatbot.md similarity index 95% rename from text/00-bleatbot.md rename to text/41-bleatbot.md index b6ac839..0a5dcba 100644 --- a/text/00-bleatbot.md +++ b/text/41-bleatbot.md @@ -27,7 +27,8 @@ In the comments of a issue/pull request on a goatcorp GitHub repository, members - `@bleatbot faq ` - Post an FAQ entry. - `@bleatbot autoClose ` - Automatically close an issue after the specified time (e.g `24h`). -- `bleatbot autoMerge ` - Automatically merge a pull request after the specified time (e.g. `24h`). +- `@bleatbot autoMerge ` - Automatically merge a pull request after the specified time (e.g. `24h`). +- `@bleatbot cancelAuto` - Cancel any automatic tasks. TODO From 6251d50bed7a23eea25281ff1b91140ba8a84c91 Mon Sep 17 00:00:00 2001 From: NotNite Date: Sat, 11 Jun 2022 16:13:31 -0400 Subject: [PATCH 4/5] DIP41: fix metadata at top of file --- text/41-bleatbot.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/text/41-bleatbot.md b/text/41-bleatbot.md index 0a5dcba..cf7f023 100644 --- a/text/41-bleatbot.md +++ b/text/41-bleatbot.md @@ -1,7 +1,7 @@ -- Feature Name: (fill me in with a unique ident, `my_awesome_feature`) -- Start Date: (fill me in with today's date, YYYY-MM-DD) +- Feature Name: Bleatbot +- Start Date: 2022-06-11 - DIP PR: [goatcorp/DIPs#41](https://github.com/goatcorp/DIPs/pull/41) -- Repo-Relevant Issue: [goatcorp/dalamud#0000](https://github.com/goatcorp/dalamud/issues/0000) +- Repo-Relevant Issue: [goatcorp/DIPs#37](https://github.com/goatcorp/DIPs/issues/37) # Summary From 6371620dfa1882cd5462a2c2e6d1d7f539fc7084 Mon Sep 17 00:00:00 2001 From: NotNite Date: Sat, 18 Jun 2022 20:14:04 -0400 Subject: [PATCH 5/5] DIP41: change command names --- text/41-bleatbot.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/text/41-bleatbot.md b/text/41-bleatbot.md index cf7f023..376b59d 100644 --- a/text/41-bleatbot.md +++ b/text/41-bleatbot.md @@ -26,9 +26,9 @@ There are many problems with GitHub issues: In the comments of a issue/pull request on a goatcorp GitHub repository, members of the goatcorp GitHub group can execute any of the following commands: - `@bleatbot faq ` - Post an FAQ entry. -- `@bleatbot autoClose ` - Automatically close an issue after the specified time (e.g `24h`). -- `@bleatbot autoMerge ` - Automatically merge a pull request after the specified time (e.g. `24h`). -- `@bleatbot cancelAuto` - Cancel any automatic tasks. +- `@bleatbot autoclose ` - Automatically close an issue after the specified time (e.g `24h`). +- `@bleatbot automerge ` - Automatically merge a pull request after the specified time (e.g. `24h`). +- `@bleatbot cancel` - Cancel any automatic tasks. TODO