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

feat: return IEndpointConventionBuilder from MapGitHubWebhooks to allow additional configuration of endpoint #477

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

omccully
Copy link
Contributor

@omccully omccully commented Apr 3, 2024

Allows additional configuration of endpoint. For example, allowing anonymous access for the endpoint for an app that otherwise requires a specific type of authentication: app.MapGitHubWebhooks("/api/github/webhooks, githubWebhookSecret).AllowAnonymous()

Resolves #476


Before the change?

If you have authentication on your entire app but you want to allow anonymous access to the GitHub webhook endpoint, there doesn't seem to be a way to do that currently.

After the change?

The IEndpointConventionBuilder is available to users of the library, so they can configure any of the settings that you normally could for a app.MapPost( ... ) call, including AllowAnonymous().

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

github-actions bot commented Apr 3, 2024

👋 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 labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@nickfloyd nickfloyd changed the title return IEndpointConventionBuilder from MapGitHubWebhooks to allow additional configuration of endpoint feat: return IEndpointConventionBuilder from MapGitHubWebhooks to allow additional configuration of endpoint Apr 9, 2024
@nickfloyd nickfloyd merged commit 65e9d9d into octokit:main Apr 9, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
3 participants