|
1 | 1 | # Contribution Guidelines
|
2 | 2 |
|
3 |
| -This Documentation cannot be built without your skills and knowledge. |
| 3 | +Contributions to this repository are welcome. As a contributor, here are the guidelines we would like you to follow: |
4 | 4 |
|
| 5 | +- [Code of Conduct](#coc) |
5 | 6 | - [Question or Problem?](#question)
|
6 | 7 | - [Issues and Bugs](#issue)
|
7 | 8 | - [Feature Requests](#feature)
|
8 | 9 | - [Submission Guidelines](#submit)
|
| 10 | +- [Coding Rules](#rules) |
| 11 | +- [Commit Message Convention](#commit) |
| 12 | +- [Merging Pull Requests](#merge) |
| 13 | + |
| 14 | +## <a name="coc"></a> Code of Conduct |
| 15 | + |
| 16 | +<!-- markdown-link-check-disable --> |
| 17 | + |
| 18 | +Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md). |
| 19 | + |
| 20 | +<!-- markdown-link-check-enable --> |
9 | 21 |
|
10 | 22 | ## <a name="question"></a> Question or Problem?
|
11 | 23 |
|
12 |
| -Ideally reach out to us on the dev-advocacy-slack channel. |
| 24 | +<!-- markdown-link-check-disable --> |
13 | 25 |
|
14 |
| -## <a name="issue"></a> Found a Bug? Or something missing? |
| 26 | +Please use [GitHub Discussions](https://github.com/fetchai/uAgents/discussions) for support related questions and general discussions. Do NOT open issues as they are for bug reports and feature requests. This is because: |
15 | 27 |
|
16 |
| -If there is something not right, whether it be the code, grammar or worse a broken link open up an issue and we'll allocate time to fix in upcomming sprints. You of course can also [submit a Pull Request](#submit-pr) with a fix. |
| 28 | +<!-- markdown-link-check-enable --> |
| 29 | + |
| 30 | +- Questions and answers stay available for public viewing so your question/answer might help someone else. |
| 31 | +- GitHub Discussions voting system ensures the best answers are prominently visible. |
| 32 | + |
| 33 | +## <a name="issue"></a> Found a Bug? |
| 34 | + |
| 35 | +If you find a bug in the source code [submit a bug report issue](#submit-issue). |
| 36 | +Even better, you can [submit a Pull Request](#submit-pr) with a fix. |
17 | 37 |
|
18 | 38 | ## <a name="feature"></a> Missing a Feature?
|
19 | 39 |
|
20 |
| -You can _request_ a new feature by creating a feature request issue. |
| 40 | +You can _request_ a new feature by [submitting a feature request issue](#submit-issue). |
| 41 | +If you would like to _implement_ a new feature: |
| 42 | + |
| 43 | +- For a **Major Feature**, first [open an issue](#submit-issue) and outline your proposal so that it can be discussed. |
| 44 | +- **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). |
| 45 | + |
| 46 | +## <a name="submit"></a> Submission Guidelines |
| 47 | + |
| 48 | +### <a name="submit-issue"></a> Submitting an Issue |
| 49 | + |
| 50 | +<!-- markdown-link-check-disable --> |
| 51 | + |
| 52 | +Before you submit an issue, please search the [issue tracker](https://github.com/fetchai/uAgents/issues). An issue for your problem might already exist and the discussion might inform you of workarounds readily available. |
| 53 | + |
| 54 | +For bug reports, it is important that we can reproduce and confirm it. For this, we need you to provide a minimal reproduction instruction (this is part of the bug report issue template). |
| 55 | + |
| 56 | +You can file new issues by selecting from our [new issue templates](https://github.com/fetchai/uAgents/issues/new/choose) and filling out the issue template. |
| 57 | + |
| 58 | +<!-- markdown-link-check-enable --> |
| 59 | + |
| 60 | +### <a name="submit-pr"></a> Submitting a Pull Request (PR) |
| 61 | + |
| 62 | +Before you submit your Pull Request (PR) consider the following guidelines: |
| 63 | + |
| 64 | +1. All Pull Requests should be based off of and opened against the `main` branch. |
| 65 | + |
| 66 | +<!-- markdown-link-check-disable --> |
| 67 | + |
| 68 | +2. Search [Existing PRs](https://github.com/fetchai/uAgents/pulls) for an open or closed PR that relates to your submission. |
| 69 | + You don't want to duplicate existing efforts. |
| 70 | + <!-- markdown-link-check-enable --> |
| 71 | + |
| 72 | +3. Be sure that an issue exists describing the problem you're fixing, or the design for the feature you'd like to add. |
| 73 | + |
| 74 | +<!-- markdown-link-check-disable --> |
| 75 | + |
| 76 | +4. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the [repository](https://github.com/fetchai/uAgents). |
| 77 | +<!-- markdown-link-check-enable --> |
| 78 | + |
| 79 | +5. In your forked repository, make your changes in a new git branch created off of the `main` branch. |
| 80 | + |
| 81 | +6. Make your changes, **including test cases and documentation updates where appropriate**. |
| 82 | + |
| 83 | +7. Follow our [coding rules](#rules). |
| 84 | + |
| 85 | +<!-- markdown-link-check-disable --> |
| 86 | + |
| 87 | +8. Run all tests and checks locally, as described in the [development guide](DEVELOPING.md), and ensure they pass. This saves CI hours and ensures you only commit clean code. |
| 88 | +<!-- markdown-link-check-enable --> |
| 89 | + |
| 90 | +9. Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). |
| 91 | + |
| 92 | +10. Push your branch to GitHub. |
| 93 | + |
| 94 | +11. In GitHub, send a pull request to `fetchai:main`. |
| 95 | + |
| 96 | +#### Reviewing a Pull Request |
| 97 | + |
| 98 | +<!-- markdown-link-check-disable --> |
| 99 | + |
| 100 | +The repository maintainers reserve the right not to accept pull requests from community members who haven't been good citizens of the community. Such behavior includes not following our [code of conduct](CODE_OF_CONDUCT.md) and applies within or outside the managed channels. |
| 101 | + |
| 102 | +<!-- markdown-link-check-enable --> |
| 103 | + |
| 104 | +When you contribute a new feature, the maintenance burden is transferred to the core team. This means that the benefit of the contribution must be compared against the cost of maintaining the feature. |
| 105 | + |
| 106 | +#### Addressing review feedback |
| 107 | + |
| 108 | +If we ask for changes via code reviews then: |
| 109 | + |
| 110 | +1. Make the required updates to the code. |
| 111 | + |
| 112 | +2. Re-run the tests and checks to ensure they are still passing. |
| 113 | + |
| 114 | +3. Create a new commit and push to your GitHub repository (this will update your Pull Request). |
| 115 | + |
| 116 | +#### After your pull request is merged |
| 117 | + |
| 118 | +After your pull request is merged, you can safely delete your branch and pull the changes from the (upstream) repository. |
| 119 | + |
| 120 | +## <a name="rules"></a> Coding Rules |
| 121 | + |
| 122 | +To ensure consistency throughout the source code, keep these rules in mind as you are working: |
| 123 | + |
| 124 | +<!-- markdown-link-check-disable --> |
| 125 | + |
| 126 | +- All code must pass our code quality checks (linters, formatters, etc). See the [development guide](DEVELOPING.md) section for more detail. |
| 127 | +<!-- markdown-link-check-enable --> |
| 128 | + |
| 129 | +- All features **must be tested** via unit-tests and if applicable integration-tests. Bug fixes also require tests, because the presence of bugs usually indicates insufficient test coverage. Tests help to: |
| 130 | + |
| 131 | + 1. Prove that your code works correctly, and |
| 132 | + 2. Guard against future breaking changes and lower the maintenance cost. |
| 133 | + |
| 134 | +- All public features **must be documented**. |
| 135 | +- Keep API compatibility in mind when you change any code. Above version `1.0.0`, breaking changes can happen across versions with different left digit. Below version `1.0.0`, they can happen across versions with different middle digit. Reviewers of your pull request will comment on any API compatibility issues. |
| 136 | + |
| 137 | +## <a name="commit"></a> Commit Message Convention |
| 138 | + |
| 139 | +This project uses Conventional Commits to generate release notes and to determine versioning. Please follow the [Conventional Commits v1.0.0](https://www.conventionalcommits.org/en/v1.0.0/). The commit types must be one of the following: |
| 140 | + |
| 141 | +- **chore**: Commits that don't directly add features, fix bugs, or refactor code, but rather maintain the project or its surrounding processes. |
| 142 | +- **ci**: Changes to our CI configuration files and scripts |
| 143 | +- **docs**: Changes to the documentation |
| 144 | +- **feat**: A new feature |
| 145 | +- **fix**: A bug fix |
| 146 | +- **refactor**: A code change that neither fixes a bug nor adds a feature |
| 147 | +- **test**: Adding missing tests or correcting existing tests |
| 148 | +- **revert**: Reverts a previous commit that introduced an issue or unintended change. This essentially undoes a previous commit. |
| 149 | +- **style**: Changes that only affect code formatting or style, without affecting functionality. This ensures consistency and readability of the codebase. |
| 150 | +- **perf**: Changes that improve the performance of the project. |
| 151 | + |
| 152 | +Commit messages should adhere to this standard and be of the form: |
| 153 | + |
| 154 | + ```bash |
| 155 | + git commit -m "feat: add new feature x" |
| 156 | + git commit -m "fix: fix bug in feature x" |
| 157 | + git commit -m "docs: add documentation for feature x" |
| 158 | + git commit -m "test: add test suite for feature x" |
| 159 | + ``` |
| 160 | + |
| 161 | +Further details on `conventional commits` can be found [here](https://www.conventionalcommits.org/en/v1.0.0/). |
| 162 | + |
| 163 | +## <a name="merge"></a> Merging Pull Requests |
21 | 164 |
|
22 |
| -## <a name="submit-issue"></a> Updating Docs: |
| 165 | +When merging a branch, PRs should be squashed into one conventional commit by selecting the `Squash and merge` option. This ensures Release notes are useful and readable when releases are created. |
23 | 166 |
|
24 |
| -Please create a branch from master, update or add files into the directory you think they're best placed. Open a PR, and someone from the docs team will review. |
| 167 | +See [Merge strategies](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-commits) from the official GitHub documentation. |
0 commit comments