From d9602da97589c0dccc85c4dc6d9c205ae27ca7cd Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Wed, 28 Jan 2026 21:58:54 +1100 Subject: [PATCH] GIT: workflows - auto close no template removal, docs Signed-off-by: jokob-sk --- .github/workflows/enforce-template.yml | 67 -------------------------- docs/FIX_OFFLINE_DETECTION.md | 3 +- 2 files changed, 2 insertions(+), 68 deletions(-) delete mode 100644 .github/workflows/enforce-template.yml diff --git a/.github/workflows/enforce-template.yml b/.github/workflows/enforce-template.yml deleted file mode 100644 index b7f08e9e..00000000 --- a/.github/workflows/enforce-template.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Enforce Issue Templates - -on: - workflow_dispatch: - -permissions: - issues: write - -jobs: - enforce-template: - runs-on: ubuntu-latest - steps: - - name: Check for template usage - uses: actions/github-script@v7 - with: - script: | - const body = (context.payload.issue?.body || "").toLowerCase(); - const title = (context.payload.issue?.title || "").toLowerCase(); - - // Manual runs don't have an issue context - if (!context.payload.issue) { - console.log("No issue context (manual run) – nothing to enforce."); - return; - } - - // 1. Check for template marker - const usedTemplate = body.includes('netalertx_template'); - - // 2. Security bypass - const isSecurity = - title.includes('security') || - title.includes('vulnerability'); - - if (!usedTemplate && !isSecurity) { - const warningLabel = 'missing-template 📋'; - - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - labels: [warningLabel] - }); - - const commentMessage = ` -Hi there! 👋 Thanks for reaching out. - -To help the maintainers triage issues effectively, we **enforce the use of issue templates**. - -Please [open a new issue here](https://github.com/${context.repo.owner}/${context.repo.repo}/issues/new/choose) -and select the appropriate template. - -Thank you! 🙏 - `; - - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body: commentMessage - }); - - // Intentionally NOT closing issues in manual mode - console.log("Issue missing template – labeled and commented."); - return; - } - - console.log("Template detected or security issue – no action taken."); diff --git a/docs/FIX_OFFLINE_DETECTION.md b/docs/FIX_OFFLINE_DETECTION.md index 9bc69dcd..6bac1fd1 100755 --- a/docs/FIX_OFFLINE_DETECTION.md +++ b/docs/FIX_OFFLINE_DETECTION.md @@ -44,7 +44,8 @@ ARPSCAN_DURATION=30 Enable the `ICMP` scan plugin to complement ARP detection. ICMP is often more reliable for detecting active hosts, especially when ARP fails. -> [!IMPORTANT] If using AdGuard/Pi-hole: If devices still show offline after enabling ICMP, temporarily disable your content blocker. If the issue disappears, whitelist the NetAlertX host IP in your blocker's settings to prevent pings from being dropped. +> [!IMPORTANT] +> If using AdGuard/Pi-hole: If devices still show offline after enabling ICMP, temporarily disable your content blocker. If the issue disappears, whitelist the NetAlertX host IP in your blocker's settings to prevent pings from being dropped. ### ✅ Use Multiple Detection Methods