CONTRIBUTING.adoc 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. = Contributions
  2. Contributions are very welcome - code, docs, whatever they might be! If this is
  3. your first contribution to an Open Source project or you're a core maintainer
  4. of multiple projects, your time and interest in contributing is most welcome.
  5. If you're not sure where to get started, raise an issue in the project.
  6. Ideas may be discussed, purely on their merits and issues. Our Code of Conduct
  7. (CoC) is straightforward - it's important that contributors feel comfortable in
  8. discussion throughout the whole process. This project respects the
  9. link:https://www.kernel.org/doc/html/latest/process/code-of-conduct.html[Linux Kernel code of conduct].
  10. == Suggestion: More than 3 lines - talk to someone first
  11. If you're planning on making a change that's more than a 3 lines, please talk to someone first (raising a GitHub issue is the best way to do that). This is so that you don't waste your time on something that might not be accepted. It's also a good way to get some feedback on your idea and make sure you're on the right track.
  12. == Rule: A PR should be one logical change
  13. Please try to keep your pull requests small and focused. It's almost impossible to review PRs that change lots of files for lots of different reasons. If you have a big change, it's probably best to break it down into smaller, more manageable chunks, otherwise it's likely to be rejected.
  14. == If you're not sure, ask!
  15. Don't be afraid to ask for advice before working on a
  16. contribution. If you're thinking about a bigger change, especially that might
  17. affect the core working or architecture, it's almost essential to talk and ask
  18. about what you're planning might affect things. Some of the larger future plans may not be
  19. documented well so it's difficult to understand how your change might affect
  20. the general direction and roadmap of this project without asking.
  21. The preferred way to communicate is probably via Discord or GitHub issues.
  22. == Dev environment setup and clean build
  23. ```
  24. # Step1: setup compile env
  25. # - Fedora
  26. dnf install git go protobuf-compiler make pre-commit -y
  27. # - Windows with chocolatey
  28. choco install git go protoc make python nodejs-lts -y && pip install pre-commit
  29. # Step2: clone and setup repo
  30. git clone https://github.com/OliveTin/OliveTin.git
  31. cd OliveTin
  32. pre-commit install
  33. # Step3: compile binary for current dev env (OS, ARCH)
  34. # `make proto` will also run `make go-tools`, which installs "buf". This binary
  35. # will be put in your GOPATH/bin/, which should be on your path. buf is used to
  36. # generate the protobuf / Connect RPC stubs.
  37. make proto
  38. make
  39. ./OliveTin
  40. ```
  41. === Getting started to contribute;
  42. The project layout is reasonably straightforward;
  43. * See the `Makefile` for common targets. This project was originally created on top of Fedora, but it should be usable on Debian/your faveourite distro with minor changes (if any).
  44. * End-user documentation (AsciiDoc for link:https://docs.olivetin.app[docs.olivetin.app]) lives in `docs/` as an Antora component; the published site is built from the separate link:https://github.com/OliveTin/docs.olivetin.app[docs.olivetin.app] repository.
  45. * The API is defined in protobuf+Connect RPC - you will need to `make proto`.
  46. * The Go daemon is built from the `cmd` and `internal` directories mostly.
  47. * The webui is just a single page application with a bit of Javascript in the `webui` directory. This can happily be hosted on another webserver.
  48. == Mechanics of submitting a pull request
  49. When you are ready for a PR, please see the link:.github/PULL_REQUEST_TEMPLATE.md[pull request template].