Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: Azure Functions v4 support #164

Merged
merged 5 commits into from
Dec 12, 2023
Merged

feat: Azure Functions v4 support #164

merged 5 commits into from
Dec 12, 2023

Conversation

ctcampbell
Copy link
Contributor

This pull request adds a new function azureFunctionV4 to support Azure Functions v4.

Main interface changes:

  • azure-function-v4.js: Added a new function azureFunctionV4 to handle incoming webhook requests from GitHub and verify their authenticity using probot.webhooks.verifyAndReceive.
  • index.js: Added a new function createAzureFunctionV4. [1]

Documentation changes:

  • README.md: Added instructions for using createAzureFunctionV4 function, including an example of creating an Azure Function using @probot/adapter-azure-functions package.

tsconfig.json Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need a tsconfig file given that this is a JS project? Is index.d.ts generated or did you hand craft it? If we need it, shouldn't it be a jsconfig.json file instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The index.d.ts file was generated, following docs at https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html, which describe adding tsconfig.json. I did try jsconfig.json but using that creates the following error:
image

await probot.webhooks.verifyAndReceive({
id: request.headers.get("X-GitHub-Delivery"),
name: request.headers.get("X-GitHub-Event"),
signature: request.headers.get("X-Hub-Signature-256") || request.headers.get("X-Hub-Signature"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is any GHES version left that sends out the X-Hub-Signature header, I think we can just leave it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 💐

@gr2m gr2m changed the title Add Azure Functions v4 support feat: Azure Functions v4 support Dec 11, 2023
@gr2m gr2m merged commit 9acbb12 into probot:main Dec 12, 2023
2 checks passed
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants