master | develop |
---|---|
Backend service for Kontent.ai Learn.
Together with Samples Manager, this service is responsible for maintaining Kontent.ai content items that represent code samples used in Kontent.ai documentation portal.
Github Reader responds to commits made to the kontent-docs-samples repository, which contains all the code samples that are used by the documentation portal.
- This project is a C# Azure Functions application.
- It receives a webhook with names of changed files after each commit to GitHub repository.
- After receiving a webhook, the service fetches content of each file from GitHub, extracts the marked code samples and stores them in its own local storage.
- Finally, it stores the code samples in the Azure Blob Storage, where the Samples Manager can access them.
- Visual Studio 2017 with Azure Functions and Web Jobs Tools installed
- Subscriptions on MS Azure and GitHub
- Clone the project repository and open it in Visual Studio.
- Install all the necessary nugget packages.
- Set the required keys.
- Run the service locally in Visual Studio, or
- Deploy the service to a new Azure Functions App instance in your Azure subscription.
Github.AccessToken
- GitHub account personal access tokenGithub.RepositoryName
- Name of GitHub repository with code samplesGithub.RepositoryOwner
- Owner of GitHub repository with code samplesRepository.ConnectionString
- Connection string for the Azure Storage account
Unit tests are located in GithubService.Services.Tests
folder.
Feel free to open a new issue where you describe your proposed changes, or even create a new pull request from your branch with proposed changes.
All the source codes are published under MIT license.