Skip to contentSkip to conversation

github: Add YAML issue template and btsnoop-analyzer workflow

PATCH Applied Luiz Augusto von Dentz 2 participants 4 messages Apr 15 – Apr 16 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/3 github: Add YAML issue template and btsnoop-analyzer workflow

From: Luiz Augusto von Dentz <[email protected]>

Replace the markdown issue template with a structured YAML form that includes fields for description, reproduction steps, btmon trace upload, analysis focus area selection, and privacy consent checkboxes.

Add a btsnoop-analyzer workflow that automatically analyzes btsnoop traces attached to new issues using Vudentz/btsnoop-analyzer action, posting results as issue comments.

---
 .github/ISSUE_TEMPLATE/issue.md        |  41 -----
 .github/ISSUE_TEMPLATE/issue.yml       | 108 +++++++++++++
 .github/workflows/btsnoop-analyzer.yml | 202 +++++++++++++++++++++++++
 3 files changed, 310 insertions(+), 41 deletions(-)
 delete mode 100644 .github/ISSUE_TEMPLATE/issue.md
 create mode 100644 .github/ISSUE_TEMPLATE/issue.yml
 create mode 100644 .github/workflows/btsnoop-analyzer.yml
.github/ISSUE_TEMPLATE/issue.md deleted +0 -41
deleted file mode 100644
index ba384e120bac..000000000000
@@ -1,41 +0,0 @@
----
-name: New issue
-about: 'Report a bug or other problem'
-title: ''
-labels: ''
-assignees: ''
-
----
-
-### Description
-
-<!-- A clear and concise description of what the bug is -->
-
-<!-- A clear and concise description of what you expected to happen -->
-
-<!-- Include any other relevant details -->
-
-### To reproduce
-<!-- Steps to reproduce the issue, if possible -->
-1.
-2.
-3.
-4.
-
-### Logs
-- btmon log: <!-- Bluetooth traffic dump: (usually needed)
-                  0. Power off connected device
-                  1. Run: btmon -w btmon.log
-                  2. Connect device, reproduce the issue
-                  3. Ctrl-C btmon
-                  4. Attach btmon.log to the issue -->
-- bluetoothd log: <!-- Run: journalctl -u bluetooth --boot 0 > bluetoothd.log; if relevant for issue -->
-
-<!-- Any other logs etc. relevant for the issue -->
-
-### Versions
-- BlueZ version:  <!-- Run: bluetoothctl --version -->
-- Kernel version:  <!-- Run: uname -r -->
-- Problematic device: <!-- Device model etc information, if relevant -->
-
-<!-- Any other relevant information on platform / hardware here -->
.github/ISSUE_TEMPLATE/issue.yml new file +108 -0

108 lines not on this page · raw message

.github/workflows/btsnoop-analyzer.yml new file +202 -0

202 lines not on this page · raw message

Signature · 1 line
2.53.0
author maintainer
#1 lore raw

PATCH 2/3 github: Make result posting robust against action failures

From: Luiz Augusto von Dentz <[email protected]>

Use always() conditions with file-existence checks so steps 1-4 results are posted even if the btsnoop-analyzer action fails partway through. The error comment now only fires on actual action failure (e.g. btmon build error), not LLM errors which are handled gracefully by the analyzer.

---
 .github/workflows/btsnoop-analyzer.yml | 34 +++++++++++++++++---------
 1 file changed, 22 insertions(+), 12 deletions(-)
.github/workflows/btsnoop-analyzer.yml +22 -12
index 3bbd963004cb..9ecda193ceff 100644
@@ -100,12 +100,14 @@ jobs:
           GH_MODELS_TOKEN: ${{ secrets.GH_MODELS_TOKEN }}
 
       - name: Post detection comment
-        if: steps.parse.outputs.found == 'true' && success()
+        if: always() && steps.parse.outputs.found == 'true' && steps.analysis.outcome != 'skipped'
         uses: actions/github-script@v7
         with:
           script: |
             const fs = require('fs');
-            const detect = fs.readFileSync('${{ steps.analysis.outputs.detect }}', 'utf8');
+            const path = '${{ steps.analysis.outputs.detect }}';
+            if (!fs.existsSync(path)) return;
+            const detect = fs.readFileSync(path, 'utf8');
             await github.rest.issues.createComment({
               owner: context.repo.owner,
               repo: context.repo.repo,
@@ -114,12 +116,14 @@ jobs:
             });
 
       - name: Post filter comment
-        if: steps.parse.outputs.found == 'true' && success()
+        if: always() && steps.parse.outputs.found == 'true' && steps.analysis.outcome != 'skipped'
         uses: actions/github-script@v7
         with:
           script: |
             const fs = require('fs');
-            const filter = fs.readFileSync('${{ steps.analysis.outputs.filter }}', 'utf8');
+            const path = '${{ steps.analysis.outputs.filter }}';
+            if (!fs.existsSync(path)) return;
+            const filter = fs.readFileSync(path, 'utf8');
             await github.rest.issues.createComment({
               owner: context.repo.owner,
               repo: context.repo.repo,
@@ -128,12 +132,14 @@ jobs:
             });
 
       - name: Post annotation comment
-        if: steps.parse.outputs.found == 'true' && success()
+        if: always() && steps.parse.outputs.found == 'true' && steps.analysis.outcome != 'skipped'
         uses: actions/github-script@v7
         with:
           script: |
             const fs = require('fs');
-            const annotate = fs.readFileSync('${{ steps.analysis.outputs.annotate }}', 'utf8');
+            const path = '${{ steps.analysis.outputs.annotate }}';
+            if (!fs.existsSync(path)) return;
+            const annotate = fs.readFileSync(path, 'utf8');
             await github.rest.issues.createComment({
               owner: context.repo.owner,
               repo: context.repo.repo,
@@ -142,12 +148,14 @@ jobs:
             });
 
       - name: Post diagnostics comment
-        if: steps.parse.outputs.found == 'true' && success()
+        if: always() && steps.parse.outputs.found == 'true' && steps.analysis.outcome != 'skipped'
         uses: actions/github-script@v7
         with:
           script: |
             const fs = require('fs');
-            const diagnose = fs.readFileSync('${{ steps.analysis.outputs.diagnose }}', 'utf8');
+            const path = '${{ steps.analysis.outputs.diagnose }}';
+            if (!fs.existsSync(path)) return;
+            const diagnose = fs.readFileSync(path, 'utf8');
             await github.rest.issues.createComment({
               owner: context.repo.owner,
               repo: context.repo.repo,
@@ -156,12 +164,14 @@ jobs:
             });
 
       - name: Post analysis comment
-        if: steps.parse.outputs.found == 'true' && success()
+        if: always() && steps.parse.outputs.found == 'true' && steps.analysis.outcome != 'skipped'
         uses: actions/github-script@v7
         with:
           script: |
             const fs = require('fs');
-            const analysis = fs.readFileSync('${{ steps.analysis.outputs.analyze }}', 'utf8');
+            const path = '${{ steps.analysis.outputs.analyze }}';
+            if (!fs.existsSync(path)) return;
+            const analysis = fs.readFileSync(path, 'utf8');
 
             const footer = `\n\n---\n<sub>Analyzed by [btsnoop-analyzer](https://github.com/Vudentz/btsnoop-analyzer) using btmon from [BlueZ](https://github.com/bluez/bluez). MAC addresses ${
               '${{ steps.parse.outputs.anonymize }}' === 'true'
@@ -177,7 +187,7 @@ jobs:
             });
 
       - name: Post error comment
-        if: steps.parse.outputs.found == 'true' && failure()
+        if: always() && steps.parse.outputs.found == 'true' && steps.analysis.outcome == 'failure'
         uses: actions/github-script@v7
         with:
           script: |
@@ -190,7 +200,7 @@ jobs:
             The automated analysis encountered an error. This could be due to:
             - Unsupported trace file format
             - Trace file too large to process
-            - LLM API rate limiting or downtime
+            - btmon build failure
 
             A maintainer will review your trace manually.
 
Signature · 1 line
2.53.0
author maintainer
#2 lore raw

PATCH 3/3 github: Add btsnoop-analyzer slash command workflow

In reply to Luiz Augusto von Dentz

From: Luiz Augusto von Dentz <[email protected]>

Add caller workflow for the btsnoop-analyzer reusable workflow, enabling trace analysis from any issue comment.

---
 .github/workflows/btsnoop-analyze.yml | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 .github/workflows/btsnoop-analyze.yml
.github/workflows/btsnoop-analyze.yml new file +13 -0
new file mode 100644
index 000000000000..484288c0d9b6
@@ -0,0 +1,13 @@
+name: Analyze on mention
+
+on:
+  issue_comment:
+    types: [created]
+
+jobs:
+  analyze:
+    if: >-
+      github.event.issue.pull_request == null &&
+      contains(github.event.comment.body, '/analyze')
+    uses: Vudentz/btsnoop-analyzer/.github/workflows/analyze-on-mention.yml@master
+    secrets: inherit
Signature · 1 line
2.53.0
#3 lore raw
In reply to Luiz Augusto von Dentz
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 11 lines · On Wed, 15 Apr 2026 14:22:07 -0400 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

Replace the markdown issue template with a structured YAML form that includes fields for description, reproduction steps, btmon trace upload, analysis focus area selection, and privacy consent checkboxes.

Add a btsnoop-analyzer workflow that automatically analyzes btsnoop traces attached to new issues using Vudentz/btsnoop-analyzer action, posting results as issue comments.

[...]

Here is the summary with links:
- [BlueZ,v1,1/3] github: Add YAML issue template and btsnoop-analyzer workflow

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=b73ba12b0bd6
  - [BlueZ,v1,2/3] github: Make result posting robust against action failures
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=ec6940c1a284
  - [BlueZ,v1,3/3] github: Add btsnoop-analyzer slash command workflow
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=ce07e906e499

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html