From c0fca75cbcb6bcd9263f6f216c13c779e3a47389 Mon Sep 17 00:00:00 2001 From: Felitendo Date: Thu, 1 Oct 2026 09:00:19 +0200 Subject: [PATCH] chore: add issue template for apps that do not work --- .github/ISSUE_TEMPLATE/3-app.yml | 27 ++++++++++++++++++ .github/workflows/issues.yml | 48 ++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/3-app.yml create mode 100644 .github/workflows/issues.yml diff --git a/.github/ISSUE_TEMPLATE/3-app.yml b/.github/ISSUE_TEMPLATE/3-app.yml new file mode 100644 index 0000000..b426876 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3-app.yml @@ -0,0 +1,27 @@ +name: 🧩 App does not work +description: Autoscroll does not work in an app. Just tell us which one. +title: 'App: ' +labels: +- app +body: +- type: input + id: app + attributes: + label: Which app? + placeholder: Obsidian + validations: + required: true +- type: dropdown + id: install + attributes: + label: How is it installed? + description: Skip it if you are not sure. + options: + - Native package + - Flatpak + - Snap + - AppImage +- type: textarea + id: more + attributes: + label: Anything else? diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml new file mode 100644 index 0000000..52e3696 --- /dev/null +++ b/.github/workflows/issues.yml @@ -0,0 +1,48 @@ +name: issues + +on: + issues: + types: [opened, labeled] + +permissions: + issues: write + +jobs: + # Users can leave the title alone, it gets the app's name. + title: + name: name app issues after the app + if: github.event.action == 'opened' && contains(github.event.issue.labels.*.name, 'app') + runs-on: ubuntu-latest + steps: + - env: + GH_TOKEN: ${{ github.token }} + BODY: ${{ github.event.issue.body }} + NUMBER: ${{ github.event.issue.number }} + run: | + app=$(printf '%s\n' "$BODY" | tr -d '\r' \ + | awk '/^### /{f = ($0 == "### Which app?"); next} f && NF {print; exit}') + if [ -n "$app" ] && [ "$app" != "_No response_" ]; then + gh issue edit "$NUMBER" --repo "$GITHUB_REPOSITORY" --title "App: ${app:0:80}" + fi + + # The "fixed" and "not chromium" labels answer and close the issue. + close: + name: close on label + if: >- + github.event.action == 'labeled' && github.event.issue.state == 'open' + && (github.event.label.name == 'fixed' || github.event.label.name == 'not chromium') + runs-on: ubuntu-latest + steps: + - env: + GH_TOKEN: ${{ github.token }} + LABEL: ${{ github.event.label.name }} + NUMBER: ${{ github.event.issue.number }} + run: | + if [ "$LABEL" = fixed ]; then + reason=completed + comment='Fixed, thanks for the report! The fix comes with the next release.' + else + reason='not planned' + comment='Thanks for the report! This app is not built on Chromium, Electron or CEF. So it has no autoscroll built in that this tool could turn on.' + fi + gh issue close "$NUMBER" --repo "$GITHUB_REPOSITORY" --reason "$reason" --comment "$comment"