An ASP.NET Core webhook for automatically responding to GitHub issues and PRs.
Open an issue against this repository to receive an automated response.
- Install .NET Core
git clone https://github.com/jamesseanwright/github-autoresponder.git
Then one can run:
dotnet xunit- execute the unit tests
dotnet start- start the server
The sole exposed endpoint can be found at
- responds to
- accepts GitHub webhook-conforming payloads
- is secured by the signature found in the
This service requires two environment variables to function:
The secret token specified when registering the webhook in your repository's settings.
A Base64-encoded string following a
<responding_username>:<personal_api_token> format e.g.
responding_username- the username used to respond to issues and PRs
personal_api_token- the personal API token to be used, along with the username, to authenticate requests made to the GitHub API
- Note that the only required scope is public_repo
Registering the Webhook Against a Repository
- Go to one of your repositories
- Click Settings
- Click Webhooks
- In Payload URL, enter the absolute URL via which the webhook can be accessed, including the
- Select application/json from the Content type dropdown
- Enter the webhook secret that you most likely generated in the previous section (see
- Under Which events would you like to trigger this webhook?, choose Let me select individual events, and select: Issues; and Pull request
- Click Add webhook to complete the registration
Changing the Response Message
Currently, the response message is a hard-coded string that lives in the
ResponseFactory class. Eventually, this will be separated into a Markdown file to be read at startup.