mirror of
https://github.com/minio/minio.git
synced 2025-02-18 17:12:31 -05:00
Simplify the cmd/http package overall by removing custom plain text v/s tls connection detection, by migrating to go1.12 and choose minimum version to be go1.12 Also remove all the vendored deps, since they are not useful anymore.
70 lines
3.1 KiB
Markdown
70 lines
3.1 KiB
Markdown
# Minio Contribution Guide [](https://slack.minio.io) [](https://goreportcard.com/report/minio/minio) [](https://hub.docker.com/r/minio/minio/) [](https://codecov.io/gh/minio/minio)
|
|
|
|
``Minio`` community welcomes your contribution. To make the process as seamless as possible, we recommend you read this contribution guide.
|
|
|
|
## Development Workflow
|
|
|
|
Start by forking the Minio GitHub repository, make changes in a branch and then send a pull request. We encourage pull requests to discuss code changes. Here are the steps in details:
|
|
|
|
### Setup your Minio GitHub Repository
|
|
Fork [Minio upstream](https://github.com/minio/minio/fork) source repository to your own personal repository. Copy the URL of your Minio fork (you will need it for the `git clone` command below).
|
|
|
|
```sh
|
|
$ mkdir -p $GOPATH/src/github.com/minio
|
|
$ cd $GOPATH/src/github.com/minio
|
|
$ git clone <paste saved URL for personal forked minio repo>
|
|
$ cd minio
|
|
```
|
|
|
|
### Set up git remote as ``upstream``
|
|
```sh
|
|
$ cd $GOPATH/src/github.com/minio/minio
|
|
$ git remote add upstream https://github.com/minio/minio
|
|
$ git fetch upstream
|
|
$ git merge upstream/master
|
|
...
|
|
```
|
|
|
|
### Create your feature branch
|
|
Before making code changes, make sure you create a separate branch for these changes
|
|
|
|
```
|
|
$ git checkout -b my-new-feature
|
|
```
|
|
|
|
### Test Minio server changes
|
|
After your code changes, make sure
|
|
|
|
- To add test cases for the new code. If you have questions about how to do it, please ask on our [Slack](slack.minio.io) channel.
|
|
- To run `make verifiers`
|
|
- To squash your commits into a single commit. `git rebase -i`. It's okay to force update your pull request.
|
|
- To run `go test -race ./...` and `go build` completes.
|
|
|
|
### Commit changes
|
|
After verification, commit your changes. This is a [great post](https://chris.beams.io/posts/git-commit/) on how to write useful commit messages
|
|
|
|
```
|
|
$ git commit -am 'Add some feature'
|
|
```
|
|
|
|
### Push to the branch
|
|
Push your locally committed changes to the remote origin (your fork)
|
|
```
|
|
$ git push origin my-new-feature
|
|
```
|
|
|
|
### Create a Pull Request
|
|
Pull requests can be created via GitHub. Refer to [this document](https://help.github.com/articles/creating-a-pull-request/) for detailed steps on how to create a pull request. After a Pull Request gets peer reviewed and approved, it will be merged.
|
|
|
|
## FAQs
|
|
### How does ``Minio`` manages dependencies?
|
|
``Minio`` uses `go mod` to manage its dependencies.
|
|
- Run `go get foo/bar` in the source folder to add the dependency to `go.mod` file.
|
|
|
|
To remove a dependency
|
|
- Edit your code and remove the import reference.
|
|
- Run `go mod tidy` in the source folder to remove dependency from `go.mod` file.
|
|
|
|
### What are the coding guidelines for Minio?
|
|
``Minio`` is fully conformant with Golang style. Refer: [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments) article from Golang project. If you observe offending code, please feel free to send a pull request or ping us on [Slack](https://slack.minio.io).
|