diff --git a/.github/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE deleted file mode 100644 index 88f375ab..00000000 --- a/.github/ISSUE_TEMPLATE +++ /dev/null @@ -1,30 +0,0 @@ - - -``` - * Extension version/Build date (to be found in "About.." or in "metadata.json") - * Cinnamon version (cinnamon --version) - * Distribution - (Mint 17.2, Arch, Fedora 25, etc...) - * Graphics hardware *and* driver used - * Snippet or attachment of ~/.cinnamon/glass.log - * Snippet or attachment of ~/.xsession-errors - - ``` - - - -**Notify author of extension** -@ - -**Issue** - - - -**Steps to reproduce** - - - -**Expected behaviour** - - - -**Other information** diff --git a/.github/ISSUE_TEMPLATE/01_bug_report.yml b/.github/ISSUE_TEMPLATE/01_bug_report.yml new file mode 100644 index 00000000..67ef938f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01_bug_report.yml @@ -0,0 +1,101 @@ +# DO NOT EDIT THIS FILE MANUALLY. +# Execute the script called bug_report_creator.py to generate it. + +--- +body: +- attributes: + value: Thanks for taking the time to fill out this bug report! + type: markdown +- attributes: + description: (can be found in "About..." or in `metadata.json`) + label: Extension version/Build date + placeholder: ex. 4.2.1 + id: extension_version + type: input + validations: + required: false +- attributes: + description: (`cinnamon --version`) + label: Cinnamon version + placeholder: ex. 5.6.3 + id: cinnamon_version + type: input + validations: + required: true +- attributes: + description: (Mint 21.2, Arch, Fedora 38) + label: Distribution + placeholder: ex. Mint 21.2 + id: distribution + type: input + validations: + required: true +- attributes: + description: (AMD/NVIDIA/Intel and nouveau/kernel/package(s)) + label: Graphics hardware *and* driver used + placeholder: ex. NVIDIA GeForce RTX 4060 and nvidia-driver R535 + id: graphics + type: input + validations: + required: false +- attributes: + default: 0 + label: Extension name and maintainer + options: + - back-to-monitor@nathan818fr @nathan818fr + - blur-overview@nailfarmer.nailfarmer.com + - cinnamon-dynamic-wallpaper@TobiZog @TobiZog + - cinnamon-maximus@fmete + - compiz-windows-effect@hermes83.github.com @hermes83 + - desktop-icons-per-workspace@cardsurf @cardsurf + - desktop-scroller@ccadeptic23 + - DesktopCube@yare + - extra-panel-settings@gr3q @gr3q + - Flipper@connerdev + - gTile@shuairan + - horizontal-osd@berk-karaal @berk-karaal + - mnemonic-5-4-window-menu@mtwebster @mtwebster + - mouse-shake-zoom@rcalixte @rcalixte + - opacify@anish.org + - rnbdsh@negateWindow @rnbdsh + - SanitizeXsessionErrors@claudiux @claudiux + - ShadowParameters@mikhail-ekzi @mikhail-ekzi + - slider@mohammad-sn @mohammad-sn + - smart-panel@mohammad-sn @mohammad-sn + - transparent-panels-reloaded@marcelovbcfilho @marcelovbcfilho + - transparent-panels@germanfr @germanfr + - user-shadows@nathan818fr @nathan818fr + - watermark@germanfr @germanfr + - wobbly-windows@mecheye.net + - workspace-scroller@ori + id: extension + type: dropdown + validations: + required: true +- attributes: + description: Also tell us, what did you expect to happen? + label: What happened? + placeholder: Tell us what you see! + id: what-happened + type: textarea + validations: + required: true +- attributes: + description: Anything else that might help get this fixed faster? (logs, screenshots, + etc.) + label: Other information + placeholder: Extra details... + id: other + type: textarea + validations: + required: false +- attributes: + value: '*By submitting this issue, you agree to behave respectfully and in a mature + manner. If in doubt, refer to the [Golden Rule](https://en.wikipedia.org/wiki/Golden_Rule) + and [Github''s Community Guidelines](https://docs.github.com/en/site-policy/github-terms/github-community-guidelines).*' + type: markdown +description: "If something isn't working, file a report. \U0001F527" +labels: +- bug +name: "\U0001F41C Extension Bug Report" +title: Extension Bug diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..19054161 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,9 @@ +--- +blank_issues_enabled: false +contact_links: + - name: 🚀 Feature Request + url: https://github.com/orgs/linuxmint/discussions + about: If you have a feature request 💡 + - name: ❓ Linux Mint Forums + url: https://forums.linuxmint.com/ + about: Please ask and answer questions here. 🏥 diff --git a/.github/bug_report_creator.py b/.github/bug_report_creator.py new file mode 100755 index 00000000..b52f4b6d --- /dev/null +++ b/.github/bug_report_creator.py @@ -0,0 +1,99 @@ +#!/usr/bin/python3 +''' +Generate 01_bug_report.yml based on repository files +''' + +import os +import json +import yaml + +dirs_blacklist = ['.git', '.github'] + +repo_folder = os.path.realpath(os.path.abspath(os.path.join( + os.path.normpath(os.path.join(os.getcwd(), *(['..'] * 1)))))) + +HEADER = '''# DO NOT EDIT THIS FILE MANUALLY. +# Execute the script called bug_report_creator.py to generate it. + +--- +''' + +BUG_REPORT = {'name': '🐜 Extension Bug Report', + 'description': "If something isn't working, file a report. 🔧", + 'title': 'Extension Bug', + 'labels': ['bug'], + 'body': [{'type': 'markdown', + 'attributes': {'value': 'Thanks for taking the time to fill out this bug report!'}}, + {'type': 'input', 'id': 'extension_version', + 'attributes': {'description': '(can be found in "About..." or in `metadata.json`)', + 'label': 'Extension version/Build date', + 'placeholder': 'ex. 4.2.1'}, + 'validations': {'required': False}}, + {'type': 'input', 'id': 'cinnamon_version', + 'attributes': {'description': '(`cinnamon --version`)', + 'label': 'Cinnamon version', + 'placeholder': 'ex. 5.6.3'}, + 'validations': {'required': True}}, + {'type': 'input', 'id': 'distribution', + 'attributes': {'description': '(Mint 21.2, Arch, Fedora 38)', + 'label': 'Distribution', + 'placeholder': 'ex. Mint 21.2'}, + 'validations': {'required': True}}, + {'type': 'input', 'id': 'graphics', + 'attributes': {'description': '(AMD/NVIDIA/Intel and nouveau/kernel/package(s))', + 'label': 'Graphics hardware *and* driver used', + 'placeholder': 'ex. NVIDIA GeForce RTX 4060 and nvidia-driver R535'}, + 'validations': {'required': False}}, + {'type': 'dropdown', 'id': 'extension', + 'attributes': {'default': 0, + 'label': 'Extension name and maintainer', + 'options': []}, + 'validations': {'required': True}}, + {'type': 'textarea', 'id': 'what-happened', + 'attributes': {'description': 'Also tell us, what did you expect to happen?', + 'label': 'What happened?', + 'placeholder': 'Tell us what you see!'}, + 'validations': {'required': True}}, + {'type': 'textarea', 'id': 'other', + 'attributes': {'description': 'Anything else that might help get this fixed faster? (logs, screenshots, etc.)', + 'label': 'Other information', + 'placeholder': 'Extra details...'}, + 'validations': {'required': False}}, + {'type': 'markdown', + 'attributes': {'value': "*By submitting this issue, you agree to behave respectfully and in a mature manner. If in doubt, refer to the [Golden Rule](https://en.wikipedia.org/wiki/Golden_Rule) and [Github's Community Guidelines](https://docs.github.com/en/site-policy/github-terms/github-community-guidelines).*"}}]} + + +def main(): + """ + List the repository directories and retrieve author information. + """ + xlets_and_authors = [] + + try: + for name in os.listdir(repo_folder): + if name in dirs_blacklist: + continue + + info_file_path = os.path.join(repo_folder, name, 'info.json') + + if os.path.isfile(info_file_path): + with open(info_file_path, 'r', encoding='utf-8') as info: + file_data = json.load(info) + + author_value = file_data.get('author', 'none') + author = '' if author_value == 'none' else f' @{author_value}' + + xlets_and_authors.append(f'{name}{author}') + finally: + dropdown_list = sorted(sorted(xlets_and_authors), key=str.casefold) + with open(os.path.join(repo_folder, '.github', 'ISSUE_TEMPLATE', + '01_bug_report.yml'), 'w', + encoding='utf-8') as bug_report_yaml: + BUG_REPORT['body'][5]['attributes']['options'] = dropdown_list + + bug_report_yaml.write(HEADER) + yaml.dump(BUG_REPORT, bug_report_yaml) + + +if __name__ == '__main__': + main()