The Azure Code Samples are currently available in English
GitHub Release Notes Generator
A serverless tool for generating a release notes document for projects hosted on GitHub.
Example release on GitHub
Rendered markdown file of example release notes
The following tutorial shows how to set up the function app from a forked version of the repository in the Azure Portal:
Create a Blob Container
- Follow the first two sections of the following walkthrough on how to create a container. Name the container
- In the storage account menu, navigate to Access keys and copy the connection string for this field. Save for later.
Deploy from a Forked GitHub Repository
- Create a new function app. See section on how to create a function app to get started.
- In the Platform features tab, select Deployment Options and select Setup to set the deployment source.
- Choose GitHub in the Choose Source menu. After following the authentication instructions, point the deployment source to the forked repository.
- After it's been created, go to the new function app's Overview menu, click and open Application settings, scroll to and click + Add new setting. Name the setting
StorageAccountConnectionStringand paste the copied connection string into the value field. Click Save
- In the same function app, go to Function app settings and change the runtime version to 2 if not already set.
- The the same function app settings, copy the default host key buy selecting the copy action and save for later.
- In the
New Releasefunction, copy the url by clicking </> Get function URL and save for later. Repeat for </> Get GitHub secret.
Configure GitHub Webhook
- In GitHub, select the repository to use with webhook. Navgiate to the repository's settings.
- In the menu on the left of the repository settings, select webhooks and click add a webhook button.
- Follow the table to configure your settings:
| Setting | Suggested value | Description |
| Payload URL | Copied values | Use the value returned by </> Get function URL and the default host key so that it reads
https://functionappname.azurewebsites.net/api/NewRelease?code=[host key] |
| Content type | application/json | The function expects a JSON payload. |
| Secret | Copied value | Use the value returned by </> Get GitHub secret. |
| Event triggers | Let me select individual events | We only want to trigger on release events. |
- Click add webhook.
- Go to your GitHub user settings, then to Developer Settings > Personal Access Tokens > Generate New Token. Give this token a name and copy the token. Instructions on creating a Personal Access Token on GitHub.
- Go back to the portal and to the function app Application settings, scroll to and click +Add new setting. Name the setting
ReleaseNotesAppTokenand paste the copied token into the value field.
Using "Deploy to Azure"
Click the "Deploy to Azure" button above to replicate the services used in this sample on your Azure subscription. This requires an additonal step of filling out the relevant configuration settings.
Storage Account Connection String You'll need a storage account with a blob container called
releases. Follow the first two sections of the following walkthrough on how to create a container. In the storage account menu, navigate to Access keys and copy the connection string for this field.
GitHub App Token From your GitHub user settings, go to Developer Settings > Personal Access Tokens > Generate New Token. Give this token a description then copy and paste the generated token into this field. Instructions on creating a Personal Access Token on GitHub.
Test the application
Create a new release in the repository. Fill out the required fields and click Publish release. The generated blob will be a markdown file named as the release title.
Monitor and review the functions' execution history in the Monitor context menu of the function.
To run the function again without creating another release, go to the configured webhook in GitHub to redeliver it.