Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: doc update for notice for 0.3.1 #63

Merged
merged 4 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 24 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,23 @@
novu-dotnet targets .NET Standard 2.0 and is compatible with .NET Core 2.0+ and .NET Framework 4.6.1+.

## Features
* Bindings against most [API endpoints](https://docs.novu.co/api/overview/)
* Events, subscribers, notifications, integrations, layouts, topics, workflows, workflow groups, messages, execution details
* Not Implemented: [environments](https://docs.novu.co/api/get-current-environment/), [inbound parse](https://docs.novu.co/api/validate-the-mx-record-setup-for-the-inbound-parse-functionality/), [changes](https://docs.novu.co/api/get-changes/)
* Bootstrap each services as part of services provider or directly as a singleton class (setting injectable)
* A Sync service that will mirror an environment based a set of templates (layouts, integrations, workflow groups, workflows)

- Bindings against most [API endpoints](https://docs.novu.co/api/overview/)
- Events, subscribers, notifications, integrations, layouts, topics, workflows, workflow groups, messages, execution details
- Not Implemented: [environments](https://docs.novu.co/api/get-current-environment/), [inbound parse](https://docs.novu.co/api/validate-the-mx-record-setup-for-the-inbound-parse-functionality/), [changes](https://docs.novu.co/api/get-changes/)
- Bootstrap each services as part of services provider or directly as a singleton class (setting injectable)
- A Sync service that will mirror an environment based a set of templates (layouts, integrations, workflow groups, workflows)

**WARNING**: 0.3.0 has breaking changes and the tests should be relied on for understanding the client libraries

## Dependencies

| dotnet novu | novu api [package](https://github.com/novuhq/novu/pkgs/container/novu%2Fapi) | Notes |
|-------------|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0.2.2 | <= 0.17 | Singleton client with Refit's use of RestService |
| 0.3.0 | >= 0.18 | 0.3.0 is not compatible with 0.2.2 and requires upgrade to code. Also 0.18 introduced a breaking change only found in 0.3.0. All 0.2.2 must be upgraded if used against the production system. HttpClient can now be used and injected. |
| 0.3.1 | >= 0.18 | [BREAKING} Obsolete Notification Templates has been removed. Service registration separation of single client and each client. Novu.Extension and Novu.Sync released as packages. |
| ----------- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 0.2.2 | <= 0.17 | Singleton client with Refit's use of RestService |
| 0.3.0 | >= 0.18 | 0.3.0 is not compatible with 0.2.2 and requires upgrade to code. Also 0.18 introduced a breaking change only found in 0.3.0. All 0.2.2 must be upgraded if used against the production system. HttpClient can now be used and injected. |
| 0.3.1 | >= 0.18 | Failed release. You will not find this release on Nuget. |
| 0.3.2 | >= 0.18 | [BREAKING} Obsolete Notification Templates has been removed. Service registration separation of single client and each client. Novu.Extension and Novu.Sync released as packages. |

## Installation

Expand Down Expand Up @@ -64,6 +66,7 @@ var subscribers = await novu.Subscriber.Get();
### Dependency Injection

Configure via settings

```appsettings.json
{
"Novu": {
Expand All @@ -73,7 +76,9 @@ Configure via settings
}

```

Setup Injection via extension methods

```csharp

public static IServiceCollection RegisterNotificationSetupServices(
Expand All @@ -96,7 +101,7 @@ Write your consuming code with the injected clients
public class NovuNotificationService
{
private readonly IEventClient _event;

public NovuSyncService(IEventClient @event)
{
_event = @event;
Expand All @@ -111,20 +116,23 @@ public class NovuNotificationService
Payload = new Payload("Bogus payload"),
});
}

public record Payload(string Message)
{
[JsonProperty("message")] public string Message { get; set; }
}
}
```

## Examples

Usage of the library is best understood by looking at the tests.
* [Integration Tests](https://github.com/novuhq/novu-dotnet/tree/main/src/Novu.Tests/IntegrationTests): these show the minimal dependencies required to do one primary request (create, update, delete)
* [Acceptance Tests](https://github.com/novuhq/novu-dotnet/tree/main/src/Novu.Tests/AcceptanceTests): these show a sequence of actions to complete a business process in an environment

- [Integration Tests](https://github.com/novuhq/novu-dotnet/tree/main/src/Novu.Tests/IntegrationTests): these show the minimal dependencies required to do one primary request (create, update, delete)
- [Acceptance Tests](https://github.com/novuhq/novu-dotnet/tree/main/src/Novu.Tests/AcceptanceTests): these show a sequence of actions to complete a business process in an environment

## Repository Overview

[Novu](https://github.com/novuhq/novu-dotnet/tree/main/src/Novu) is the main SDK with [Novu.Tests](https://github.com/novuhq/novu-dotnet/tree/main/src/Novu.Tests) housing all unit tests. [Novu.Extensions](https://github.com/novuhq/novu-dotnet/tree/main/src/Novu.Extensions) is required for DI and [Novu.Sync](https://github.com/novuhq/novu-dotnet/tree/main/src/Novu.Sync)
if your are looking for mirroring environments.

Expand All @@ -141,12 +149,15 @@ The key folders to look into:
Github issues closed

#### 0.3.1

- #57
- #58
- #59
- #60
- #55

#### 0.3.0

- #19
- #20
- #21
Expand Down
51 changes: 40 additions & 11 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,50 @@
# Releasing a new Version
# Creating releases

Releases are triggered via a GitHub Action. In order for this Action to be triggered, a new release must be made via the UI in GitHub.

## Current Process
Main Conventions:

- product releases are versioned via X.X.X (eg 0.1.0)
- tags have prefix 'v' (eg v0.1.0)

NOTE: The `v` prefix is required. The GitHub Action will not trigger withouth it.

## Step One: making changes and merging

All deployments should take place from the `main` branch. To release a new feature branch, you will need to create a PR to the main branch from another branch or fork, have it reviewed and merged.

- Merge this new change back into `main`
- Navigate to Releases, Draft a new Release
- Create a new tag with the name `v1.0.0`.
- NOTE: The `v` prefix is required. The GitHub Action will not trigger withouth it.
- The release title should be the same name as the new tag created
- Enter your release notes
- Check the `Set as the latest release` box and publish release

## Step Two: drafting

- Navigate to [Releases](https://github.com/novuhq/novu-dotnet/releases)
- [Draft a new Release](https://github.com/novuhq/novu-dotnet/releases/new)
- Create a new tag
- Choose a tag > Find or crate a new tag > vX.X.X > Create new tag
- Create release
- Release title: `vX.X.X`
- Content (example):

```
## What's Changed
* Nothing functionality from 0.3.1—had a problem in the build scripts for publishing to nuget


**Full Changelog**: https://github.com/novuhq/novu-dotnet/compare/vX.X.last...vX.X.latest
```

- [x] Set as the latest release
- Save as draft [ready for others to review]

## Step Three: releasing

From here, GitHub Actions will trigger and publish the new release to Nuget. It generally takes around 5-10 minutes for the release to run and be available
on Nuget.

## How to release a new Feature branch
- open your draft in [releases](https://github.com/novuhq/novu-dotnet/releases)
- Publish release

## Step Four: post-release checks

All deployments should take place from the `main` branch. To release a new feature branch, you will need to create a PR to the main branch, have it reviewed and merged. Once merged into the
main branch, you will follow the `Current Process` section to release a new version.
- Check that it exists on nuget
- Ideally update a project that uses the version
Loading