Skip to content

Commit 4f5fcd1

Browse files
ssndSandu Kiritsa
andauthored
Add contributing guidelines (#71)
* Update issue templates * Add CONTRIBUTING.md file * Update the main readme links. Add a new section about testing. * Bump file.d version in makefile * Generate docs Co-authored-by: Sandu Kiritsa <[email protected]>
1 parent 450cac4 commit 4f5fcd1

File tree

9 files changed

+140
-21
lines changed

9 files changed

+140
-21
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve file.d
4+
title: 'Bug: '
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1.
16+
2.
17+
18+
**Expected behavior**
19+
A clear and concise description of what you expected to happen.
20+
21+
**Additional context**
22+
Version:
23+
Platform:
24+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: 'Feature:'
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Description
2+
3+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
4+
5+
Fixes # (issue)

CONTRIBUTING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Welcome to file.d contributing guide
2+
Thank you for investing your time in contributing to our project! This set of basic guidelines will help us make file.d development as easy, effective and transparent as possible for everyone involved.
3+
In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.
4+
5+
## Issues
6+
### Bug reports
7+
Before reporting a bug please use the Github search and check if the issue has already been reported/fixed.
8+
9+
A great bug report should include:
10+
- A quick summary and/or background
11+
- Steps to reproduce
12+
- Sample code (if necessary)
13+
- What you expected would happen
14+
- What actually happens
15+
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
16+
- Context -- platform, versions of the software software and everything that you think may be important to reproduce and fix the newfound bug.
17+
18+
Here's an example of a [great bug report](http://www.openradar.me/11905408).
19+
Make sure to use the bug report template available when creating a new issue.
20+
21+
22+
### Feature requests
23+
Please provide as many details and as much context as possible. Use the feature request template available when reporting a new issue.
24+
25+
## Pull requests
26+
Every pull request description should include the number of the issue it's resolving. Usually this looks like "Closes #<>" text in the PR description.
27+
28+
Pull requests with new features, bug fixes and improvements are very helpful and should remain focused on one main thing and avoid containing unrelated commits.
29+
Please stick to the coding conventions used throughout the project (indentation, accurate comments, etc.).
30+
31+
Adhering to the following process is the best way to get your work included in the project:
32+
1. Fork the project, clone your fork, and configure the remotes.
33+
```bash
34+
git clone https://github.com/<your-username>/file.d.git
35+
cd file.d
36+
git remote add upstream [email protected]:ozontech/file.d.git
37+
```
38+
2. If you cloned a while ago, get the latest changes from upstream.
39+
```bash
40+
git checkout master
41+
git pull upstream master
42+
```
43+
3. Create a new topic branch (off the master branch) to contain your feature, change, or fix.
44+
The branch name should have the following format <issue-no>-<short-topic-name>: the number of the issue that this branch solves, followed by a hyphen and a short name for the main feature you're developing.
45+
Awesome branch names: `80-contrib-guide`, `76-ban-metric`.
46+
Branch names that should be avoided: `no-gh-issue-number`, `80`, `very-long-feature-description-bla-bla-bla-bla`.
47+
4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your code is unlikely be merged into the main project. Use Git's [interactive rebase](https://docs.github.com/en/get-started/using-git/about-git-rebase) feature to tidy up your commits before making them public.
48+
5. Locally merge the upstream master into your topic branch
49+
```bash
50+
git pull [--rebase] upstream master
51+
```
52+
6. Push the branch to your fork
53+
```bash
54+
git push origin <topic-branch-name>
55+
```
56+
7. Open a pull request with a clear title and description.
57+
58+
59+
## Collaborating guidelines
60+
61+
The main rule for now is that every PR requires at least two approvals from the core file.d team members, unless it's a small fix (like a typo). Usually by approve we mean commment "LGTM" in the PR.
62+
63+
Note that this set of rules can (and should) be extended in the future.
64+
Feel free to discuss and propose improvements to this guidelines!
65+

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
VERSION ?= v0.5.2
2-
1+
VERSION ?= v0.5.3
32
UPSTREAM_BRANCH ?= origin/master
43

54
.PHONY: prepare

README.idoc.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
> ⚠ Although we use it in production, `it still isn't v1.0.0`. Please, test your pipelines carefully on dev/stage environments.
1212
13+
## Contributing
14+
`file.d` is an open-source project and contributions are very welcome!
15+
Please make sure to read our [contributing guide](/CONTRIBUTING.md) before creating an issue and opening a PR!
16+
1317
## Motivation
1418
Well, we already have several similar tools: vector, filebeat, logstash, fluend-d, fluent-bit, etc.
1519

@@ -41,11 +45,13 @@ TBD: throughput on production servers.
4145

4246
**Output**: @global-contents-table-plugin-output|links
4347

48+
4449
## What's next
4550
* [Quick start](/docs/quick-start.md)
4651
* [Installation](/docs/installation.md)
4752
* [Examples](/docs/examples.md)
4853
* [Configuring](/docs/configuring.md)
4954
* [Architecture](/docs/architecture.md)
50-
* [Contributing](/docs/contributing.md)
55+
* [Testing](/docs/testing.md)
56+
* [Contributing](/CONTRIBUTING.md)
5157
* [License](/docs/license.md)

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
> ⚠ Although we use it in production, `it still isn't v1.0.0`. Please, test your pipelines carefully on dev/stage environments.
1212
13+
## Contributing
14+
`file.d` is an open-source project and contributions are very welcome!
15+
Please make sure to read our [contributing guide](/CONTRIBUTING.md) before creating an issue and opening a PR!
16+
1317
## Motivation
1418
Well, we already have several similar tools: vector, filebeat, logstash, fluend-d, fluent-bit, etc.
1519

@@ -41,13 +45,15 @@ TBD: throughput on production servers.
4145

4246
**Output**: [devnull](plugin/output/devnull/README.md), [elasticsearch](plugin/output/elasticsearch/README.md), [gelf](plugin/output/gelf/README.md), [kafka](plugin/output/kafka/README.md), [postgres](plugin/output/postgres/README.md), [s3](plugin/output/s3/README.md), [splunk](plugin/output/splunk/README.md), [stdout](plugin/output/stdout/README.md)
4347

48+
4449
## What's next
4550
* [Quick start](/docs/quick-start.md)
4651
* [Installation](/docs/installation.md)
4752
* [Examples](/docs/examples.md)
4853
* [Configuring](/docs/configuring.md)
4954
* [Architecture](/docs/architecture.md)
50-
* [Contributing](/docs/contributing.md)
55+
* [Testing](/docs/testing.md)
56+
* [Contributing](/CONTRIBUTING.md)
5157
* [License](/docs/license.md)
5258

5359
<br>*Generated using [__insane-doc__](https://github.com/vitkovskii/insane-doc)*

docs/contributing.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/testing.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Testing
2+
In order to start tests, use standard `go test` command:
3+
```go
4+
go test ./...
5+
```
6+
7+
If you want to launch only the fast tests, consider using `-short` flag.
8+
In order to start end-to-end test you should add `e2e` tag:
9+
```go
10+
go test -tags=e2e ./...
11+
```

0 commit comments

Comments
 (0)