Skip to content

Commit ee21e12

Browse files
committed
Added contributing guide.
1 parent 41bba82 commit ee21e12

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

CONTRIBUTING.md

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Contributing Guidelines
2+
3+
The following is a set of guidelines for contributing to njs. We do
4+
appreciate that you are considering contributing!
5+
6+
## Table Of Contents
7+
8+
- [Getting Started](#getting-started)
9+
- [Ask a Question](#ask-a-question)
10+
- [Contributing](#contributing)
11+
- [Git Style Guide](#git-style-guide)
12+
13+
14+
## Getting Started
15+
16+
Check out the [Getting started](README.md#getting-started-with-nginx-javascript)
17+
and [njs examples](https://github.com/nginx/njs-examples) guides to get NGINX with
18+
njs up and running.
19+
20+
21+
## Ask a Question
22+
23+
Please open an [issue](https://github.com/nginx/njs/issues/new) on GitHub with
24+
the label `question`. You can also ask a question on the NGINX mailing list,
25+
nginx@nginx.org (subscribe [here](https://mailman.nginx.org/mailman/listinfo/nginx)).
26+
27+
28+
## Contributing
29+
30+
### Report a Bug
31+
32+
Please ensure the bug has not already been reported as
33+
[issue](https://github.com/nginx/njs/issues).
34+
35+
If the bug is a potential security vulnerability, please report using our
36+
[security policy](SECURITY.md).
37+
38+
To report a non-security bug, open an
39+
[issue](https://github.com/nginx/njs/issues/new) on GitHub with the label
40+
`bug`. Be sure to include a title and clear description, as much relevant
41+
information as possible, and a code sample or an executable test case showing
42+
the expected behavior that doesn't occur.
43+
44+
45+
### Suggest a Feature or Enhancement
46+
47+
To suggest a feature or enhancement, please create an [issue](https://github.com/nginx/njs/issues/new)
48+
on GitHub with the label `feature` or `enhancement` using the available feature
49+
request issue template. Please ensure the feature or enhancement has not
50+
already been suggested.
51+
52+
> [!NOTE]
53+
> If you’d like to implement a new feature, please consider creating a
54+
> feature request issue first to start a discussion about the feature
55+
> before implementing it.
56+
57+
58+
### Open a Pull Request
59+
60+
Fork the repo, create a branch, implement your changes, add any relevant tests,
61+
submit a PR when your changes are tested and ready for review.
62+
63+
Before submitting a PR, please read the NGINX code guidelines to learn more
64+
about coding conventions and style.
65+
66+
- Try to make it clear why the suggested change is needed, and provide a use
67+
case, if possible.
68+
69+
- Changes should be formatted according to the code style used by njs.
70+
njs mostly follows the [NGINX coding style](https://nginx.org/en/docs/dev/development_guide.html#code_style),
71+
with some minor differences. Sometimes, there is no clear rule; in such
72+
cases examine how existing njs sources are formatted and mimic this style.
73+
74+
- Submitting changes implies granting project a permission to use it under
75+
an [BSD-2-Clause license](LICENSE).
76+
77+
78+
## Git Style Guide
79+
80+
- Keep a clean, concise and meaningful `git commit` history on your branch,
81+
rebasing locally and squashing before submitting a PR
82+
83+
- In the subject line, use the past tense ("Added feature", not "Add feature");
84+
also, use past tense to describe past scenarios, and present tense for
85+
current behavior
86+
87+
- Limit the subject line to 67 characters, and the rest of the commit message
88+
to 80 characters
89+
90+
- Use subject line prefixes for commits that affect a specific portion of the
91+
code; examples include "Tests:", "HTTP:", or "Core:". See the commit history
92+
to get an idea of the prefixes used.
93+
94+
- Reference issues and PRs liberally after the subject line; if the commit
95+
remedies a GitHub issue, [name it](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) accordingly

0 commit comments

Comments
 (0)