2021-01-05 16:12:38 -05:00
|
|
|
<!--
|
2021-01-06 15:36:07 -05:00
|
|
|
SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
2021-01-05 16:12:38 -05:00
|
|
|
|
|
|
|
SPDX-License-Identifier: CC-BY-SA-4.0
|
|
|
|
-->
|
|
|
|
|
2020-11-18 06:56:59 -05:00
|
|
|
# Contributing to HedgeDoc
|
|
|
|
|
|
|
|
Thanks for your help in improving the HedgeDoc project!
|
|
|
|
|
|
|
|
Please note we have a [code of conduct][code-of-conduct], please follow it in all your interactions with the project.
|
|
|
|
|
|
|
|
## Ways of contributing
|
|
|
|
|
|
|
|
### Do you have questions about the project?
|
|
|
|
|
2021-06-06 14:33:45 -04:00
|
|
|
* Feel free to post your question on our [community forum][community-forum] or join
|
2020-11-18 06:56:59 -05:00
|
|
|
our [matrix community chat][matrix-support].
|
|
|
|
|
|
|
|
### Did you find a bug?
|
|
|
|
|
2021-06-06 14:33:45 -04:00
|
|
|
* **Ensure the bug wasn't already reported** by searching on GitHub under [Issues][issues].
|
2020-11-18 06:56:59 -05:00
|
|
|
|
2021-06-06 14:33:45 -04:00
|
|
|
* If you're unable to find an open issue addressing the problem, [open a new one][new_issue]. Be sure to use one of the
|
2020-11-18 06:56:59 -05:00
|
|
|
templates we provide if your request applies to them.
|
|
|
|
|
|
|
|
### Did you write a patch that fixes a bug?
|
|
|
|
|
|
|
|
* Open a new GitHub pull request with the patch. See the section [submitting a pull request](#submitting-a-pull-request)
|
|
|
|
for details on this.
|
|
|
|
|
|
|
|
* Ensure the PR description is precise about the problem and your solution. Just fill out our template. That should
|
|
|
|
cover the most important information.
|
|
|
|
|
2021-01-04 08:54:19 -05:00
|
|
|
* Please note that we only accept PRs for the 1.x releases if they fix critical issues. If you are unsure if your fix is
|
|
|
|
critical, it's best to ask us before you start coding.
|
|
|
|
|
2021-01-30 12:37:45 -05:00
|
|
|
* **Choose the correct base branch:**
|
|
|
|
The code for 1.x lives in the `master` branch. docs.hedgedoc.org is also deployed from there until 2.0 is released.
|
|
|
|
HedgeDoc 2.x is developed in the `develop` branch.
|
|
|
|
|
2020-11-18 06:56:59 -05:00
|
|
|
### Do you intend to add a new feature or change an existing one?
|
|
|
|
|
|
|
|
* Suggest your idea via a new GitHub issue. After a confirmation about your idea, you can start writing code. Our
|
|
|
|
maintainers and other project developers can provide useful details about the architecture and show you relevant
|
|
|
|
issues and discussions.
|
|
|
|
|
|
|
|
### Do you want to work on translations?
|
|
|
|
|
2021-06-06 14:33:45 -04:00
|
|
|
* If you want to improve a translation or add a new translation altogether, we handle those via [POEditor][poeditor].
|
2020-11-18 06:56:59 -05:00
|
|
|
|
2021-01-04 08:54:19 -05:00
|
|
|
HedgeDoc is a volunteer effort. We encourage you to pitch in and help us to make this project even better.
|
2020-11-18 06:56:59 -05:00
|
|
|
|
|
|
|
## Certificate of Origin
|
|
|
|
|
|
|
|
By contributing to this project you agree to
|
2021-01-22 11:06:07 -05:00
|
|
|
the [Developer Certificate of Origin (DCO)](docs/content/legal/developer-certificate-of-origin.txt). This document was created
|
2020-11-18 06:56:59 -05:00
|
|
|
by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the
|
|
|
|
contribution. The DCO is a legally binding statement,
|
2021-01-22 11:06:07 -05:00
|
|
|
please [read it carefully](docs/content/legal/developer-certificate-of-origin.txt).
|
2020-11-18 06:56:59 -05:00
|
|
|
|
2022-01-23 16:02:58 -05:00
|
|
|
If you can certify it, then just add a line to every git commit message:
|
|
|
|
|
2020-11-18 06:56:59 -05:00
|
|
|
```
|
2022-01-23 16:02:58 -05:00
|
|
|
Signed-off-by: Random J Developer <random@developer.example.org>
|
2020-11-18 06:56:59 -05:00
|
|
|
```
|
2022-01-23 16:02:58 -05:00
|
|
|
|
|
|
|
Use your real name (sorry, no pseudonyms or anonymous contributions).
|
2020-11-18 06:56:59 -05:00
|
|
|
|
|
|
|
If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`.
|
|
|
|
You can also use git [aliases](https://git-scm.com/book/tr/v2/Git-Basics-Git-Aliases)
|
|
|
|
like `git config --global alias.ci 'commit -s'`. Now you can commit with `git ci` and the commit will be signed.
|
|
|
|
|
|
|
|
## Submitting a Pull Request
|
|
|
|
|
|
|
|
1. Submit an issue describing your proposed change. We will try to respond to your issue promptly.
|
2021-01-30 11:36:19 -05:00
|
|
|
2. Fork this repo, develop and test your code changes. Ensure you follow the commit guidelines (see below)
|
|
|
|
and signed all your commits (see above for details).
|
2021-01-30 12:37:45 -05:00
|
|
|
3. Submit a pull request against this repo's `develop` branch for 2.x or the `master` branch for 1.x.
|
2020-11-18 06:56:59 -05:00
|
|
|
4. Your branch may be merged once all configured checks pass.
|
|
|
|
|
2021-01-30 11:36:19 -05:00
|
|
|
### Commit guidelines
|
|
|
|
|
|
|
|
- Follow these rules when writing a commit message:
|
|
|
|
1. Separate subject from body with a blank line
|
|
|
|
2. Limit the subject line to 50 characters
|
|
|
|
3. If you worked on a specific part of the application, you can prefix your commit message with that Example: "
|
|
|
|
MediaService: Get media backend from configuration"
|
|
|
|
3. Capitalize the subject line
|
|
|
|
4. Do not end the subject line with a period
|
|
|
|
5. Use the imperative mood in the subject line
|
|
|
|
6. Wrap the body at 72 characters
|
|
|
|
7. Use the body to explain what and why vs. how
|
|
|
|
|
|
|
|
These are inspired by https://chris.beams.io/posts/git-commit/
|
|
|
|
- Split your change into small, atomic commits. This helps reviewing the changes and enables the use of `git bisect`.
|
|
|
|
- Ensure the commit history is easy to follow. Use `git rebase -i` to sort and squash your commits if neccessary.
|
|
|
|
- If your branch includes fixup commits (like "Fix typo...", "Fix tests..."), use `git rebase -i` to clean them up
|
|
|
|
before submitting a pull request.
|
|
|
|
- When refactoring something, take care to not include any functional changes into the same commit. Mixing refactoring
|
|
|
|
and functional changes makes it hard to find the cause of regressions.
|
|
|
|
|
2020-11-18 06:56:59 -05:00
|
|
|
[code-of-conduct]: ./CODE-OF-CONDUCT.md
|
|
|
|
|
|
|
|
[community-forum]: https://community.hedgedoc.org
|
|
|
|
|
|
|
|
[matrix-support]: https://matrix.to/#/#hedgedoc:matrix.org
|
|
|
|
|
|
|
|
[issues]: https://github.com/hedgedoc/hedgedoc/issues
|
|
|
|
|
|
|
|
[new_issue]: https://github.com/hedgedoc/hedgedoc/issues/new/choose
|
|
|
|
|
|
|
|
[poeditor]: https://translate.hedgedoc.org
|