From 3f46bad9c1f6ef00a8cb83e1e2f6a17e581842e9 Mon Sep 17 00:00:00 2001 From: GeopJr Date: Wed, 29 Jun 2022 19:36:03 +0300 Subject: [PATCH] feat: switch to issue forms (#297) and remove autocloser as form fields can be/are required --- .github/ISSUE_TEMPLATE/bug_report.md | 38 ------------- .github/ISSUE_TEMPLATE/bug_report.yml | 65 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ------- .github/ISSUE_TEMPLATE/feature_request.yml | 37 ++++++++++++ .github/workflows/autocloser.yml | 38 ------------- 5 files changed, 102 insertions(+), 96 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml delete mode 100644 .github/workflows/autocloser.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 2106b791..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: bug -assignees: Yimura - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -Add screenshots here, you may remove this section if there are no screenshots applicable. - -**Logs** - -``` - -``` - -**Build** -Select which applies for you: -- [x] I used YimMenu unmodified -- [ ] I use my own version of YimMenu - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..6f320e8f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,65 @@ +name: Bug report +description: Create a report to help us improve +title: "[Bug]: " +labels: bug +assignees: + - Yimura +body: +- type: textarea + attributes: + label: Describe the bug + description: A clear and concise description of what the bug is. + validations: + required: true +- type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + validations: + required: true +- type: textarea + attributes: + label: Expected Behavior + description: A clear and concise description of what you expected to happen. + validations: + required: true +- type: textarea + attributes: + label: Screenshots and/or Logs + description: "Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in." + value: | + ``` + + ``` + validations: + required: false +- type: dropdown + attributes: + label: Store + description: Which launcher/store do you use to launch your game? + multiple: false + options: + - Steam + - Epic Games + - Rockstar + - Other (please mention in "Additional context") + validations: + required: true +- type: textarea + attributes: + label: Additional context + description: Add any other context about the problem here. + validations: + required: false +- type: checkboxes + attributes: + label: Build + description: Make sure that this bug occurs on unmodified YimMenu + options: + - label: I used YimMenu unmodified + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 4dbc2da6..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: enhancement -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Provide Reasoning** -Tell us why you'd want for us to add this to YimMenu. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..2acdd5e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,37 @@ +name: Feature request +description: Suggest an idea for this project +title: "[Request]: " +labels: enhancement +assignees: + - Yimura +body: +- type: textarea + attributes: + label: Problem + description: "Is your feature request related to a problem? Please describe." + placeholder: "A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]" + validations: + required: false +- type: textarea + attributes: + label: Solution + description: "Describe the solution you'd like" + placeholder: "A clear and concise description of what you want to happen." + validations: + required: true +- type: textarea + attributes: + label: Reason + description: Provide Reasoning + placeholder: "Tell us why you'd want for us to add this to YimMenu." + validations: + required: true +- type: textarea + attributes: + label: Additional context + description: | + Add any other context about the request here. + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false diff --git a/.github/workflows/autocloser.yml b/.github/workflows/autocloser.yml deleted file mode 100644 index 39678929..00000000 --- a/.github/workflows/autocloser.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Autocloser - -on: - issues: - types: [opened] - -jobs: - autoclose: - runs-on: ubuntu-latest - name: Autocloser - steps: - - name: Autoclose issue that does not follow template - uses: actions/github-script@v6 - env: - message: "this issue was automatically closed because it did not follow the issue template.\n\nA moderator will reopen the issue if it is valid, otherwise it will be tagged with \"invalid\" afterwards." - pattern: "(.*Describe the bug.*To Reproduce.*Expected behavior.*Logs.*Build.*)|(.*Is your feature request related to a problem. Please describe..*Describe the solution you'd like.*Provide Reasoning.*)" - with: - script: | - const { message, pattern } = process.env - if (!context.payload.sender) return; - - const body = context.payload.issue.body; - const templateRegex = new RegExp(pattern, "s") - - if (!body || !body.match(templateRegex)) { - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `@${context.payload.sender.login}, ${message}` - }) - github.rest.issues.update({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - state: 'closed' - }) - }