Skip to content

Commit c1b79bb

Browse files
committed
Create CONTRIBUTING.md
1 parent b6ddb23 commit c1b79bb

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

CONTRIBUTING.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributing to libsignal-service-dotnet
2+
3+
This repo aims to reflect Signal's [libsignal-service-java](https://github.com/signalapp/libsignal-service-java/). Note that libsignal-service-java was migrated into [Signal-Android](https://github.com/signalapp/Signal-Android/tree/master/libsignal/service) in December 2019.
4+
5+
## Building
6+
7+
### Requirements
8+
9+
1. [.NET Core 3.1 or greater](https://dotnet.microsoft.com/download)
10+
- Opening in Visual Studio requires Visual Studio 2019 (v16.4.0) or greater
11+
12+
### Steps
13+
14+
#### Visual Studio
15+
16+
1. Open the libsignal-service-dotnet.sln in Visual Studio
17+
2. Build the solution
18+
3. Run the tests using the Test Explorer window
19+
20+
#### Command Line
21+
22+
1. `dotnet build`
23+
2. `dotnet test`
24+
25+
## Making Changes
26+
27+
There are two approaches to making changes
28+
1. Commit by commit
29+
2. By feature
30+
31+
### Commit By Commit
32+
33+
1. Find the oldest commit in libsignal-service-java that hasn't been migrated to this repo. Using version number commits from this repo will help.
34+
- As of February 2021 this repo is still migrating changes from the standalone [libsignal-service-java](https://github.com/signalapp/libsignal-service-java/) repo.
35+
2. Make changes. Code migrated here should match the [Coding Guidelines](#Coding-Guidelines).
36+
3. Test changes.
37+
4. Commit changes with your commit message matching the commit message from libsignal-service-java. It should also include a link back to the libsignal-service-java commit in your commit description.
38+
39+
If the commit isn't relevant to this repo it should be skipped, for example updating Gradle or updating some dependencies. Dependencies on packages that exist in this organization (currently libsignal-metadata-dotnet, libsignal-protocol-dotnet, and curve25519-dotnet) should be reflected in this repo.
40+
41+
### By Feature
42+
43+
1. Identify the feature you want to migrate, for example stickers, and identify where in libsignal-service-java (from HEAD) that feature is implemented.
44+
2. Make changes. This may potentially require migrating many other things in libsignal-service-java that haven't yet been migrated to this repo. If the change becomes too large it may be worth breaking the change into smaller chunks, working on and PRing those first.
45+
3. Test changes.
46+
4. Commit changes with your commit message including what feature you migrated. If you included specific libsignal-service-java commits you should include links to those commits in your commit description.
47+
48+
## Versioning
49+
50+
The version of this repo should generally match the latest migrated version of libsignal-service-java. This will not be the in some scenarios.
51+
1. Important commits from previous versions of libsignal-service-java that were not migrated yet.
52+
2. By feature commits.
53+
54+
In these cases a fourth number should be added or incremented on the current latest version. For example if the current version of this repo is 2.10.0 and you added a feature to enable voice calls the version number should be bumped to 2.10.0.1. If missed commits were added the version number should be bumped to 2.10.0.2. If then 1 to 1 commits were added the version number should be updated to match the version number from libsignal-service-java again. In this case it could be 2.10.1 or 2.11.0.
55+
56+
## Coding Guidelines
57+
58+
You should generally follow the Visual Studio defaults, the [C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions), and the [C# Naming Guidelines](https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/naming-guidelines).

0 commit comments

Comments
 (0)