From 43c906c6c22e37eec26ea4f67d9b817f0c661e9b Mon Sep 17 00:00:00 2001 From: Stanislas Date: Fri, 4 Oct 2024 11:55:39 +0200 Subject: [PATCH] Feat(Repo): add issue / PR template and label-commenter and close/stale issue config (#556) --- .github/ISSUE_TEMPLATE/bug_report.yml | 174 +++++++++++------------- .github/label-commenter-config.yml | 25 ++++ .github/pull_request_template.md | 15 ++ .github/workflows/close_stale_issue.yml | 35 +++++ .github/workflows/label-commenter.yml | 20 +++ 5 files changed, 171 insertions(+), 98 deletions(-) create mode 100644 .github/label-commenter-config.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/close_stale_issue.yml create mode 100644 .github/workflows/label-commenter.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 601aca6ae0..afa46083ba 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,126 +1,104 @@ name: Bug Report -description: File a bug report -labels: ["bug"] +description: Create a report to help us improve glpiinventory body: - type: markdown attributes: value: | - Thanks for taking the time to fill out this bug report! - - type: textarea - id: description + + Dear GLPI plugin user. + + **⚠️ Please never use standard issues to report security problems. See [security policy](https://github.com/pluginsGLPI/glpiinventory/security/policy) for more details. ⚠️** + + BEFORE SUBMITTING YOUR ISSUE, please make sure to read and follow these steps: + + * We do not track feature requests nor enhancements here. Propose them on the [suggest dedicated site](https://suggest.glpi-project.org). + * Keep this tracker in ENGLISH. If you want support in your language, the [community forum](https://forum.glpi-project.org) is the best place. + * Always try to reproduce your issue at least on latest stable release. + + The GLPI team. + - type: markdown + attributes: + value: | + ## Professional Support + + We do not guarantee any processing / resolution time for community issues. + + If you need a quick fix or any guarantee, you should consider to buy a GLPI Network Subscription. + + More information here: https://glpi-project.org/subscriptions/ + - type: checkboxes + id: terms attributes: - label: Describe the bug - description: A clear and concise description of what the bug is. + label: Code of Conduct + description: By submitting this issue, you agree to follow hereinabove rules and [Contribution guide](https://github.com/glpi-project/glpi/blob/main/CONTRIBUTING.md) + options: + - label: I agree to follow this project's Code of Conduct validations: required: true - - type: textarea - id: reproduce + - type: checkboxes attributes: - label: To reproduce - description: "Steps to reproduce the behavior:" - placeholder: | - 1. - 2. - 3. - ... + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the bug you encountered. + options: + - label: I have searched the existing issues validations: required: true - - type: textarea - id: expected + - type: input + id: glpi-version attributes: - label: Expected behavior - placeholder: A clear and concise description of what you expected to happen. + label: GLPI Version + description: What version of our GLPI are you running? validations: required: true - - type: dropdown - id: os + - type: input + id: plugin-version attributes: - label: Operating system - description: On which operating system is the GLPI agent that is experiencing this issue? - options: - - Windows - - Linux - - MacOSX - - Other (See additional context below) - multiple: true + label: Plugin version + description: What version of `glpiinventory` are you running? validations: required: true - - type: dropdown - id: version + - type: textarea attributes: - label: GLPI Agent version - description: Which GLPI agent version is triggering this issue? - options: - - 1.6.1 - - 1.6 - - 1.5 - - 1.4 - - 1.3 - - 1.2 - - 1.1 - - 1.0 - - Nightly build (git version in additional context below) - - Other (See additional context below) - multiple: true + label: Bug description + description: A concise description of the problem you are experiencing and what you expected to happen. validations: - required: true - - type: dropdown - id: glpi-version + required: false + - type: textarea + id: logs attributes: - label: GLPI version - description: What is your GLPI version on server-side? - options: - - 10.0.12 - - 10.0.11 - - 10.0.10 - - 10.0.9 - - 10.0.8 - - 10.0.7 - - 10.0.6 - - 10.0.5 - - 10.0.4 - - 10.0.3 - - 10.0.2 - - 10.0.1 - - 10.0.0 - - Other (See additional context below) - - development release (See additional context below) - multiple: true + label: Relevant log output + description: | + Please copy and paste any relevant log output. Find them in `*-error.log` files under `glpi/files/_log/`. + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + render: shell + - type: input + id: url + attributes: + label: Page URL + description: If applicable, page URL where the bug happens. validations: - required: true - - type: dropdown - id: plugin-version + required: false + - type: textarea attributes: - label: GLPIInventory plugin - description: What is your GLPIInventory plugin version on server-side? - options: - - 1.3.5 - - 1.3.4 - - 1.3.3 - - 1.3.2 - - 1.3.1 - - 1.3.0 - - 1.2.3 - - 1.2.2 - - 1.2.1 - - 1.2.0 - - 1.1.0 - - 1.0.6 - - 1.0.5 - - 1.0.4 - - 1.0.3 - - 1.0.2 - - 1.0.1 - - 1.0.0 - - Other (See additional context below) - - development release (See additional context below) - multiple: true + label: Steps To reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. With this config... + 2. Go to... + 3. Scroll down to... + 4. See error... + validations: + required: false + - type: textarea + attributes: + label: Your GLPI setup information + description: Please copy and paste information you will find in GLPI in `Setup > General` menu, `System` tab. validations: required: false - type: textarea - id: context attributes: - label: Additional context - placeholder: Add any other context about the problem here. + label: Anything else? + description: Add any other context about the problem here. validations: required: false diff --git a/.github/label-commenter-config.yml b/.github/label-commenter-config.yml new file mode 100644 index 0000000000..b0c1bb4873 --- /dev/null +++ b/.github/label-commenter-config.yml @@ -0,0 +1,25 @@ +labels: + - name: "invalid" + labeled: + issue: + body: | + This issue has been closed because you did not provide the requested information. + action: "close" + - name: "support" + labeled: + issue: + body: | + This issue has been closed as we only track bugs here. + + You can get community support on [forums](https://forum.glpi-project.org/) or you can consider [taking a subscription](https://glpi-project.org/subscriptions/) to get professional support. + You can also [contact GLPI editor team](https://portal.glpi-network.com/contact-us) directly. + action: close + - name: "feature suggestion" + labeled: + issue: + body: | + This issue has been closed as we only track bugs here. + + You can open a topic to discuss with community about this enhancement on [suggestion website](https://glpi.userecho.com/). + You can also [contact GLPI editor team](https://portal.glpi-network.com/contact-us) directly if you are willing to sponsor this feature. + action: close diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..5121318500 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,15 @@ +## Checklist before requesting a review + +*Please delete options that are not relevant.* + +- [ ] I have performed a self-review of my code. +- [ ] I have added tests (when available) that prove my fix is effective or that my feature works. +- [ ] This change requires a documentation update. + +## Description + +- It fixes # (issue number, if applicable) +- Here is a brief description of what this PR does + +## Screenshots (if appropriate): + diff --git a/.github/workflows/close_stale_issue.yml b/.github/workflows/close_stale_issue.yml new file mode 100644 index 0000000000..a1b7003d05 --- /dev/null +++ b/.github/workflows/close_stale_issue.yml @@ -0,0 +1,35 @@ +name: 'Close stale issues' +on: + schedule: + - cron: '0 8 * * *' + +jobs: + stale: + if: github.repository == 'glpi-plugin/glpiinventory' + permissions: + issues: write # for actions/stale to close stale issues + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: >- + There has been no activity on this issue for some time and therefore it is considered stale + and will be closed automatically in 10 days. + + + If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, + feel free to add a comment to revive this issue. + + If it is related to a new feature, please open a topic to discuss with community about this enhancement + on [suggestion website](https://glpi.userecho.com/). + + + You may also consider taking a [subscription](https://glpi-project.org/subscriptions/) to get professionnal + support or [contact GLPI editor team](https://portal.glpi-network.com/contact-us) directly. + days-before-issue-stale: 15 + days-before-pr-stale: -1 # PR will be marked as stale manually. + days-before-close: 5 + exempt-issue-labels: "bug,enhancement,question,security" # Issues with "bug", "enhancement", "question" or "security" labels will not be marked as stale + exempt-all-milestones: true # Do not check issues/PR with defined milestone. + ascending: true # First check older issues/PR. + operations-per-run: 750 # Max API calls per run. diff --git a/.github/workflows/label-commenter.yml b/.github/workflows/label-commenter.yml new file mode 100644 index 0000000000..63706dd694 --- /dev/null +++ b/.github/workflows/label-commenter.yml @@ -0,0 +1,20 @@ +name: "Label commenter" + +on: + issues: + types: + - "labeled" + - "unlabeled" + +jobs: + comment: + permissions: + contents: "read" + issues: "write" + runs-on: "ubuntu-latest" + steps: + - name: "Checkout" + uses: "actions/checkout@v4" + + - name: "Label commenter" + uses: "peaceiris/actions-label-commenter@v1"