From d49d284d4ad86c4b30acfe0cf372534364872930 Mon Sep 17 00:00:00 2001 From: Andrey Meshkov Date: Mon, 12 Jun 2023 13:53:26 +0300 Subject: [PATCH] all: github action for potential dups and improved issue forms --- .github/ISSUE_TEMPLATE/bug.yml | 197 ++++++++++++--------- .github/ISSUE_TEMPLATE/feature.yml | 77 ++++---- .github/workflows/potential-duplicates.yml | 34 ++++ 3 files changed, 194 insertions(+), 114 deletions(-) create mode 100644 .github/workflows/potential-duplicates.yml diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index a5c40e4f..37adbad6 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -1,109 +1,142 @@ 'body': - 'attributes': - 'description': > - Please make sure that the issue is not a duplicate or a question. - If it's a duplicate, please react to the original issue with a - thumbs up. If it's a question, please post it to the GitHub - Discussions page. - 'label': 'Prerequisites' - 'options': - - 'label': > - I have checked the - [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and - [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions) - and found no answer - 'required': true - - 'label': > - I have searched other issues and found no duplicates - 'required': true - - 'label': > - I want to report a bug and not ask a question - 'required': true + 'description': > + Please make sure that the issue is not a duplicate or a question. + If it's a duplicate, please react to the original issue with a + thumbs up. If it's a question, please post it to the GitHub + Discussions page. + 'label': 'Prerequisites' + 'options': + - 'label': > + I have checked the + [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and + [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions) + and found no answer + 'required': true + - 'label': > + I have searched other issues and found no duplicates + 'required': true + - 'label': > + I want to report a bug and not ask a question + 'required': true 'id': 'prerequisites' 'type': 'checkboxes' - 'attributes': - 'description': 'On which operating system type does the issue occur?' - 'label': 'Operating system type' - 'options': - - 'FreeBSD' - - 'Linux, OpenWrt' - - 'Linux, Other (please mention the version in the description)' - - 'macOS (aka Darwin)' - - 'OpenBSD' - - 'Windows' - - 'Other (please mention in the description)' + 'description': 'On which operating system type does the issue occur?' + 'label': 'Operating system type' + 'options': + - 'FreeBSD' + - 'Linux, OpenWrt' + - 'Linux, Other (please mention the version in the description)' + - 'macOS (aka Darwin)' + - 'OpenBSD' + - 'Windows' + - 'Other (please mention in the description)' 'id': 'os' 'type': 'dropdown' 'validations': - 'required': true + 'required': true - 'attributes': - 'description': 'On which CPU architecture does the issue occur?' - 'label': 'CPU architecture' - 'options': - - 'AMD64' - - 'x86' - - '64-bit ARM' - - 'ARMv5' - - 'ARMv6' - - 'ARMv7' - - '64-bit MIPS' - - '64-bit MIPS LE' - - '32-bit MIPS' - - '32-bit MIPS LE' - - '64-bit PowerPC LE' - - 'Other (please mention in the description)' + 'description': 'On which CPU architecture does the issue occur?' + 'label': 'CPU architecture' + 'options': + - 'AMD64' + - 'x86' + - '64-bit ARM' + - 'ARMv5' + - 'ARMv6' + - 'ARMv7' + - '64-bit MIPS' + - '64-bit MIPS LE' + - '32-bit MIPS' + - '32-bit MIPS LE' + - '64-bit PowerPC LE' + - 'Other (please mention in the description)' 'id': 'arch' 'type': 'dropdown' 'validations': - 'required': true + 'required': true - 'attributes': - 'description': 'How did you install AdGuard Home?' - 'label': 'Installation' - 'options': - - 'GitHub releases or script from README' - - 'Docker' - - 'Snapcraft' - - 'Custom port' - - 'Other (please mention in the description)' + 'description': 'How did you install AdGuard Home?' + 'label': 'Installation' + 'options': + - 'GitHub releases or script from README' + - 'Docker' + - 'Snapcraft' + - 'Custom port' + - 'Other (please mention in the description)' 'id': 'install' 'type': 'dropdown' 'validations': - 'required': true + 'required': true - 'attributes': - 'description': 'How did you setup AdGuard Home?' - 'label': 'Setup' - 'options': - - 'On one machine' - - 'On a router, DHCP is handled by the router' - - 'On a router, DHCP is handled by AdGuard Home' - - 'Other (please mention in the description)' + 'description': 'How did you setup AdGuard Home?' + 'label': 'Setup' + 'options': + - 'On one machine' + - 'On a router, DHCP is handled by the router' + - 'On a router, DHCP is handled by AdGuard Home' + - 'Other (please mention in the description)' 'id': 'setup' 'type': 'dropdown' 'validations': - 'required': true + 'required': true - 'attributes': - 'description': 'What version of AdGuard Home are you using?' - 'label': 'AdGuard Home version' + 'description': 'What version of AdGuard Home are you using?' + 'label': 'AdGuard Home version' 'id': 'version' 'type': 'input' 'validations': - 'required': true + 'required': true - 'attributes': - 'description': 'Please describe the bug' - 'label': 'Description' - 'value': | - #### What did you do? - - #### Expected result - - #### Actual result - - #### Screenshots (if applicable) - - #### Additional information - 'id': 'description' + 'description': 'Please provide a set of steps to reproduce the issue' + 'label': 'Issue Details' + 'placeholder': + 'value': | + Steps to reproduce: + 1. + 2. + 3. + 'id': 'what-happened' 'type': 'textarea' 'validations': - 'required': true -'description': 'File a bug report' -'name': 'Bug' + 'required': true + - 'attributes': + 'label': 'Expected Behavior' + 'description': 'Describe the expected behavior' + 'placeholder': | + A clear and concise description of what you expected to happen. + 'id': 'expected-behavior' + 'type': 'textarea' + 'validations': + 'required': false + - 'attributes': + 'label': 'Actual Behavior' + 'description': 'Describe the actual behavior' + 'placeholder': 'A clear description of what happened instead.' + 'id': 'actual-behavior' + 'type': 'textarea' + 'validations': + 'required': true + - 'attributes': + 'label': 'Screenshots' + 'description': | + If applicable add screenshots explaining your problem. + You can drag and drop images or paste them from clipboard. + Use `
` tag to hide screenshots under the spoiler. + 'placeholder': 'If applicable add screenshots explaining your problem.' + 'value': | +
Screenshot 1: + + + +
+ 'id': 'screenshots' + 'type': 'textarea' + 'validations': + 'required': false +'description': > + Open a bug report. Please do not open bug reports for questions. If you + want to ask a question, ask in in the Discussions section. +'name': 'Bug report' +'labels': [ 'bug' ] diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index 0ad6f5d8..53359f03 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -1,41 +1,54 @@ 'body': - 'attributes': - 'description': > - Please make sure that the issue is not a duplicate or a question. - If it's a duplicate, please react to the original issue with a - thumbs up. If it's a question, please post it to the GitHub - Discussions page. - 'label': 'Prerequisites' - 'options': - - 'label': > - I have checked the - [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and - [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions) - and found no answer - 'required': true - - 'label': > - I have searched other issues and found no duplicates - 'required': true - - 'label': > - I want to request a feature or enhancement and not ask a - question - 'required': true + 'description': > + Please make sure that the issue is not a duplicate or a question. + If it's a duplicate, please react to the original issue with a + thumbs up. If it's a question, please post it to the GitHub + Discussions page. + 'label': 'Prerequisites' + 'options': + - 'label': > + I have checked the + [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and + [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions) + and found no answer + 'required': true + - 'label': > + I have searched other issues and found no duplicates + 'required': true + - 'label': > + I want to request a feature or enhancement and not ask a + question + 'required': true 'id': 'prerequisites' 'type': 'checkboxes' - 'attributes': - 'description': 'Please describe the request' - 'label': 'Description' - 'value': | - #### What problem are you trying to solve? - - #### Proposed solution - - #### Alternatives considered - - #### Additional information - 'id': 'description' + 'description': 'What happened?' + 'placeholder': | + Is your feature request related to a problem? Please add a clear and + concise description of what the problem is. + 'label': 'Issue Details' + 'id': 'what-happened' 'type': 'textarea' 'validations': - 'required': true + 'required': true + - 'attributes': + 'description': 'What do you propose to change in AdGuard Home?' + 'placeholder': | + Describe the solution you'd like in a clear and concise manner. + 'label': 'Proposed solution' + 'id': 'proposed-solution' + 'type': 'textarea' + 'validations': + 'required': true + - 'attributes': + 'description': 'Are there any other ways to solve the problem?' + 'placeholder': | + A clear and concise description of any alternative solutions or features + you've considered. + 'label': 'Alternative solution' + 'id': 'alternative-solution' + 'type': 'textarea' 'description': 'Suggest a feature or an enhancement for AdGuard Home' 'name': 'Feature request or enhancement' +'labels': [ 'feature request' ] diff --git a/.github/workflows/potential-duplicates.yml b/.github/workflows/potential-duplicates.yml new file mode 100644 index 00000000..c4a24f1f --- /dev/null +++ b/.github/workflows/potential-duplicates.yml @@ -0,0 +1,34 @@ +'name': 'potential-duplicates' +'on': + 'issues': + 'types': [ 'opened', 'edited' ] +'jobs': + 'run': + 'runs-on': 'ubuntu-latest' + 'steps': + - 'uses': 'wow-actions/potential-duplicates@v1' + 'with': + 'GITHUB_TOKEN': ${{ secrets.GITHUB_TOKEN }} + # Issue title filter work with https://www.npmjs.com/package/anymatch. + # Any matched issue will stop detection immediately. + # You can specify multi filters in each line. + # 'filter': '' + # Exclude keywords in title before detecting. + # 'exclude': '' + # Label to set, when potential duplicates are detected. + 'label': 'potential-duplicate' + # Get issues with state to compare. Supported state: 'all', 'closed', + # 'open'. + 'state': 'all' + # If similarity is higher than this threshold([0,1]), issue will be + # marked as duplicate. + 'threshold': 0.6 + # Reactions to be add to comment when potential duplicates are + # detected. Available reactions: "-1", "+1", "confused", "laugh", + # "heart", "hooray", "rocket", "eyes". + # 'reactions': 'eyes, confused' + # Comment to post when potential duplicates are detected. + 'comment': > + Potential duplicates: {{#issues}} + - [#{{ number }}] {{ title }} ({{ accuracy }}%) + {{/issues}}