diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000000..dce8a651d0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,59 @@ +name: "Bug report" +description: "Report a bug that you identified in iTop, with the steps to reproduce it and the expected vs actual behavior. If you have an improvement proposition, please use the 'Enhancement suggestion' template instead." +body: + - type: markdown + attributes: + value: | + Please explain why you're creating this issue : + - Are you willing to create a PR for the bug fix ? If so, we'll indicate in the issue if we're interested in it. + - Then, please describe how to reproduce the issue. + + - type: dropdown + id: willing_to_pr + attributes: + label: Are you willing to create (at a later stage) a PR for that? + options: + - Yes + - No + validations: + required: true + + - type: input + id: itop_version + attributes: + label: iTop version + description: "Complete iTop version (e.g., 3.2.3)" + validations: + required: false + + - type: input + id: php_version + attributes: + label: PHP version + description: "Complete PHP version (e.g., 8.4.20)" + validations: + required: false + + - type: textarea + id: reproduction_steps + attributes: + label: Reproduction procedure + description: | + Please explain step by step how to reproduce the issue on a standard iTop Community. + If it requires a custom datamodel, provide the minimal XML delta to reproduce it. + placeholder: | + 1. First go there + 2. Then do that + 3. ... + 4. Finally, see that... (what is expected and what is actually happening) + validations: + required: false + + - type: upload + id: additional_info + attributes: + label: Additional information (if needed) + description: "Add/drag and drop screenshots, logs or any files that can be relevant for your issue." + validations: + required: false + accept: ".png, .jpg, .jpeg, .gif, .webp, .log, .txt, .json, .csv, .xml, .zip, .tar.gz" diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml new file mode 100644 index 0000000000..e8532dc4b0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.yml @@ -0,0 +1,54 @@ +name: "Enhancement suggestion" +description: "Suggest an improvement to iTop, with a clear description of the expected behavior and the benefits it would bring. If you identified a bug and have an improvement proposition, please use the 'Bug report' template instead." +body: + - type: markdown + attributes: + value: | + Please explain why you're creating this issue : + - Are you willing to create a PR for this enhancement ? If so, we'll indicate in the issue if we're interested in it. + - Then, please describe what's your improvement proposition. + + - type: dropdown + id: willing_to_pr + attributes: + label: Are you willing to create (at a later stage) a PR for that? + options: + - Yes + - No + validations: + required: true + + - type: input + id: itop_version + attributes: + label: iTop version + description: "Complete iTop version (e.g., 3.2.3)" + validations: + required: false + + - type: input + id: php_version + attributes: + label: PHP version + description: "Complete PHP version (e.g., 8.4.20)" + validations: + required: false + + - type: textarea + id: enhancement_details + attributes: + label: Enhancement details + description: | + Please explain what you want to improve, and your proposition to make it better. + If it requires a custom datamodel, provide the minimal XML delta to reproduce it. + validations: + required: false + + - type: upload + id: additional_info + attributes: + label: Additional information (if needed) + description: "Add/drag and drop screenshots, logs or any files that can be relevant for your issue." + validations: + required: false + accept: ".png, .jpg, .jpeg, .gif, .webp, .log, .txt, .json, .csv, .xml, .zip, .tar.gz" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4176e4b531..bd2971542f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,83 +1,76 @@ ## Base information -| Question | Answer -|---------------------------------------------------------------|-------- -| Related to a SourceForge thead / Another PR / Combodo ticket? | -| Type of change? | Bug fix / Enhancement / Translations +| Question | Answer | +|---------------------------------------------------------------------------------|--------------------------------------| +| Related to a SourceForge thread / Another PR / A GitHub Issue / Combodo ticket? | | +| Type of change? | Bug fix / Enhancement / Translations | ## Symptom (bug) / Objective (enhancement) + - ## Reproduction procedure (bug) + 1. On iTop x.y.z 2. With PHP x.y.z -2. First go there -2. Then do that -3. ... -4. Finally, see that... +3. First go there +4. Then do that +5. ... +6. Finally, see that... (what is expected and what is actually happening) +## Reproduction procedure (enhancement - if needed) + + ## Cause (bug) + - ## Proposed solution (bug and enhancement) + - ## Checklist before requesting a review + + - [ ] I have performed a self-review of my code - [ ] I have tested all changes I made on an iTop instance - [ ] I have added a unit test, otherwise I have explained why I couldn't -- [ ] Is the PR clear and detailed enough so anyone can understand digging in the code? - -## Checklist of things to do before PR is ready to merge - - -- [ ] ... -- [ ] ... -- [ ] ... +- [ ] Is the PR clear and detailed enough so anyone can understand without digging in the code? \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3cb5eb8617..b6d820351f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,30 +4,33 @@ You want to contribute to iTop? Many thanks to you! 🎉 👍 Here are some guidelines that will help us integrate your work! - ## Contributions ### Subjects + You are welcome to create pull requests on any of those subjects: * 🐛 bug fix * 🌐 translation / i18n / l10n +* 🚸 enhancement -If you want to implement a **new feature**, please [create a corresponding ticket](https://sourceforge.net/p/itop/tickets/new/) for review. -If you ever want to begin implementation, do so in a fork, and add a link to the corresponding commits in the ticket. +But before creating a PR, please [create a corresponding issue][itop-issues] for review. +We should review within two weeks, and get back to you to indicate if we're interested in your proposal or not. +If you don't create an issue, you won't know if we're interested in your contribution, and you may spend time coding something that won't be accepted. +If you ever want to begin implementation, do so in a fork, and add a link to the corresponding commits in the issue. For all **security related subjects**, please see our [security policy](SECURITY.md). -All **datamodel modification** should be done in an extension. Beware that such change would -impact all existing customers, and could prevent them from -upgrading! -Combodo has a long experience of datamodel changes: they are very disruptive! +All **datamodel modification** should be done in an extension. Beware that such change would +impact all existing customers, and could prevent them from upgrading! +Combodo has a long experience of datamodel changes: they are very disruptive! This is why we avoid them in iTop core, especially the changes on existing objects/fields. -If you have an idea you're sure would benefit to all of iTop users, you may -[create a corresponding ticket](https://sourceforge.net/p/itop/tickets/new/) to submit it, but be warned that there are lots of good +If you have an idea you're sure would benefit to all of iTop users, you may +[create a corresponding issue][itop-issues] to submit it, but be warned that there are lots of good reasons to refuse such changes. ### 📄 License and copyright + iTop is distributed under the AGPL-3.0 license (see the [license.txt] file). The iTop repository is divided in three parts: iTop (mainly PHP/JS/XML sources and dictionaries), images, and third-party libraries. @@ -37,48 +40,33 @@ Anyhow, you are encouraged to signal your contribution by the mean of `@author` If you want to use another license or keep the code ownership (copyright), you may [create an extension][wiki new ext]. [license.txt]: https://github.com/Combodo/iTop/blob/develop/license.txt -[wiki new ext]: https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Astart#by_writing_your_own_extension +[itop-issues]: https://github.com/Combodo/iTop/issues + +[wiki new ext]: https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Astart#by_writing_your_own_extension ## 🔀 iTop branch model When we first start with Git, we were using the [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/) branch model. As - there was some confusions about branches to use for current developed release and previous maintained release, and also because we were - using just a very few of the GitFlow commands, we decided to add just a little modification to this branch model : since april 2020 - we don't have a `master` branch anymore. +there was some confusions about branches to use for current developed release and previous maintained release, and also because we were +using just a very few of the GitFlow commands, we decided to add just a little modification to this branch model : since April 2020 +we don't have a `master` branch anymore. -Here are the branches we use and their meaning : +Here are the branches we use and their meaning : - `develop`: ongoing development version -- `release/*`: if present, that means we are working on a alpha/beta/rc version for shipping - `support/*`: maintenance branches for older versions For example, if no version is currently prepared for shipping we could have: -- `develop` containing future 3.1.0 version -- `support/3.0`: 3.0.x maintenance version -- `support/2.7`: 2.7.x maintenance version -- `support/2.6`: 2.6.x maintenance version +- `develop` containing future 3.3.0 version +- `support/3.2`: 3.2.x maintenance version -In this example, when 3.1.0-beta is shipped that will become: - -- `develop`: future 3.2.0 version -- `release/3.1.0`: 3.1.0-beta -- `support/3.0`: 3.0.x maintenance version -- `support/2.7`: 2.7.x maintenance version -- `support/2.6`: 2.6.x maintenance version - -And when 3.1.0 final will be out: - -- `develop`: future 3.2.0 version -- `support/3.1`: 3.1.x maintenance version (will host developments for 3.1.1) -- `support/3.0`: 3.0.x maintenance version -- `support/2.7`: 2.7.x maintenance version -- `support/2.6`: 2.6.x maintenance version - -Also note that we have a "micro-version" concept : each of those versions have a very small amount of modifications. They are made from - `support/*` branches as well. For example 2.6.2-1 and 2.6.2-2 were made from the `support/2.6.2` branch. +And when 3.3.0 will be out: +- `develop`: future 3.4.0 version +- `support/3.3`: 3.3.x maintenance version (will host developments for 3.3.1) +- `support/3.2`: 3.2.x maintenance version ## Coding @@ -92,12 +80,11 @@ A [dedicated page](https://www.itophub.io/wiki/page?id=latest%3Acustomization%3A 2. Create a branch in this fork, based on the develop branch 3. Code ! -Do create a dedicated branch for each modification you want to propose : if you don't it will be very hard to merge back your work ! +Do create a dedicated branch for each modification you want to propose : if you don't, it will be very hard to merge back your work ! -Most of the time you should based your developments on the develop branch. +Most of the time you should base your developments on the develop branch. That may be different if you want to fix a bug, please use develop anyway and ask in your PR if rebase is possible. - ### 🎨 PHP styleguide Please follow [our guidelines](https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Acoding_standards). @@ -106,7 +93,7 @@ Please follow [our guidelines](https://www.itophub.io/wiki/page?id=latest%3Acust Please create tests that covers as much as possible the code you're submitting. -Our tests are located in the `test/` directory, containing a PHPUnit config file : `phpunit.xml.dist`. +Our tests are located in the `tests/` directory, containing a PHPUnit config file : `phpunit.xml.dist`. ### Git Commit Messages @@ -138,14 +125,14 @@ When your code is working, please: * Rebase your branch on our repo last commit, * Create a pull request. _Detailed procedure to work on fork and create PR is available [in GitHub help pages](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)_. * Pull request description: mind to add all the information useful to understand why you're suggesting this modification and anything necessary to dive into your work. Especially: - - Bugfixes: exact steps to reproduce the bug (given/when/then), description of the bug cause and what solution is implemented - - Enhancements: use cases, implementation details if needed -* Mind to check the "[Allow edits from maintainers](https://docs.github.com/en/github-ae@latest/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)" option ! (note that if you are working with an org fork, this option [won't be available](https://github.com/orgs/community/discussions/5634)) - + - Bugfixes: exact steps to reproduce the bug (given/when/then), description of the bug cause and what solution is implemented + - Enhancements: use cases, implementation details if needed +* Mind to check the "[Allow edits from maintainers](https://docs.github.com/en/github-ae@latest/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)" option ! (note that if you are working with an org fork, this + option [won't be available](https://github.com/orgs/community/discussions/5634)) ## 🙏 We are thankful -We are thankful for all your contributions to the iTop universe! As a thank you gift, we will send stickers to every iTop (& extensions) contributors! +We are thankful for all your contributions to the iTop universe! As a thank-you gift, we will send stickers to every iTop (& extensions) contributors! We have one sticker per contribution type. You might get multiple stickers with one contribution though :) @@ -157,8 +144,4 @@ We have one sticker per contribution type. You might get multiple stickers with * Graduated: Follow a Combodo's iTop training * Ambassador: Outstanding community contributors * Beta tester: Test and give feedback on beta releases -* Extension developer: Develop and publish an extension - -Here is the design of each stickers for year 2024: - -![iTop stickers 2024](.doc/contributing-guide/2024.contributing-stickers-side-by-side.png) +* Extension developer: Develop and publish an extension \ No newline at end of file