|
| 1 | +# Contributing Guidelines |
| 2 | + |
| 3 | +The following is a set of guidelines for contributing to nginx project. |
| 4 | +We really appreciate that you are considering contributing! |
| 5 | + |
| 6 | +## Table of Contents |
| 7 | + |
| 8 | +- [Ask a Question](#ask-a-question) |
| 9 | +- [Report a Bug](#report-a-bug) |
| 10 | +- [Suggest a Feature or Enhancement](#suggest-a-feature-or-enhancement) |
| 11 | +- [Open a Discussion](#open-a-discussion) |
| 12 | +- [Submit a Pull Request](#submit-a-pull-request) |
| 13 | +- [Issue Lifecycle](#issue-lifecycle) |
| 14 | + |
| 15 | +## Ask a Question |
| 16 | + |
| 17 | +To ask a question, open an issue on GitHub with the label `question`. |
| 18 | + |
| 19 | +## Report a Bug |
| 20 | + |
| 21 | +To report a bug, open an issue on GitHub with the label `bug` using the |
| 22 | +available bug report issue template. Before reporting a bug, make sure the |
| 23 | +issue has not already been reported. |
| 24 | + |
| 25 | +## Suggest a Feature or Enhancement |
| 26 | + |
| 27 | +To suggest a feature or enhancement, open an issue on GitHub with the label |
| 28 | +`feature` or `enhancement` using the available feature request issue template. |
| 29 | +Please ensure the feature or enhancement has not already been suggested. |
| 30 | + |
| 31 | +## Open a Discussion |
| 32 | + |
| 33 | +If you want to engage in a conversation with the community and maintainers, |
| 34 | +we encourage you to use |
| 35 | +[GitHub Discussions](https://github.com/nginx/nginx/discussions). |
| 36 | + |
| 37 | +## Submit a Pull Request |
| 38 | + |
| 39 | +Follow this plan to contribute a change to NGINX source code: |
| 40 | + |
| 41 | +- Fork the NGINX repository |
| 42 | +- Create a branch |
| 43 | +- Implement your changes in this branch |
| 44 | +- Submit a pull request (PR) when your changes are tested and ready for review |
| 45 | + |
| 46 | +Refer to |
| 47 | +[NGINX Development Guide](https://nginx.org/en/docs/dev/development_guide.html) |
| 48 | +for questions about NGINX programming. |
| 49 | + |
| 50 | +### Formatting Changes |
| 51 | + |
| 52 | +- Changes should be formatted according to the |
| 53 | +[code style](https://nginx.org/en/docs/dev/development_guide.html#code_style) |
| 54 | +used by NGINX; sometimes, there is no clear rule, in which case examine how |
| 55 | +existing NGINX sources are formatted and mimic this style; changes will more |
| 56 | +likely be accepted if style corresponds to the surrounding code |
| 57 | + |
| 58 | +- Keep a clean, concise and meaningful commit history on your branch, rebasing |
| 59 | +locally and breaking changes logically into commits before submitting a PR |
| 60 | + |
| 61 | +- Each commit message should have a single-line subject line followed by verbose |
| 62 | +description after an empty line |
| 63 | + |
| 64 | +- Limit the subject line to 67 characters, and the rest of the commit message |
| 65 | +to 76 characters |
| 66 | + |
| 67 | +- Use subject line prefixes for commits that affect a specific portion of the |
| 68 | +code; examples include "Upstream:", "QUIC:", or "Core:"; see the commit history |
| 69 | +to get an idea of the prefixes used |
| 70 | + |
| 71 | +- Reference issues in the the subject line; if the commit fixes an issue, |
| 72 | +[name it](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) |
| 73 | +accordingly |
| 74 | + |
| 75 | +### Before Submitting |
| 76 | + |
| 77 | +- The proposed changes should work properly on a wide range of |
| 78 | +[supported platforms](https://nginx.org/en/index.html#tested_os_and_platforms) |
| 79 | + |
| 80 | +- Try to make it clear why the suggested change is needed, and provide a use |
| 81 | +case, if possible |
| 82 | + |
| 83 | +- Passing your changes through the test suite is a good way to ensure that they |
| 84 | +do not cause a regression; the repository with tests can be cloned with the |
| 85 | +following command: |
| 86 | + |
| 87 | +```bash |
| 88 | +git clone https://github.com/nginx/nginx-tests.git |
| 89 | +``` |
| 90 | + |
| 91 | +- Submitting a change implies granting project a permission to use it under the |
| 92 | +[BSD-2-Clause license](https://github.com/nginx/nginx/blob/master/LICENSE) |
| 93 | + |
| 94 | +## Issue Lifecycle |
| 95 | + |
| 96 | +To ensure a balance between work carried out by the NGINX engineering team |
| 97 | +while encouraging community involvement on this project, we use the following |
| 98 | +issue lifecycle: |
| 99 | + |
| 100 | +- A new issue is created by a community member |
| 101 | + |
| 102 | +- An owner on the NGINX engineering team is assigned to the issue; this |
| 103 | +owner shepherds the issue through the subsequent stages in the issue lifecycle |
| 104 | + |
| 105 | +- The owner assigns one or more |
| 106 | +[labels](https://github.com/nginx/nginx/issues/labels) to the issue |
| 107 | + |
| 108 | +- The owner, in collaboration with the wider team (product management and |
| 109 | +engineering), determines what milestone to attach to an issue; |
| 110 | +generally, milestones correspond to product releases |
0 commit comments