github.com/Tyktechnologies/tyk@v2.9.5+incompatible/CONTRIBUTING.md (about) 1 # Contributing to Tyk 2 3 **First**: if you're unsure or afraid of anything, just ask or submit the issue or pull request anyways. You won't be yelled at for giving your best effort. The worst that can happen is that you'll be politely asked to change something. We appreciate any sort of contributions, and don't want a wall of rules to get in the way of that. 4 5 However, for those individuals who want a bit more guidance on the best way to contribute to the project, read on. This document will cover what we're looking for. By addressing all the points we're looking for, it raises the chances we can quickly merge or address your contributions. 6 7 ## Filing issues 8 9 If you have a question about Tyk or have a problem using it, please 10 start with the GitHub search and our [community forum](https://community.tyk.io). If that doesn't answer your questions, or if you think you found a bug, please [file an 11 issue](https://github.com/TykTechnologies/tyk/issues/new). 12 13 ## How to become a contributor and submit your own code 14 15 ### Contributor License Agreements 16 17 We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles. 18 19 The Tyk CLA [must be signed](https://github.com/TykTechnologies/tyk/blob/master/CLA.md) by all contributors. You will be automatically asked to sign CLA once PR will be created. 20 21 Once you are CLA'ed, we'll be able to accept your pull requests. For any issues that you face during this process, please create a GitHub issue explaining the problem and we will help get it sorted out. 22 23 ***NOTE***: Only original source code from you and other people that have 24 signed the CLA can be accepted into the repository. This policy does not 25 apply to [vendor](vendor/). 26 27 ### Finding Things That Need Help 28 29 If you're new to the project and want to help, but don't know where to start, 30 we have a semi-curated list of issues that have should not need deep knowledge 31 of the system. [Have a look and see if anything sounds 32 interesting](https://github.com/TykTechnologies/tyk/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted). 33 34 Alternatively, read some of the [many docs on the system](https://tyk.io/tyk-documentation/get-started/), and pick a component that seems 35 interesting. Start with `main()` and read 36 until you find something you want to fix. The best way to learn is to hack! 37 There's always code that can be clarified and variables or functions that can 38 be renamed or commented. 39 40 ### `master` is unstable 41 42 We will do our best to keep master in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to communicate these changes and version appropriately so you can lock into a specific version if need be. For stable releases check our tags and `stable` branch, which contains our latest stable release. 43 44 45 ### Contributing A Patch 46 47 If you're working on an existing issue, such as one of the `help-wanted` ones 48 above, simply respond to the issue and express interest in working on it. This 49 helps other people know that the issue is active, and hopefully prevents 50 duplicated efforts. 51 52 If you want to work on a new idea of relatively small scope: 53 54 1. Submit an issue describing your proposed change to the repo in question. 55 1. The repo owners will respond to your issue promptly. 56 1. Clone the repo, develop, and test your changes. 57 1. Submit a pull request. 58 1. If your proposed change is accepted, and you haven't already done so, sign a 59 Contributor License Agreement (see details above). 60 61 If you want to work on a bigger idea, we **strongly** recommend that you start with 62 some bugs or smaller features. It is always better to discuss your idea with our team first, before implementing it. 63 64 ### Downloading the project 65 You need to clone Tyk from GitHub to your GOPATH folder, or alternatively you can run `go get -d github.com/TykTechnologies/tyk` which automatically downloads project to the right path. 66 67 ### Building the project 68 You need to have working Go environment: see [golang.org](https://golang.org/doc/code.html) for more info on how Go works with code. 69 70 To build and test Tyk use built-in `go` commands: `go build` and `go test -v`. If you want to just test a subset of the project, you can pass the `-run` argument with the name of the test. Note that logs are hidden by default when running the tests, which you can override by setting `TYK_LOGLEVEL=info`. 71 72 Currently, in order for tests to pass, a **Redis host is required**. We know, this is terrible and should be handled with an interface, and it is, however in the current version there is a hard requirement for the application to have its default memory setup to use Redis as part of a deployment, this is to make it easier to install the application for the end-user. Future versions will work around this, or we may drop the memory requirement. The simplest way to run Redis is to use official Docker image [https://hub.docker.com/_/redis/](https://hub.docker.com/_/redis/) 73 74 ### Adding dependencies 75 76 If your patch depends on new packages, ensure that they will be put in `/vendor` folder. Here at Tyk we use `govendor` for managing our dependencies. Adding new dependencies can be done using following command: `govendor fetch github.com/alicebob/miniredis`. 77 78 ### Geo IP features 79 This product utilises GeoLite2 data created by MaxMind, available from [http://www.maxmind.com](http://www.maxmind.com).