diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 50d0b3c83..a1ddbe7f7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,42 +1,60 @@ # Contributing to FOSSBilling -:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: +:+1::tada: First off, thanks for expressing an interest in contributing to FOSSBilling! :tada::+1: -The following is a set of guidelines for contributing to FOSSBilling, which are hosted in the [FOSSBilling Organization](https://github.com/FOSSBilling) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. +Whether open source projects live or die completely depends on community participation and involvement. This one is no exception, so we appreciate amd welcome every contribution. -#### Table Of Contents +The document is a set of guidelines for contributing to FOSSBilling code and documentation, which are hosted in the [FOSSBilling Organization](https://github.com/FOSSBilling) on GitHub. These are strong guidelines but not set in stone rules. Please use your best judgement, feel free to propose changs to this document in a pull request, and don't be afraid to ask questions. -[Code of Conduct](#code-of-conduct) +We've tried to keep this document as short as possible but there is a lot of information to get through. If you are looking for something specific then you can use the table of contents to skip to that section: -[I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question) +#### Contents -[What should I know before I get started?](#what-should-i-know-before-i-get-started) +[Why should I contribute to FOSSBilling?](#why-should-i-contribute) + +[Before you get started](#before-you-get-started) + * [Code of Conduct](#code-of-conduct) + * [Which 'branch' should I contribute to?](#which-branch-should-i-contribute-to) + * [Understanding the structure of FOSSBilling](#) [How can I contribute?](#how-can-i-contribute) - * [Reporting Bugs](#reporting-bugs) - * [Suggesting Enhancements](#suggesting-enhancements) - * [Your First Code Contribution](#your-first-code-contribution) - * [Pull Requests](#pull-requests) + * [Reporting bugs](#reporting-bugs) + * [Suggesting improvements](#suggesting-improvements) + * [Contributing Code](#contributing-code) + * [Writing Documentation](#writing-documentation) + * [Translating FOSSBilling](#translating-fossbilling) + * [Sponsor the project](#sponsor-the-project) [Styleguides](#styleguides) - * [Git Commit Messages](#git-commit-messages) - * [JavaScript Styleguide](#javascript-styleguide) - * [Documentation Styleguide](#documentation-styleguide) -[Additional Notes](#additional-notes) - * [Issue and Pull Request Labels](#issue-and-pull-request-labels) +[But, I still have a question!](#but-i=stil-have-a-question) -## Code of Conduct + +## Why should I contribute? + +In one simple sentence, because every contribution means not just that you give something back to the community but also that you get to use and enjoy better software. + +If you need more reasons than that though, then because... + +* __Shape the project future__ There are a lot of open issues in our GitHub repo, by taking part in discussion and submitting code contributions to work on the ones that are most important to you, you get to shape the future of the project. +* __Develop your skills__ Whether you are writing PHP or writing documentation, being a part of a collaborative project with others actively reviewing your work helps you to build your skills. +* __It's fun__ We are transforming an outdated piece of software and building something modern and exciting, there are going to be a lot of challenges along the way, and taking part in solving them is fun and satisfying. + +## Before you get started + +### Code of Conduct + +First off, however you plan to take part, please take a couple of minutes to read our code of conduct before contributing anything. This project and everyone participating in it is governed by the [FOSSBilling Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to the moderators on our [Discord](https://fossbilling.org/discord) communities. -## I don't want to read this whole thing I just have a question!!! +### Which 'branch' should I contribute to? -Drop a message to [Discord](https://fossbilling.org/discord) community for a question. Sometimes it takes time to respond; please be patient! +The future of FOSSBilling is the /lara branch, which is a major rewrite of the codebase built on Laravel, but there is still a long way to go until we reach a release. This is the branch that you should contribute to if you want to contribute to the long term future of the project. -## What should I know before I get started? +In the meantime, the /main branch is being maintained with bug fixes, security updates and small enhancements. It is the codebase that was inherited from BoxBilling with some small enhancements and updates. -### FOSSBilling structure +### Unserstanding the strucutre of FOSSBilling FOSSBilling is an open source project — it's made up of over [50 modules](https://github.com/FOSSBilling/FOSSBilling/tree/master/src/bb-modules). When you initially consider contributing to FOSSBilling, you might be unsure about which of those 50 modules implements the functionality you want to change or report a bug for. This section should help you with that. @@ -50,19 +68,22 @@ If you need to sell new type of product you will implement Service type module. Other modules extend whole FOSSBilling API with any functionality needed. Check existing modules to get the idea of what is already shipped with default structure of FOSSBilling. -## How Can I Contribute? + +## How can I contribute? + +There are a lot of different ways that you can get involved in the FOSSBilling project. Let's take a look at some of the main ones: ### Reporting Bugs -This section guides you through submitting a bug report for FOSSBilling. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer: :computer:, and find related reports :mag_right:. - -Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). - -> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one. +If you find a bug in FOSSBilling, then please report it. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer:, and find related reports :mag_right:. #### Before Submitting A Bug Report -* **Perform a [cursory search](https://github.com/search?q=+is%3Aissue+user%3Afossbilling)** to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one. +⚠️ If your report is for a potential secuirity exploit, please do not make it public by creating an Issue, but instead follow the instructions in our [Security Policy](https://github.com/FOSSBilling/FOSSBilling/security/policy). + +Firstly, **Do a [search](https://github.com/search?q=+is%3Aissue+user%3Afossbilling)** of the existing issues to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one. + +> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one. #### How Do I Submit A (Good) Bug Report? @@ -91,26 +112,28 @@ Include details about your configuration and environment: * **What's the MySQL version your server is using**? * **What's the Web Server and version your using**? -### Suggesting Enhancements +### Suggesting Improvements or Features -This section guides you through submitting an enhancement suggestion for FOSSBilling, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:. +⚠️ Please note the title is __*Suggesting*__, not __*Demanding*__. Be polite, appreciate other people's time, and explain in detail, and you are far more likely to get what you want! -Before creating enhancement suggestions, please check [this list](#before-submitting-an-enhancement-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). +FOSSBilling is not designed to be all thigns to all peoople, but we do want it to be as useful and usable as possible. If you have a suggestion for a new feature or an improvement to an existing one then please do submit it. Please be as clear and explicit as you can and provide as much detail as you can, this will make it much easier for the community and maintainers to understand your suggestion and take action. -### Your First Code Contribution +Before creating enhancement suggestions, please check through the [existing Issues](https://github.com/FOSSBilling/FOSSBilling/issues) and see if somebody has already made the same suggestion. If they have then please don't create a new issue, but instead add your thoughts and comments to the existing one. -Unsure where to begin contributing to FOSSBilling? You can start by looking through these `good first issue` and `help-wanted` issues: +### Contributing Code -* [Good first issues][good first issue] - issues which should only require a few lines of code, and a test or two. -* [Help wanted issues][help-wanted] - issues which should be a bit more involved than `good first issue` issues. +The source code is the heart of FOSSBilling, and we are always interested in quiality contributions to improve it, squash bugs, and close open issues. Please follow these guidelines to make things easier for yourself and for other contributors. -Both issue lists are sorted by total number of comments. While not perfect, number of comments is a reasonable proxy for impact a given change will have. +#### What to Work On +Check out our upcoming Milestones for an overview of what needs to be done. See the Good first issue label for a list of issues that should be relatively easy to get started with. If there's anything you're unsure of, don't hesitate to ask! All of us were just starting out once. + +If you're planning to go ahead and work on something, please leave a comment in the relevant issue or create a new one explaining what you are doing. This helps us divide our efforts more sensibly by ensuring that we are not all doing the same thing at the same time. #### Local development FOSSBilling and all packages can be developed localy. Instructions on how to do this are provided in [Readme](README.md): -### Pull Requests +### Making a pull Requests The process described here has several goals: @@ -125,41 +148,62 @@ Please follow these steps to have your contribution considered by the maintainer 2. Follow the [styleguides](#styleguides) 3. After you submit your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing
What if the status checks are failing?If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.
-While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted. +Before a PR can be merged it must pass all of the automated tests and also be reviewed by two maintainers. All of the above requirements must be met before your pull request will be reviewed. Please be aware that the the reviewers may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted. + +### Writing Documentation + +Great code is only one half of any successful project, and great documentation is just as important. The reality is that open source projects can stand or fall based on the quality of their documentation. + +The documentation for FOSSBilling is hosted here: [FOSSBilling Docs](https://docs.fossbilling.org/) + +Documentation is buit using [Docusauras](https://docusaurus.io/) from this [GitHub repository](https://github.com/FOSSBilling/docs). You can contribute directly to the repo on GitHub or using the *Edit this page* links on each page of the docs site. + +Please try to be thorough and clear when writing directions. Something might seem obvious to you, but do not assume that it is to everybody else. + +### Translating FOSSBilling + +We would like FOSSBilling to be available to as many people in as many languages as possible. + +The software is primarily written in English. If you are a native or fluent speaker of another language then we could really use your help with transaltionn. + +### Sponsor the project + +If you do not have the time or necessary skills to actively take part in the developemnt or documentation of the project then you can still play a part by making a financial contribution to the project. This could be a one time contribution or a recurring montly donation. + +You can do this using [GitHub Sponsors](https://github.com/sponsors/FOSSBilling) or on [Open Collective](https://opencollective.com/fossbilling). + ## Styleguides -### Git Commit Messages +### Commit Messages Styleguide + +Please be as clear and descriptive as possible in your commit messages, it makes it much easier for everyone to follow them. * Use the present tense ("Add feature" not "Added feature") * Use the imperative mood ("Move cursor to..." not "Moves cursor to...") * Limit the first line to 72 characters or less * Reference issues and pull requests liberally after the first line * When only changing documentation, include `[ci skip]` in the commit title -* Consider starting the commit message with an applicable emoji: - * :art: `:art:` when improving the format/structure of the code - * :racehorse: `:racehorse:` when improving performance - * :non-potable_water: `:non-potable_water:` when plugging memory leaks - * :memo: `:memo:` when writing docs - * :penguin: `:penguin:` when fixing something on Linux - * :apple: `:apple:` when fixing something on macOS - * :checkered_flag: `:checkered_flag:` when fixing something on Windows - * :bug: `:bug:` when fixing a bug - * :fire: `:fire:` when removing code or files - * :green_heart: `:green_heart:` when fixing the CI build - * :white_check_mark: `:white_check_mark:` when adding tests - * :lock: `:lock:` when dealing with security - * :arrow_up: `:arrow_up:` when upgrading dependencies - * :arrow_down: `:arrow_down:` when downgrading dependencies - * :shirt: `:shirt:` when removing linter warnings - +* When it is appropriate start the commit message with an applicable emoji: + * 🎨 when improving the format/structure of the code + * 🚀 when improving performance + * 📝 when writing docs + * 🐛 when fixing a bug + * 🔒 when dealing with security + * ⬆️ when upgrading dependencies + ### PHP Styleguide -All PHP must adhere to [PSR-2](https://www.php-fig.org/psr/psr-2/). +All PHP must adhere to [PSR-12](https://www.php-fig.org/psr/psr-12/). + +The /lara branch is a work in progress and is being built in Laravel. If you are not familiar with the framework then please take a look at the [Laravel docs](https://laravel.com/docs/9.x) before diving in. ### Documentation Styleguide -[Documentation repository can be found here](https://github.com/FOSSBilling/wiki) +We don't have a formal Documentation Styleguide yet, but we will be developing one in the near future. In the meantime please take a look at the existing documentation and follow the tone and writing style so that everything stays coherenet. -* Use [Read The Docs](Read The Docs) style guide. -* Use [Markdown](https://daringfireball.net/projects/markdown). +Docusauras uses Markdown and MDX. Please [see their guides](https://docusaurus.io/docs/markdown-features) for how to use them if you are not sure. + +## But, I still have a question! + +Drop a message to [Discord](https://fossbilling.org/discord) community for a question. Sometimes it takes time to respond; please be patient!