Skip to content

Conversation

liblaf
Copy link
Contributor

@liblaf liblaf commented Apr 27, 2025

Part of #1139


Before the change?

After the change?

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

Copy link
Contributor

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@wolfy1339
Copy link
Member

This won't resolve the issue completely. The web middleware isn't used further up the dependency chain

@wolfy1339 wolfy1339 merged commit b23bff9 into octokit:main Apr 27, 2025
9 checks passed
@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done in 🧰 Octokit Active Apr 27, 2025
Copy link
Contributor

🎉 This PR is included in version 13.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@liblaf
Copy link
Contributor Author

liblaf commented Apr 27, 2025

This won't resolve the issue completely. The web middleware isn't used further up the dependency chain

@wolfy1339 At least @octokit/[email protected] works for me now. Thanks!

Example GitHub App on Cloudflare Workers
import { createWebMiddleware } from "@octokit/webhooks";
import { Hono } from "hono";
import { env } from "hono/adapter";
import { App } from "octokit";

const app = new Hono<{ Bindings: CloudflareBindings }>();

app.post("/api/github/webhooks", async (c) => {
  const app = new App({
    appId: env(c).GITHUB_APP_ID,
    privateKey: env(c).GITHUB_APP_PRIVATE_KEY,
    webhooks: {
      secret: env(c).GITHUB_APP_WEBHOOK_SECRET,
    },
  });

  app.webhooks.on("pull_request", async ({ octokit, payload }) => {
    // ...
  });

  const middleware = createWebMiddleware(app.webhooks);
  const resp = await middleware(c.req.raw);
  return resp;
});

export default app;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants