rocketbot
rocketbot copied to clipboard
Suggestion: Rewrap using GitHub Probot
Something worth exploring, GitHub Probot exists and is also based on Octokit.
It cuts out all the GitHub authentication flows boilerplate, easy to write/maintain/test/extend, supports TypeScript out of the box, etc.
import { Probot } from "probot";
import { handle } from "./rocketbot";
export = (app: Probot) => {
app.on("issue_comment.created", async (context) => {
const updatedComment: IssueComment | undefined = handle(context)
if (updatedComment) {
await context.octokit.issues.updateComment(updatedComment);
}
});
}