HockeyPickup.Comms is an implementation of interacting with the HockeyPickup Platform via Communication (Email, Notifications, etc.). It's deployed as an Azure Functions project and uses Azure Service Bus.
The main technology stack platform is .NET Core 9.0.
- Install Visual Studio 2022 (preview) or later, or Visual Studio Code. Ensure that
$ dotnet --versionis at least 9.0.
Create a new file at the root of the HockeyPickup.Comms project named local.settings.json.
Telegram bot messages are optional. Get a Telegram Bot key using BotFather.
Get the ServiceBusConnectionString from Azure portal. Currently Service Bus is not available to run locally.
Get the SendGridApiKey from SendGrid.
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"TelegramBotKey": "<TelegramBotKey>",
"TelegramRuntimeChannel": "HockeyApi_Runtime_Dev",
"ServiceBusConnectionString": "<ServiceBusConnectionString>",
"ServiceBusCommsQueueName": "comms-dev",
"SendGridApiKey": "<SendGridApiKey>",
"SendGridFromAddress": "pickup@hockeypickup.com",
"SignInAlertEmail": "pickup@hockeypickup.com",
"BaseApiUrl": "https://localhost:7042/api"
}
}$ dotnet restore
$ dotnet tool restoreOpen HockeyPickup.Comms.sln solution in Visual Studio, and build the solution.
HockeyPickup.Comms uses C# models via the OpenAPI spec from the HockeyPickup.Api schema.
To refresh the models, use nswag.
Nswag is installed in this project as a dotnet tool.
Local: $ dotnet nswag openapi2csclient /input:https://localhost:7042/swagger/v1/swagger.json /output:HockeyPickup.Api.cs /namespace:HockeyPickup.Api
Production: $ dotnet nswag openapi2csclient /input:https://api.hockeypickup.com/swagger/v1/swagger.json /output:HockeyPickup.Api.cs /namespace:HockeyPickup.Api
HockeyPickup.Comms uses sementic versioning, starting with 1.0.0.
The patch (last segment of the 3 segments) is auto-incremented via a GitHub action when a pull request is merged to master. The GitHub action is configured in .github/workflows/hockeypickup-Comms-version.yml. To update the major or minor version, follow the instructions specified in the bumping section of the action - use #major or #minor in the commit message to auto-increment the version.
We welcome useful contributions. Please read our contributing guidelines before submitting a pull request.
HockeyPickup.Comms is licensed under the MIT license.
