Skip to content

HockeyPickup/HockeyPickup.Comms

Repository files navigation

🏒 HockeyPickup.Comms

Logo

HockeyPickup.Comms CodeQL

🌈 Overview

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.

🛠 Prerequisites

  • Install Visual Studio 2022 (preview) or later, or Visual Studio Code. Ensure that $ dotnet --version is at least 9.0.

⌨️ Install, Build, and Run the Comms

Create a new file at the root of the HockeyPickup.Comms project named local.settings.json.

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",
    "ServiceBusConnectionString": "<ServiceBusConnectionString>",
    "ServiceBusCommsQueueName": "comms-dev",
    "SendGridApiKey": "<SendGridApiKey>",
    "SendGridFromAddress": "pickup@hockeypickup.com"
  }
}

Install the packages

$ dotnet restore
$ dotnet tool restore

Open HockeyPickup.Comms.sln solution in Visual Studio, and build the solution.

🎛️ Refreshing the models from HockeyPickup.Api

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 swagger2csclient /client-language:csharp /input:https://localhost:7042/swagger/v1/swagger.json /output:HockeyPickup.Api.cs /namespace:HockeyPickup.Api

Production: $ dotnet nswag swagger2csclient /client-language:csharp /input:https://api.hockeypickup.com/swagger/v1/swagger.json /output:HockeyPickup.Api.cs /namespace:HockeyPickup.Api

🎁 Versioning

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.

❤️ Contributing

We welcome useful contributions. Please read our contributing guidelines before submitting a pull request.

📜 License

HockeyPickup.Comms is licensed under the MIT license.

License

hockeypickup.com

About

Event driven handler for messages from HockeyPickup.Api

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages