xref: /unit/CONTRIBUTING.md (revision 2095:8c0978d786bd)
1*2095Sartem.konev@nginx.com# Contributing Guidelines
2*2095Sartem.konev@nginx.com
3*2095Sartem.konev@nginx.comThe following is a set of guidelines for contributing to NGINX Unit.  We do
4*2095Sartem.konev@nginx.comappreciate that you are considering contributing!
5*2095Sartem.konev@nginx.com
6*2095Sartem.konev@nginx.com## Table Of Contents
7*2095Sartem.konev@nginx.com
8*2095Sartem.konev@nginx.com- [Getting Started](#getting-started)
9*2095Sartem.konev@nginx.com- [Ask a Question](#ask-a-question)
10*2095Sartem.konev@nginx.com- [Contributing](#contributing)
11*2095Sartem.konev@nginx.com- [Git Style Guide](#git-style-guide)
12*2095Sartem.konev@nginx.com
13*2095Sartem.konev@nginx.com
14*2095Sartem.konev@nginx.com## Getting Started
15*2095Sartem.konev@nginx.com
16*2095Sartem.konev@nginx.comCheck out the [Quick Installation](README.md#quick-installation) and
17*2095Sartem.konev@nginx.com[Howto](https://unit.nginx.org/howto/) guides to get NGINX Unit up and running.
18*2095Sartem.konev@nginx.com
19*2095Sartem.konev@nginx.com
20*2095Sartem.konev@nginx.com## Ask a Question
21*2095Sartem.konev@nginx.com
22*2095Sartem.konev@nginx.comPlease open an [issue](https://github.com/nginx/unit/issues/new) on GitHub with
23*2095Sartem.konev@nginx.comthe label `question`.  You can also ask a question on
24*2095Sartem.konev@nginx.com[Slack](https://nginxcommunity.slack.com) or the NGINX Unit mailing list,
25*2095Sartem.konev@nginx.comunit@nginx.org (subscribe
26*2095Sartem.konev@nginx.com[here](https://mailman.nginx.org/mailman3/lists/unit.nginx.org/)).
27*2095Sartem.konev@nginx.com
28*2095Sartem.konev@nginx.com
29*2095Sartem.konev@nginx.com## Contributing
30*2095Sartem.konev@nginx.com
31*2095Sartem.konev@nginx.com### Report a Bug
32*2095Sartem.konev@nginx.com
33*2095Sartem.konev@nginx.comEnsure the bug was not already reported by searching on GitHub under
34*2095Sartem.konev@nginx.com[Issues](https://github.com/nginx/unit/issues).
35*2095Sartem.konev@nginx.com
36*2095Sartem.konev@nginx.comIf the bug is a potential security vulnerability, please report using our
37*2095Sartem.konev@nginx.com[security policy](https://unit.nginx.org/troubleshooting/#getting-support).
38*2095Sartem.konev@nginx.com
39*2095Sartem.konev@nginx.comTo report a non-security bug, open an
40*2095Sartem.konev@nginx.com[issue](https://github.com/nginx/unit/issues/new) on GitHub with the label
41*2095Sartem.konev@nginx.com`bug`.  Be sure to include a title and clear description, as much relevant
42*2095Sartem.konev@nginx.cominformation as possible, and a code sample or an executable test case showing
43*2095Sartem.konev@nginx.comthe expected behavior that doesn't occur.
44*2095Sartem.konev@nginx.com
45*2095Sartem.konev@nginx.com
46*2095Sartem.konev@nginx.com### Suggest an Enhancement
47*2095Sartem.konev@nginx.com
48*2095Sartem.konev@nginx.comTo suggest an enhancement, open an
49*2095Sartem.konev@nginx.com[issue](https://github.com/nginx/unit/issues/new) on GitHub with the label
50*2095Sartem.konev@nginx.com`enhancement`.  Please do this before implementing a new feature to discuss the
51*2095Sartem.konev@nginx.comfeature first.
52*2095Sartem.konev@nginx.com
53*2095Sartem.konev@nginx.com
54*2095Sartem.konev@nginx.com### Open a Pull Request
55*2095Sartem.konev@nginx.com
56*2095Sartem.konev@nginx.comBefore submitting a PR, please read the NGINX Unit code guidelines to know more
57*2095Sartem.konev@nginx.comabout coding conventions and benchmarks.  Fork the repo, create a branch, and
58*2095Sartem.konev@nginx.comsubmit a PR when your changes are tested and ready for review.  Again, if you'd
59*2095Sartem.konev@nginx.comlike to implement a new feature, please consider creating a feature request
60*2095Sartem.konev@nginx.comissue first to start a discussion about the feature.
61*2095Sartem.konev@nginx.com
62*2095Sartem.konev@nginx.com
63*2095Sartem.konev@nginx.com## Git Style Guide
64*2095Sartem.konev@nginx.com
65*2095Sartem.konev@nginx.com- Keep a clean, concise and meaningful `git commit` history on your branch,
66*2095Sartem.konev@nginx.com  rebasing locally and squashing before submitting a PR
67*2095Sartem.konev@nginx.com
68*2095Sartem.konev@nginx.com- For any user-visible changes, updates, and bugfixes, add a note to
69*2095Sartem.konev@nginx.com  `docs/changes.xml` under the section for the upcoming release, using `<change
70*2095Sartem.konev@nginx.com  type="feature">` for new functionality, `<change type="change">` for changed
71*2095Sartem.konev@nginx.com  behavior, and `<change type="bugfix">` for bug fixes.
72*2095Sartem.konev@nginx.com
73*2095Sartem.konev@nginx.com- In the subject line, use the past tense ("Added feature", not "Add feature");
74*2095Sartem.konev@nginx.com  also, use past tense to describe past scenarios, and present tense for
75*2095Sartem.konev@nginx.com  current behavior
76*2095Sartem.konev@nginx.com
77*2095Sartem.konev@nginx.com- Limit the subject line to 67 characters, and the rest of the commit message
78*2095Sartem.konev@nginx.com  to 80 characters
79*2095Sartem.konev@nginx.com
80*2095Sartem.konev@nginx.com- Use subject line prefixes for commits that affect a specific portion of the
81*2095Sartem.konev@nginx.com  code; examples include "Tests:", "Packages:", or "Docker:", and also
82*2095Sartem.konev@nginx.com  individual languages such as "Java:" or "Ruby:"
83*2095Sartem.konev@nginx.com
84*2095Sartem.konev@nginx.com- Reference issues and PRs liberally after the subject line; if the commit
85*2095Sartem.konev@nginx.com  remedies a GitHub issue, [name
86*2095Sartem.konev@nginx.com  it](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
87*2095Sartem.konev@nginx.com  accordingly
88*2095Sartem.konev@nginx.com
89*2095Sartem.konev@nginx.com- Don't rely on command-line commit messages with `-m`; use the editor instead
90*2095Sartem.konev@nginx.com
91