|
| 1 | +# Contributing |
| 2 | + |
| 3 | +> [!IMPORTANT] |
| 4 | +> PRs are merged at the discretion of the project's maintainers. If you would like to contribute code to this project, |
| 5 | +> please first [open an issue](https://github.com/fetch-rewards/SwiftSyntaxSugar/issues/new) with a detailed description |
| 6 | +> of your proposed changes. This allows us to discuss implementation, alternatives, etc. and avoid wasting time dealing |
| 7 | +> with the inefficient back and forth that can arise when PRs are created without prior discussion. |
| 8 | +> |
| 9 | +> After you've created an issue, please read through the guidelines in this document carefully before implementing any |
| 10 | +> changes. |
| 11 | +> |
| 12 | +> By opening an issue or contributing code to this project, you agree to follow our |
| 13 | +> [Code of Conduct](https://github.com/fetch-rewards/SwiftSyntaxSugar/blob/main/CODE_OF_CONDUCT.md). |
| 14 | +> |
| 15 | +> Thank you for helping us make this project the best it can be! |
| 16 | +
|
| 17 | +- [Signed Commits Required](#signed-commits-required) |
| 18 | +- [Commit Messages & PR Titles](#commit-messages--pr-titles) |
| 19 | + |
| 20 | +## Signed Commits Required |
| 21 | + |
| 22 | +All contributions to this project must use **signed commits**. This is an important part of our commitment to security, |
| 23 | +authenticity, and trust in the software we maintain. Signed commits prove that a commit actually came from you, not just |
| 24 | +someone who knows your name and email. Without signed commits, it’s possible for malicious actors to impersonate contributors |
| 25 | +and inject malicious code into the project. |
| 26 | + |
| 27 | +> [!IMPORTANT] |
| 28 | +> Unsigned commits will be automatically rejected by our CI. If you forget to sign a commit, you can amend and re-push. |
| 29 | +
|
| 30 | +To learn more about commit signature verification and to make sure you're using signed commits, please read this |
| 31 | +[guide](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification). |
| 32 | + |
| 33 | +Thank you for helping us make the open-source community safer! |
| 34 | + |
| 35 | +## Commit Messages & PR Titles |
| 36 | + |
| 37 | +Descriptive, well-formatted commit messages and PR titles help create a consistent experience for maintainers and |
| 38 | +contributors. |
| 39 | + |
| 40 | +**All commits and PR titles should follow these guidelines:** |
| 41 | + |
| 42 | +1. The subject is written using sentence case, not title case, and acronyms are written in all caps: |
| 43 | + ``` |
| 44 | + ✅ Make public API changes |
| 45 | + ❌ Make public api changes |
| 46 | + ❌ Make Public API Changes |
| 47 | + ❌ MAKE PUBLIC API CHANGES |
| 48 | + ``` |
| 49 | +1. The subject is written in the imperative: |
| 50 | + ``` |
| 51 | + ✅ Add new file |
| 52 | + ❌ Adds new file |
| 53 | + ❌ Added new file |
| 54 | + ❌ Adding new file |
| 55 | + ``` |
| 56 | +1. The subject does not end with a period or include unnecessary punctuation: |
| 57 | + ``` |
| 58 | + ✅ Refactor networking layer |
| 59 | + ❌ Refactor networking layer. |
| 60 | + ``` |
| 61 | +1. The subject is ideally 50 characters or less (otherwise, 72 characters or less). |
| 62 | +1. The subject is separated from the body with a blank line (critical unless the body is ommitted entirely). |
| 63 | +1. The subject and body are free of whitepsace errors and typos. |
| 64 | +1. The body uses proper punctuation and capitalization. |
| 65 | +1. The body has a line length of 72 characters or less. |
0 commit comments