Skip to content

Commit f5c0be3

Browse files
committed
docs: Added contribution guide
Fixes pact-foundation#483
1 parent cd8631e commit f5c0be3

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

CONTRIBUTING.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
Contributing to PactNet
2+
=======================
3+
4+
Raising Issues
5+
--------------
6+
7+
Please don't raise issues for general queries (e.g. usage queries) and instead check the [Pact Docs] site or ask on the [Pact Foundation Slack].
8+
9+
Before raising any issues, please make as much effort as you can to rule out issues in your own environment as much as possible.
10+
For example, if you are using a self-hosted Pact Broker instance and PactNet is failing to connect, please ensure things like the
11+
authentication token and SSL certificate are valid.
12+
13+
If you are sure that the issye is with PactNet then please raise an issue, including as many of the following details as you can:
14+
15+
- PactNet version
16+
- Your operating system and version
17+
- .Net version
18+
- Log output
19+
- Steps to reproduce and/or a repository link which reproduces the issue
20+
- Expected outcome
21+
- Actual outcome
22+
23+
Due to the way that PactNet works, often issues that are found are not in PactNet itself but instead in the [pact-reference]
24+
native FFI libraries. If this is the case then an upstream issue will be raised in the FFI repository and PactNet will have to
25+
wait until the fix is available in a new FFI release.
26+
27+
Raising Pull Requests
28+
---------------------
29+
30+
For new contributors it is recommended that you start a discussion with a core maintainer prior to raising a PR. This
31+
is for your own benefit so that you don't waste time implementing changes which don't align with the project in general
32+
or will require significant changes afterwards.
33+
34+
The best way to achieve this is to open an issue detailing:
35+
36+
- The problem you see at the moment
37+
- The solution you propose to fix this problem (e.g. adding a new feature, refactoring an existing API, etc)
38+
- Any downsides you can foresee as a result of this change
39+
40+
If an issue already exists for the change you wish to contribute, please comment on the existing issue.
41+
42+
After raising your PR, a core maintainer will review your change and may request/suggest changes. Please take the
43+
feedback in the spirit intended so that the PR can be merged as quickly as possible whilst still meeting established
44+
conventions within the project such as architecture, code style, test style/coverage and API evolution.
45+
46+
In particular it is much harder to make any changes which involve a breaking change, so please set expectations accordingly
47+
if your change requires a new major version. A large and/or potentially disruptive change should typically take the form of
48+
an RFC issue.
49+
50+
A good example of an RFC issue preceding a major change is [PR 457].
51+
52+
Building PactNet
53+
----------------
54+
55+
In order to build PactNet you must first download the native Rust FFI libraries. You can pull the current supported
56+
version by executing the script in Bash (or Git Bash on Windows):
57+
58+
```bash
59+
build/download-native-libs.sh
60+
```
61+
62+
Alternatively you can download a particular FFI version from the [pact-referece] releases or build your own version
63+
locally, and then copy the artifacts into the folders:
64+
65+
```
66+
build/
67+
linux/
68+
x86_64/
69+
libpact_ffi.so
70+
osx/
71+
aarch64-apple-darwin/
72+
libpact_ffi.dylib
73+
x86_64/
74+
libpact_ffi.dylib
75+
windows/
76+
x86_64/
77+
pact_ffi.dll
78+
```
79+
80+
After the native libraries are in the expected places then the solution can be built in your IDE or on the command
81+
line using `dotnet build` as normal.
82+
83+
[pact-reference]: https://github.com/pact-foundation/pact-reference/releases
84+
[Pact Docs]: https://docs.pact.io/
85+
[Pact Foundation Slack]: https://pact-foundation.slack.com/
86+
[PR 457]: https://github.com/pact-foundation/pact-net/issues/457

0 commit comments

Comments
 (0)