mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
95401434a2
Former-commit-id: 900e1a398fd82aa1cea4f319e89b8088dd81cf6c [formerly f172c22b12c49c0291e0d986dc4af94fcc91d192] [formerly 43c5da81442a5f0ca79a6eabb1dfdfbfb3f22680 [formerly 7a39ef2b52fc10e7c980d377dbd52f5340e4e53a [formerly2694d0b183
]]] Former-commit-id: fa39d6a984adc4ca8f8c82c5df145c336885a53f [formerly 94543f8081bc18b1a39daf8500cfa7e0b1ba7393] Former-commit-id: 809aae62e28a3f99a01854f71fcd5a85f89d2972 Former-commit-id:e8a4d30139
48 lines
3.5 KiB
Markdown
48 lines
3.5 KiB
Markdown
# Contributing to bluemonday
|
|
|
|
Third-party patches are essential for keeping bluemonday secure and offering the features developers want. However there are a few guidelines that we need contributors to follow so that we can maintain the quality of work that developers who use bluemonday expect.
|
|
|
|
## Getting Started
|
|
|
|
* Make sure you have a [Github account](https://github.com/signup/free)
|
|
|
|
## Submitting an Issue
|
|
|
|
* Submit a ticket for your issue, assuming one does not already exist
|
|
* Clearly describe the issue including the steps to reproduce (with sample input and output) if it is a bug
|
|
|
|
If you are reporting a security flaw, you may expect that we will provide the code to fix it for you. Otherwise you may want to submit a pull request to ensure the resolution is applied sooner rather than later:
|
|
|
|
* Fork the repository on Github
|
|
* Issue a pull request containing code to resolve the issue
|
|
|
|
## Submitting a Pull Request
|
|
|
|
* Submit a ticket for your issue, assuming one does not already exist
|
|
* Describe the reason for the pull request and if applicable show some example inputs and outputs to demonstrate what the patch does
|
|
* Fork the repository on Github
|
|
* Before submitting the pull request you should
|
|
1. Include tests for your patch, 1 test should encapsulate the entire patch and should refer to the Github issue
|
|
1. If you have added new exposed/public functionality, you should ensure it is documented appropriately
|
|
1. If you have added new exposed/public functionality, you should consider demonstrating how to use it within one of the helpers or shipped policies if appropriate or within a test if modifying a helper or policy is not appropriate
|
|
1. Run all of the tests `go test -v ./...` or `make test` and ensure all tests pass
|
|
1. Run gofmt `gofmt -w ./$*` or `make fmt`
|
|
1. Run vet `go tool vet *.go` or `make vet` and resolve any issues
|
|
1. Install golint using `go get -u github.com/golang/lint/golint` and run vet `golint *.go` or `make lint` and resolve every warning
|
|
* When submitting the pull request you should
|
|
1. Note the issue(s) it resolves, i.e. `Closes #6` in the pull request comment to close issue #6 when the pull request is accepted
|
|
|
|
Once you have submitted a pull request, we *may* merge it without changes. If we have any comments or feedback, or need you to make changes to your pull request we will update the Github pull request or the associated issue. We expect responses from you within two weeks, and we may close the pull request is there is no activity.
|
|
|
|
### Contributor Licence Agreement
|
|
|
|
We haven't gone for the formal "Sign a Contributor Licence Agreement" thing that projects like [puppet](https://cla.puppetlabs.com/), [Mojito](https://developer.yahoo.com/cocktails/mojito/cla/) and companies like [Google](http://code.google.com/legal/individual-cla-v1.0.html) are using.
|
|
|
|
But we do need to know that we can accept and merge your contributions, so for now the act of contributing a pull request should be considered equivalent to agreeing to a contributor licence agreement, specifically:
|
|
|
|
You accept that the act of submitting code to the bluemonday project is to grant a copyright licence to the project that is perpetual, worldwide, non-exclusive, no-charge, royalty free and irrevocable.
|
|
|
|
You accept that all who comply with the licence of the project (BSD 3-clause) are permitted to use your contributions to the project.
|
|
|
|
You accept, and by submitting code do declare, that you have the legal right to grant such a licence to the project and that each of the contributions is your own original creation.
|