2015-09-07 14:26:37 -04:00
# How to contribute
2016-09-03 04:39:12 -04:00
The Dokku project would love to welcome your contributions. There are
2016-04-06 15:35:41 -04:00
several ways to help out:
2015-09-07 14:26:37 -04:00
2021-07-09 22:16:36 -04:00
- Create an [issue ](https://github.com/dokku/dokku/issues ) on GitHub, if you have found a bug
- Write [test cases ](https://dokku.com/docs/development/testing/ ) for open bug issues
- Write patches for open bug/feature issues, preferably with test cases included
- Contribute to the [documentation ](https://dokku.com/docs/ )
- Come up with new ways, non-commercial to show off our [lovely logo ](https://avatars1.githubusercontent.com/u/13455795 )
- Blog about different ways you are using dokku
2021-08-11 15:57:44 -04:00
- Sponsor the Dokku project financially on [Github ](https://github.com/sponsors/dokku ), [OpenCollective ](https://opencollective.com/dokku#support ) or [Patreon ](https://www.patreon.com/dokku )
2015-09-07 14:26:37 -04:00
There are a few guidelines that we need contributors to follow so that we have
a chance of keeping on top of things.
## Topics
2021-07-09 22:16:36 -04:00
- [Reporting Security Issues ](#reporting-security-issues )
- [Reporting Issues ](#reporting-other-issues )
- [Contributing ](#contributing )
2023-08-19 13:29:12 -04:00
- [Making Changes ](#making-changes )
- [Which branch to base the work ](#which-branch-to-base-the-work )
- [Submitting Changes ](#submitting-changes )
- [When will my change be merged? ](#when-will-my-change-be-merged )
- [Running tests locally ](#running-tests-locally )
2021-07-09 22:16:36 -04:00
- [Additional Resources ](#additional-resources )
2015-09-07 14:26:37 -04:00
## Reporting security issues
The Dokku maintainers take security seriously. If you discover a security
issue, please bring it to their attention right away!
Please **DO NOT ** file a public issue, instead send your report privately to
[dokku@josediazgonzalez.com ](mailto:dokku@josediazgonzalez.com ),
Security reports are greatly appreciated and we will publicly thank you for it.
## Reporting other issues
A great way to contribute to the project is to send a detailed report when you
encounter an issue. We always appreciate a well-written, thorough bug report,
and will thank you for it!
2016-09-03 04:39:12 -04:00
Sometimes Dokku is missing a feature you need. In some cases, those features can
2021-02-28 01:18:33 -05:00
be found in pre-existing [plugins ](https://dokku.com/docs/plugins/ ),
2015-09-07 14:26:37 -04:00
and we encourage our users to create and contribute such packages. From time to
2016-09-03 04:39:12 -04:00
time, we will also pull plugins into the Dokku core when the task they solve is
2015-09-07 14:26:37 -04:00
a common one for our users.
2015-12-06 04:51:31 -05:00
Check that [our issue database ](https://github.com/dokku/dokku/issues )
2015-09-07 14:26:37 -04:00
doesn't already include that problem or suggestion before submitting an issue.
If you find a match, add a quick "+1" or "I have this problem too." Doing this
helps prioritize the most common problems and requests.
2019-02-11 11:10:18 -05:00
When reporting issues, please include all the information we ask for in our
[issue template ](https://github.com/dokku/dokku/blob/master/ISSUE_TEMPLATE.md ).
Not doing so will prolongue the support period, making it more difficult to support
you.
2015-09-07 14:26:37 -04:00
## Contributing
2016-09-03 04:39:12 -04:00
Before you contribute to the Dokku project, there are a few things that you'll
2015-09-07 14:26:37 -04:00
need to do
2021-07-09 22:16:36 -04:00
- Make sure you have a [GitHub account ](https://github.com/signup/free ).
- Submit an [issue ](https://github.com/dokku/dokku/issues ), assuming one does not already exist.
2023-08-19 13:29:12 -04:00
- Clearly describe the issue including steps to reproduce when it is a bug.
- Make sure you fill in the earliest version that you know has the issue.
2021-07-09 22:16:36 -04:00
- Fork the repository on GitHub.
2015-09-07 14:26:37 -04:00
### Making Changes
2021-07-09 22:16:36 -04:00
- Create a topic branch from where you want to base your work.
2023-08-19 13:29:12 -04:00
- This is usually the master branch.
- Only target an existing branch if you are certain your fix must be on that
branch.
- To quickly create a topic branch based on master; `git checkout -b my_contribution origin/master` .
It is best to avoid working directly on the `master` branch. Doing so will
2015-09-07 14:26:37 -04:00
help avoid conflicts if you pull in updates from origin.
2021-07-09 22:16:36 -04:00
- Make commits of logical units. Implementing a new function and calling it in
2015-09-07 14:26:37 -04:00
another file constitute a single logical unit of work.
2023-08-19 13:29:12 -04:00
- Before you make a pull request, squash your commits into logical units of work
using `git rebase -i` and `git push -f` .
- A majority of submissions should have a single commit, so if in doubt,
2015-09-07 14:26:37 -04:00
squash your commits down to one commit.
2021-07-09 22:16:36 -04:00
- Check for unnecessary whitespace with `git diff --check` before committing.
- Use descriptive commit messages and reference the #issue number.
- Core test cases should continue to pass. You can run tests locally or enable
2015-12-06 04:51:31 -05:00
[circle-ci ](https://circleci.com/gh/dokku/dokku ) for your fork, so all
2015-09-07 14:26:37 -04:00
tests and codesniffs will be executed.
2021-07-09 22:16:36 -04:00
- Your work should apply the [Dokku coding standards ](https://github.com/progrium/bashstyle )
- Pull requests must be cleanly rebased on top of master without multiple branches
2015-09-07 14:26:37 -04:00
mixed into the PR.
2023-08-19 13:29:12 -04:00
- **Git tip**: If your PR no longer merges cleanly, use `rebase master` in your
2015-09-07 14:26:37 -04:00
feature branch to update your pull request rather than `merge master` .
### Which branch to base the work
2024-11-21 12:06:14 +08:00
All changes should be based on the latest master commit.
2015-09-07 14:26:37 -04:00
### Submitting Changes
2021-07-09 22:16:36 -04:00
- Push your changes to a topic branch in your fork of the repository.
- Submit a pull request to the repository on github, with the correct target
2015-09-07 14:26:37 -04:00
branch.
### When will my change be merged?
2016-09-03 04:39:12 -04:00
Be patient! The Dokku maintainers will review all pull requests and comment as
2015-09-07 14:26:37 -04:00
quickly as possible. There may be some back and forth while the details of your
pull request are discussed.
2019-02-11 11:10:18 -05:00
In the unlikely event that your pull request does not get merged, the Dokku
2015-09-07 14:26:37 -04:00
maintainers will either provide an alternative patch or guide you towards a
better solution to the problem at hand.
During our pre-1.0 cycle, we will follow these general rules when merging pull
requests:
- bugfix (patch)
- security (patch/minor)
- minor feature (patch)
- backwards incompatible change (minor)
- major feature (minor)
2021-01-18 17:24:13 -05:00
### Running tests locally
2015-09-07 14:26:37 -04:00
2021-02-28 01:18:33 -05:00
Please read the [testing docs ](https://dokku.com/docs/development/testing/ ),
2021-01-18 17:24:13 -05:00
which contains test setup information as well as tips for running tests.
2015-09-07 14:26:37 -04:00
2021-07-09 22:16:36 -04:00
## Additional Resources
2015-09-07 14:26:37 -04:00
2021-07-09 22:16:36 -04:00
- [Dokku coding standards ](https://github.com/progrium/bashstyle )
- [Existing issues ](https://github.com/dokku/dokku/issues )
- [General GitHub documentation ](https://help.github.com/ )
- [GitHub pull request documentation ](https://help.github.com/send-pull-requests/ )
2022-08-25 18:19:33 -04:00
- [Gliderlabs Slack in the #dokku channel ](https://slack.dokku.com/ )