|
| 1 | +## Legal |
| 2 | + |
| 3 | +By submitting a pull request, you represent that you have the right to license |
| 4 | +your contribution to Apple and the community, and agree by submitting the patch |
| 5 | +that your contributions are licensed under the Apache 2.0 license (see |
| 6 | +`LICENSE.txt`). |
| 7 | + |
| 8 | +## How to submit a bug report |
| 9 | + |
| 10 | +Please ensure to specify the following: |
| 11 | + |
| 12 | +* swift-prometheus commit hash |
| 13 | +* Contextual information (e.g. what you were trying to achieve with swift-prometheus) |
| 14 | +* Simplest possible steps to reproduce |
| 15 | + * More complex the steps are, lower the priority will be. |
| 16 | + * A pull request with failing test case is preferred, but it's just fine to paste the test case into the issue description. |
| 17 | +* Anything that might be relevant in your opinion, such as: |
| 18 | + * Swift version or the output of `swift --version` |
| 19 | + * OS version and the output of `uname -a` |
| 20 | + * Network configuration |
| 21 | + |
| 22 | + |
| 23 | +### Example |
| 24 | + |
| 25 | +``` |
| 26 | +swift-prometheus commit hash: 22ec043dc9d24bb011b47ece4f9ee97ee5be2757 |
| 27 | +
|
| 28 | +Context: |
| 29 | +While load testing my program written with swift-prometheus, I noticed |
| 30 | +that one file descriptor is leaked per request. |
| 31 | +
|
| 32 | +Steps to reproduce: |
| 33 | +1. ... |
| 34 | +2. ... |
| 35 | +3. ... |
| 36 | +4. ... |
| 37 | +
|
| 38 | +$ swift --version |
| 39 | +Swift version 4.0.2 (swift-4.0.2-RELEASE) |
| 40 | +Target: x86_64-unknown-linux-gnu |
| 41 | +
|
| 42 | +Operating system: Ubuntu Linux 16.04 64-bit |
| 43 | +
|
| 44 | +$ uname -a |
| 45 | +Linux beefy.machine 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux |
| 46 | +
|
| 47 | +My system has IPv6 disabled. |
| 48 | +``` |
| 49 | + |
| 50 | +## Writing a Patch |
| 51 | + |
| 52 | +A good swift-prometheus patch is: |
| 53 | + |
| 54 | +1. Concise, and contains as few changes as needed to achieve the end result. |
| 55 | +2. Tested, ensuring that any tests provided failed before the patch and pass after it. |
| 56 | +3. Documented, adding API documentation as needed to cover new functions and properties. |
| 57 | +4. Accompanied by a great commit message, using our commit message template. |
| 58 | + |
| 59 | +### Run CI checks locally |
| 60 | + |
| 61 | +You can run the GitHub Actions workflows locally using [act](https://github.com/nektos/act). For detailed steps on how to do this please see [https://github.com/swiftlang/github-workflows?tab=readme-ov-file#running-workflows-locally](https://github.com/swiftlang/github-workflows?tab=readme-ov-file#running-workflows-locally). |
| 62 | + |
| 63 | +## How to contribute your work |
| 64 | + |
| 65 | +Please open a pull request at https://github.com/swift-server/swift-prometheus. Make sure the CI passes, and then wait for code review. |
0 commit comments