Skip to content

Commit 510d719

Browse files
committed
Add contributing guide. Add tests to PR checklist
1 parent 273e20d commit 510d719

File tree

2 files changed

+146
-1
lines changed

2 files changed

+146
-1
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Describe the use case and detail of the change. If this PR addresses an issue on
55
Before creating a PR, run through this checklist and mark each as complete.
66

77
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/nginx-prometheus-exporter/blob/master/CONTRIBUTING.md) guide
8-
- [ ] I have updated the README where necessary
8+
- [ ] I have proven my fix is effective or that my feature works
9+
- [ ] I have checked that all unit tests pass after adding my changes
10+
- [ ] I have ensured the README is up to date
911
- [ ] I have rebased my branch onto master
1012
- [ ] I will ensure my PR is targeting the master branch and pulling from my branch on my own fork
1113

CONTRIBUTING.md

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# Contributing Guidelines
2+
3+
The following is a set of guidelines for contributing to the NGINX Prometheus Exporter. We really appreciate that you are considering contributing!
4+
5+
#### Table Of Contents
6+
7+
[Ask a Question](#ask-a-question)
8+
9+
[Getting Started](#getting-started)
10+
11+
[Contributing](#contributing)
12+
13+
[Style Guides](#style-guides)
14+
* [Git Style Guide](#git-style-guide)
15+
* [Go Style Guide](#go-style-guide)
16+
17+
[Code of Conduct](#code-of-conduct)
18+
19+
## Ask a Question
20+
21+
We will have a public forum soon where you can come and ask questions and have a discussion. For now please open an Issue on GitHub with the label `question`.
22+
23+
24+
## Getting Started
25+
26+
Follow our [Getting Started Guide](README.md#getting-started) to get the NGINX Prometheus Exporter up and running.
27+
28+
### Project Structure
29+
30+
* This Prometheus Exporter is written in Go and supports both the open source NGINX software and NGINX Plus.
31+
* The project dependencies reside in the `/vendor`. We use [glide](https://github.com/Masterminds/glide) for managing dependencies.
32+
33+
## Contributing
34+
35+
### Report a Bug
36+
37+
To report a bug, open an issue on GitHub with the label `bug` using the available bug report issue template. Please ensure the issue has not already been reported.
38+
39+
### Suggest an Enhancement
40+
41+
To suggest an enhancement, please create an issue on GitHub with the label `enhancement` using the available feature issue template.
42+
43+
### Open a Pull Request
44+
45+
* Fork the repo, create a branch, submit a PR when your changes are tested and ready for review
46+
* Fill in [our pull request template](https://github.com/nginxinc/nginx-prometheus-exporter/issues/new?template=bug_report.md)
47+
48+
Note: if you’d like to implement a new feature, please consider creating a feature request issue first to start a discussion about the feature.
49+
50+
## Style Guides
51+
52+
### Git Style Guide
53+
54+
* Keep a clean, concise and meaningful git commit history on your branch, rebasing locally and squashing before submitting a PR
55+
* Follow the guidelines of writing a good commit message as described here https://chris.beams.io/posts/git-commit/ and summarised in the next few points
56+
* In the subject line, use the present tense ("Add feature" not "Added feature")
57+
* In the subject line, use the imperative mood ("Move cursor to..." not "Moves cursor to...")
58+
* Limit the subject line to 72 characters or less
59+
* Reference issues and pull requests liberally after the subject line
60+
* Add more detailed description in the body of the git message (`git commit -a` to give you more space and time in your text editor to write a good message instead of `git commit -am`)
61+
62+
### Go Style Guide
63+
64+
* Run `gofmt` over your code to automatically resolve a lot of style issues. Most editors support this running automatically when saving a code file.
65+
* Run `go lint` and `go vet` on your code too to catch any other issues.
66+
* Follow this guide on some good practice and idioms for Go - https://github.com/golang/go/wiki/CodeReviewComments
67+
68+
## Code of Conduct
69+
70+
This project and everyone participating in it is governed by this code.
71+
72+
### Our Pledge
73+
74+
In the interest of fostering an open and welcoming environment, we as
75+
contributors and maintainers pledge to making participation in our project and
76+
our community a harassment-free experience for everyone, regardless of age, body
77+
size, disability, ethnicity, sex characteristics, gender identity and expression,
78+
level of experience, education, socio-economic status, nationality, personal
79+
appearance, race, religion, or sexual identity and orientation.
80+
81+
### Our Standards
82+
83+
Examples of behavior that contributes to creating a positive environment
84+
include:
85+
86+
* Using welcoming and inclusive language
87+
* Being respectful of differing viewpoints and experiences
88+
* Gracefully accepting constructive criticism
89+
* Focusing on what is best for the community
90+
* Showing empathy towards other community members
91+
92+
Examples of unacceptable behavior by participants include:
93+
94+
* The use of sexualized language or imagery and unwelcome sexual attention or
95+
advances
96+
* Trolling, insulting/derogatory comments, and personal or political attacks
97+
* Public or private harassment
98+
* Publishing others' private information, such as a physical or electronic
99+
address, without explicit permission
100+
* Other conduct which could reasonably be considered inappropriate in a
101+
professional setting
102+
103+
### Our Responsibilities
104+
105+
Project maintainers are responsible for clarifying the standards of acceptable
106+
behavior and are expected to take appropriate and fair corrective action in
107+
response to any instances of unacceptable behavior.
108+
109+
Project maintainers have the right and responsibility to remove, edit, or
110+
reject comments, commits, code, wiki edits, issues, and other contributions
111+
that are not aligned to this Code of Conduct, or to ban temporarily or
112+
permanently any contributor for other behaviors that they deem inappropriate,
113+
threatening, offensive, or harmful.
114+
115+
### Scope
116+
117+
This Code of Conduct applies both within project spaces and in public spaces
118+
when an individual is representing the project or its community. Examples of
119+
representing a project or community include using an official project e-mail
120+
address, posting via an official social media account, or acting as an appointed
121+
representative at an online or offline event. Representation of a project may be
122+
further defined and clarified by project maintainers.
123+
124+
### Enforcement
125+
126+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
127+
reported by contacting the project team at [mailto:nginx@nginx.org]. All
128+
complaints will be reviewed and investigated and will result in a response that
129+
is deemed necessary and appropriate to the circumstances. The project team is
130+
obligated to maintain confidentiality with regard to the reporter of an incident.
131+
Further details of specific enforcement policies may be posted separately.
132+
133+
Project maintainers who do not follow or enforce the Code of Conduct in good
134+
faith may face temporary or permanent repercussions as determined by other
135+
members of the project's leadership.
136+
137+
### Attribution
138+
139+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
140+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
141+
142+
[homepage]: https://www.contributor-covenant.org
143+

0 commit comments

Comments
 (0)