Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Rewrap using GitHub Probot #19

Open
reececomo opened this issue Aug 23, 2021 · 1 comment
Open

Suggestion: Rewrap using GitHub Probot #19

reececomo opened this issue Aug 23, 2021 · 1 comment

Comments

@reececomo
Copy link

reececomo commented Aug 23, 2021

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);
    }
  });
}
@joscha
Copy link
Contributor

joscha commented Sep 22, 2021

Oh cool, that sounds like we could remove a whole bunch of code - do you have experience with it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants