We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Similar to Octokit's webhook helpers, it could improve the quality of life for developers if incoming requests were parsed uniformly.
The text was updated successfully, but these errors were encountered:
I started speccing out what I think you (and I) have in mind, please let me know: https://github.com/copilot-extensions/preview-sdk.js/blob/main/dreamcode.md#api
tl;dr:
import { createServer } from "http"; import { CopilotExtension, createNodeMiddleware, } from "@octokit/copilot-extension"; const copilotExtension = new CopilotExtension({ agent: "my-app-name" }); copilotExtension.on( "message", async ({ message, octokit, prompt, respond, log }) => { await respond.text(`Hi!`); } ); createServer(createNodeMiddleware(copilotExtension)).listen(3000);
The node middleware will be compatible with express' middleware API
Sorry, something went wrong.
@gr2m, what would be the purpose for instantiating CopilotExtension with { agent: 'my-app-name' }? Wouldn't the receiver be agnostic?
CopilotExtension
{ agent: 'my-app-name' }
oops that should have been
userAgent: "my-app-name"
(the value for the user-agent header. It should be unique per GitHub App. I'll update the dreamcode)
user-agent
The userAgent value will be used for all requests made towards GitHub's API and CAPI. Does that make sense?
userAgent
gr2m
No branches or pull requests
Similar to Octokit's webhook helpers, it could improve the quality of life for developers if incoming requests were parsed uniformly.
The text was updated successfully, but these errors were encountered: